summaryrefslogtreecommitdiff
path: root/src/nv_hw.c
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2007-05-10 17:09:36 -0700
committerAaron Plattner <aplattner@nvidia.com>2007-05-11 15:29:13 -0700
commit51c6425bea6e4ef02f7b76e58e759f99b0e993e8 (patch)
treeca130eeb09ff4c4e185c9a94bc6ae0db645ab93e /src/nv_hw.c
parent0415ecaead518123ac6774300241867883a6dd57 (diff)
Add rudimentary VBE-based dual head support for pre-G80.
Diffstat (limited to 'src/nv_hw.c')
-rw-r--r--src/nv_hw.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/nv_hw.c b/src/nv_hw.c
index a221d11..ae499fa 100644
--- a/src/nv_hw.c
+++ b/src/nv_hw.c
@@ -948,7 +948,8 @@ void NVLoadStateExt (
pNv->PTIMER[0x0100] = 0xFFFFFFFF;
if(pNv->Architecture == NV_ARCH_04) {
- pNv->PFB[0x0200/4] = state->config;
+ if (state)
+ pNv->PFB[0x0200/4] = state->config;
} else
if((pNv->Architecture < NV_ARCH_40) ||
((pNv->Chipset & 0xfff0) == 0x0040))
@@ -1411,6 +1412,11 @@ void NVLoadStateExt (
pNv->PFIFO[0x0495] = 0x00000001;
pNv->PFIFO[0x0140] = 0x00000001;
+ if(!state) {
+ pNv->CurrentState = NULL;
+ return;
+ }
+
if(pNv->Architecture >= NV_ARCH_10) {
if(pNv->twoHeads) {
pNv->PCRTC0[0x0860/4] = state->head;
@@ -1590,7 +1596,12 @@ void NVSetStartAddress (
CARD32 start
)
{
- pNv->PCRTC[0x800/4] = start;
+ if (pNv->VBEDualhead) {
+ pNv->PCRTC0[0x800/4] = start;
+ pNv->PCRTC0[0x2800/4] = start + pNv->vbeCRTC1Offset;
+ } else {
+ pNv->PCRTC[0x800/4] = start;
+ }
}