fixed NV44 and NV45 programming for acceleration

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11269 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rudolf Cornelissen
2005-02-06 11:33:17 +00:00
parent 485f31599b
commit 94e32479c0
2 changed files with 10 additions and 8 deletions
@@ -1,6 +1,6 @@
/* NV Acceleration functions */
/* Author:
Rudolf Cornelissen 8/2003-1/2005.
Rudolf Cornelissen 8/2003-2/2005.
This code was possible thanks to:
- the Linux XFree86 NV driver,
@@ -373,6 +373,7 @@ status_t nv_acc_init()
switch (si->ps.card_type)
{
case NV40:
case NV45:
ACCW(NV40_WHAT0, 0x83280fff);
ACCW(NV40_WHAT1, 0x000000a0);
ACCW(NV40_WHAT2, 0x0078e366);
@@ -390,7 +391,7 @@ status_t nv_acc_init()
ACCW(NV40P_WHAT2, 0x0072cb77);
ACCW(NV40P_WHAT3, 0x00000108);
break;
case NV45: //fixme, checkout: this is cardID 0x016x at least!
case NV44:
ACCW(NV40P_WHAT0, 0x83280eff);
ACCW(NV40P_WHAT1, 0x000000a0);
ACCW(NV45_WHAT2, 0x00000000);
@@ -739,7 +740,7 @@ status_t nv_acc_init()
ACCW(NV20_PITCH3, (si->fbc.bytes_per_row & 0x0000ffff));
break;
case NV40A:
if (si->ps.card_type == NV40)
if ((si->ps.card_type == NV40) || (si->ps.card_type == NV45))
{
/* location of active screen in framebuffer */
ACCW(NV20_OFFSET0, ((uint8*)si->fbc.frame_buffer - (uint8*)si->framebuffer));
@@ -784,7 +785,7 @@ status_t nv_acc_init()
/* copy some RAM configuration info(?) */
if (si->ps.card_arch >= NV20A)
{
if (si->ps.card_type > NV40)
if ((si->ps.card_type > NV40) && (si->ps.card_type != NV45))
{
ACCW(NV40P_WHAT_T0, NV_REG32(NV32_PFB_CONFIG_0));
ACCW(NV40P_WHAT_T1, NV_REG32(NV32_PFB_CONFIG_1));
@@ -795,7 +796,7 @@ status_t nv_acc_init()
{
ACCW(NV20_WHAT_T0, NV_REG32(NV32_PFB_CONFIG_0));
ACCW(NV20_WHAT_T1, NV_REG32(NV32_PFB_CONFIG_1));
if (si->ps.card_type == NV40)
if ((si->ps.card_type == NV40) || (si->ps.card_type == NV45))
{
ACCW(NV40_WHAT_T2, NV_REG32(NV32_PFB_CONFIG_0));
ACCW(NV40_WHAT_T3, NV_REG32(NV32_PFB_CONFIG_1));
@@ -1,7 +1,7 @@
/* NV Acceleration functions */
/* Author:
Rudolf Cornelissen 8/2003-1/2005.
Rudolf Cornelissen 8/2003-2/2005.
This code was possible thanks to:
- the Linux XFree86 NV driver,
@@ -422,6 +422,7 @@ status_t nv_acc_init_dma()
switch (si->ps.card_type)
{
case NV40:
case NV45:
ACCW(NV40_WHAT0, 0x83280fff);
ACCW(NV40_WHAT1, 0x000000a0);
ACCW(NV40_WHAT2, 0x0078e366);
@@ -440,7 +441,7 @@ status_t nv_acc_init_dma()
ACCW(NV40P_WHAT2, 0x0072cb77);
ACCW(NV40P_WHAT3, 0x00000108);
break;
case NV45: //fixme, checkout: this is cardID 0x016x at least!
case NV44:
ACCW(NV40P_WHAT0, 0x83280eff);
ACCW(NV40P_WHAT1, 0x000000a0);
@@ -525,7 +526,7 @@ status_t nv_acc_init_dma()
if (si->ps.card_arch >= NV40A)
{
if (si->ps.card_type == NV40)
if ((si->ps.card_type == NV40) || (si->ps.card_type == NV45))
{
/* copy some RAM configuration info(?) */
ACCW(NV20_WHAT_T0, NV_REG32(NV32_PFB_CONFIG_0));