Wrap up chipsets which needs graphics address for status page
Also add support on new chipset.
This commit is contained in:
parent
b9c3fa79d9
commit
04032dad28
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue