diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2008-03-30 13:51:31 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2008-03-30 13:51:31 +0000 |
commit | 1d45ca8c03ed27912049f405194382e5ba41674d (patch) | |
tree | 26bc625f6ae732c3620142a8e4e5e1d1d4e31fe7 /driver/xf86-video-intel/src/i830_memory.c | |
parent | d3d2132216a1ffa6e540438c3730b39e100fdbf8 (diff) |
Update to Intel driver 2.2.1. But change default accelmethod to XAA.
Tested by landry@, oga@, steven@, jakemsr@.
Diffstat (limited to 'driver/xf86-video-intel/src/i830_memory.c')
-rw-r--r-- | driver/xf86-video-intel/src/i830_memory.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/driver/xf86-video-intel/src/i830_memory.c b/driver/xf86-video-intel/src/i830_memory.c index 77ec30168..aa7021596 100644 --- a/driver/xf86-video-intel/src/i830_memory.c +++ b/driver/xf86-video-intel/src/i830_memory.c @@ -474,6 +474,9 @@ i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset, unsigned long size) /* Can't do TTM on stolen memory */ mmsize -= pI830->stolen_size; + if (HWS_NEED_GFX(pI830) && IS_IGD_GM(pI830)) + mmsize -= HWSTATUS_PAGE_SIZE; + /* Create the aperture allocation */ pI830->memory_manager = i830_allocate_aperture(pScrn, "DRI memory manager", @@ -1636,16 +1639,20 @@ static Bool i830_allocate_hwstatus(ScrnInfoPtr pScrn) { I830Ptr pI830 = I830PTR(pScrn); + int flags; /* The current DRM will leak the HWS mapping if we update the address * 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", - HWSTATUS_PAGE_SIZE, GTT_PAGE_SIZE, NEED_LIFETIME_FIXED); + flags = NEED_LIFETIME_FIXED; + if (IS_IGD_GM(pI830)) + flags |= NEED_NON_STOLEN; + pI830->hw_status = i830_allocate_memory(pScrn, "HW status", + HWSTATUS_PAGE_SIZE, GTT_PAGE_SIZE, flags); 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 +1665,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; } |