diff --git a/src/common.h b/src/common.h index 57db6cb..f2ae502 100644 --- a/src/common.h +++ b/src/common.h @@ -374,6 +374,8 @@ extern int I810_DEBUG; /* chipsets require status page in non stolen memory */ #define HWS_NEED_NONSTOLEN(pI810) (IS_GM45(pI810) || IS_G4X(pI810)) #define SUPPORTS_INTEGRATED_HDMI(pI810) (IS_GM45(pI810) || IS_G4X(pI810)) +/* dsparb controlled by hw only */ +#define DSPARB_HWCONTROL(pI810) (IS_G4X(pI810) || IS_GM45(pI810)) #define GTT_PAGE_SIZE KB(4) #define ROUND_TO(x, y) (((x) + (y) - 1) / (y) * (y)) diff --git a/src/i830_display.c b/src/i830_display.c index 6176447..2e1de41 100644 --- a/src/i830_display.c +++ b/src/i830_display.c @@ -1510,7 +1510,8 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, i830WaitForVblank(pScrn); - i830_update_dsparb(pScrn); + if (!DSPARB_HWCONTROL(pI830)) + i830_update_dsparb(pScrn); /* Clear any FIFO underrun status that may have occurred normally */ OUTREG(pipestat_reg, INREG(pipestat_reg) | FIFO_UNDERRUN); diff --git a/src/i830_driver.c b/src/i830_driver.c index 4bb9b81..f5aa114 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -2018,7 +2018,8 @@ SaveHWState(ScrnInfoPtr pScrn) } /* Save video mode information for native mode-setting. */ - pI830->saveDSPARB = INREG(DSPARB); + if (!DSPARB_HWCONTROL(pI830)) + pI830->saveDSPARB = INREG(DSPARB); pI830->saveDSPACNTR = INREG(DSPACNTR); pI830->savePIPEACONF = INREG(PIPEACONF); @@ -2161,7 +2162,8 @@ RestoreHWState(ScrnInfoPtr pScrn) if (!IS_I830(pI830) && !IS_845G(pI830)) OUTREG(PFIT_CONTROL, pI830->savePFIT_CONTROL); - OUTREG(DSPARB, pI830->saveDSPARB); + if (!DSPARB_HWCONTROL(pI830)) + OUTREG(DSPARB, pI830->saveDSPARB); OUTREG(DSPCLK_GATE_D, pI830->saveDSPCLK_GATE_D); OUTREG(RENCLK_GATE_D1, pI830->saveRENCLK_GATE_D1); @@ -2512,7 +2514,7 @@ I830BlockHandler(int i, * (except for mode setting, where it may occur naturally). * Check & ack the condition. */ - if (pScrn->vtSema) { + if (pScrn->vtSema && !DSPARB_HWCONTROL(pI830)) { if (xf86_config->crtc[0]->enabled && (INREG(PIPEASTAT) & FIFO_UNDERRUN)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "underrun on pipe A!\n");