added shared_info flag to assess PCI or AGP mode. Engine (if in DMA mode) selects PCI or AGP transfers accordingly (pre-NV40 only for now). It seems the combination of the 1Mb cmd buffer size and it being in main mem makes it all fast. (1Mb in gfx card remains at same speed at 32kb.). Maybe we can even use AGP engine transfers for placing textures on the gfx card in the future: who knows.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12848 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rudolf Cornelissen 2005-05-26 19:49:18 +00:00
parent 50461e314f
commit 0188d8661e
3 changed files with 17 additions and 5 deletions

View File

@ -4,7 +4,7 @@
Other authors:
Mark Watson,
Rudolf Cornelissen 10/2002-4/2005.
Rudolf Cornelissen 10/2002-5/2005.
*/
#define MODULE_BIT 0x00800000

View File

@ -395,9 +395,16 @@ status_t nv_acc_init_dma()
//main mem DMA buf test on pre-NV40
if (1)//si->ps.card_type == NV04)
{
/* DMA target node is PCI */
ACCW(PR_CTX0_A, 0x00023002);
// ACCW(PR_CTX0_A, 0x00033002);//AGP
if (si->engine.agp_mode)
{
/* DMA target node is AGP */
ACCW(PR_CTX0_A, 0x00033002);
}
else
{
/* DMA target node is PCI */
ACCW(PR_CTX0_A, 0x00023002);
}
/* point at the DMA buffer via main system memory */
// ACCW(PR_CTX2_A, (ACCR(PR_CTX2_A) +
// (((uint32)((uint8 *)(si->framebuffer_pci))) & 0xfffff000)));

View File

@ -1,5 +1,5 @@
/* Author:
Rudolf Cornelissen 6/2004-9/2004
Rudolf Cornelissen 6/2004-5/2005
*/
#define MODULE_BIT 0x00000100
@ -18,6 +18,9 @@ status_t nv_agp_setup(void)
agp_info nv_ai;
bool agp = false;
/* preset we are running in PCI mode: so acc engine may not use AGP transfers */
si->engine.agp_mode = false;
/* first try to enable FW support on our card if user requested this
* ('unsupported' tweak!)
* This has no effect on PCI cards. */
@ -122,6 +125,8 @@ status_t nv_agp_setup(void)
/* ..but we do need to select the right speed scheme fetched from our card */
if (nv_ai.interface.agp_stat & AGP_rate_rev) nca.cmd |= AGP_rate_rev;
ioctl(fd, NV_ENABLE_AGP, &nca, sizeof(nca));
/* tell the engine in may use AGP transfers */
si->engine.agp_mode = true;
}
/* list mode now activated,