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-01-30 18:52:32 +0800 |
commit | 04032dad28baab80131edbe8fe58aade8149bb71 (patch) | |
tree | 56a5cc5b7e0341e39f9ab41966274a3065daab87 /src | |
parent | b9c3fa79d9fd48c34536f92e6c1c70fe3a619410 (diff) |
Wrap up chipsets which needs graphics address for status page
Also add support on new chipset.
Diffstat (limited to 'src')
-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 85b65285..8a5262f1 100644 --- a/src/i830_memory.c +++ b/src/i830_memory.c @@ -1635,11 +1635,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; @@ -1652,7 +1652,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; } |