diff options
author | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-01-30 18:55:20 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-01-30 18:55:20 +0800 |
commit | bf629466a46c4037ec7b7cc5ee16be947618bd68 (patch) | |
tree | cec7e7f28089d924bdb2a9a9a67affd8816426e3 /src/i830_driver.c | |
parent | 04032dad28baab80131edbe8fe58aade8149bb71 (diff) |
hardware status page initialization rework
Order hardware status page setup more reasonable after
all memory bound, in case new chipset requires non-stolen
page and that could be bound then.
Also clean up drm irq handler install function, and put
first install in starting stage later than status page setup,
so we won't make device cry for uninitialized status page.
Diffstat (limited to 'src/i830_driver.c')
-rw-r--r-- | src/i830_driver.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c index dffc6306..a3c64de5 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -3184,6 +3184,22 @@ I830EnterVT(int scrnIndex, int flags) #ifdef XF86DRI if (pI830->directRenderingEnabled) { + /* HW status is fixed, we need to set it up before any drm + * operation which accessing that page, like irq install, etc. + */ + if (pI830->starting) { + if (HWS_NEED_GFX(pI830) && !I830DRISetHWS(pScrn)) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Fail to setup hardware status page.\n"); + I830DRICloseScreen(pScrn->pScreen); + return FALSE; + } + if (!I830DRIInstIrqHandler(pScrn)) { + I830DRICloseScreen(pScrn->pScreen); + return FALSE; + } + } + /* Update buffer offsets in sarea and mappings, since buffer offsets * may have changed. */ |