diff options
author | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-01-30 18:52:32 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-02-22 11:15:39 +0800 |
commit | 9e3fb1c75a9aff6aecfc2a21ccc6b2e2d32a5f9a (patch) | |
tree | 2703a9b863798e3c84ba836973bef9ab4e010723 | |
parent | 4ef51aba115820fe79048fa45221138f1e5054d2 (diff) | |
download | xorg-driver-xf86-video-intel-9e3fb1c75a9aff6aecfc2a21ccc6b2e2d32a5f9a.tar.gz |
Wrap up chipsets which needs graphics address for status page
Also add support on new chipset.
-rw-r--r-- | src/common.h | 2 | ||||
-rw-r--r-- | src/i830_dri.c | 2 | ||||
-rw-r--r-- | src/i830_memory.c | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/common.h b/src/common.h index 3a11e594..c0af1ad2 100644 --- a/src/common.h +++ b/src/common.h @@ -441,6 +441,8 @@ extern int I810_DEBUG; #define IS_MOBILE(pI810) (IS_I830(pI810) || IS_I85X(pI810) || IS_I915GM(pI810) || IS_I945GM(pI810) || IS_I965GM(pI810) || IS_IGD_GM(pI810)) /* mark chipsets for using gfx VM offset for overlay */ #define OVERLAY_NOPHYSICAL(pI810) (IS_G33CLASS(pI810)) +/* chipsets require graphics mem for hardware status page */ +#define HWS_NEED_GFX(pI810) (IS_G33CLASS(pI810) || IS_IGD_GM(pI810)) #define GTT_PAGE_SIZE KB(4) #define ROUND_TO(x, y) (((x) + (y) - 1) / (y) * (y)) diff --git a/src/i830_dri.c b/src/i830_dri.c index f52a7c3d..3400b380 100644 --- a/src/i830_dri.c +++ b/src/i830_dri.c @@ -813,7 +813,7 @@ I830DRIDoMappings(ScreenPtr pScreen) return FALSE; } - if (IS_G33CLASS(pI830)) { + if (HWS_NEED_GFX(pI830)) { if (!I830SetHWS(pScrn, pI830->hw_status->offset)) { DRICloseScreen(pScreen); return FALSE; diff --git a/src/i830_memory.c b/src/i830_memory.c index 77ec3016..c641c4a5 100644 --- a/src/i830_memory.c +++ b/src/i830_memory.c @@ -1641,11 +1641,11 @@ i830_allocate_hwstatus(ScrnInfoPtr pScrn) * after init (at best), so allocate it fixed for its lifetime * (i.e. not through buffer objects). */ - pI830->hw_status = i830_allocate_memory(pScrn, "G33 hw status", + pI830->hw_status = i830_allocate_memory(pScrn, "HW status", HWSTATUS_PAGE_SIZE, GTT_PAGE_SIZE, NEED_LIFETIME_FIXED); if (pI830->hw_status == NULL) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - "Failed to allocate hw status page for G33.\n"); + "Failed to allocate hw status page.\n"); return FALSE; } return TRUE; @@ -1658,7 +1658,7 @@ i830_allocate_3d_memory(ScrnInfoPtr pScrn) DPRINTF(PFX, "i830_allocate_3d_memory\n"); - if (IS_G33CLASS(pI830)) { + if (HWS_NEED_GFX(pI830)) { if (!i830_allocate_hwstatus(pScrn)) return FALSE; } |