diff options
author | Eric Anholt <eric@anholt.net> | 2008-12-17 14:25:22 -0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-12-31 18:23:55 +0800 |
commit | fde2990e26ffb0736e78a82178a31df8807cf1ed (patch) | |
tree | cb026c7c84d3d4eec16be92d480e66eb27d50f4a | |
parent | 6371dbbee3051d7ac614f5d7a794519a4c04deeb (diff) |
uxa: Do a hack to use the aperture mapping instead of bo_map in sw fallbacks.
Because of how fallbacky the uxa rendering core is, and our inability (without
wfb in userland or page faulting in the kernel) to tell the kernel just where
we're going to fall back, the clflush overhead can become outrageous, for
example with emacs and xcompmgr. Instead of using drm_intel_bo_map, pin the
buffer and do the fallback to the aperture mapping. This gets us the bad old
performance that fb is designed for, instead of bad new performance.
(cherry picked from commit aae4008096399a0e84abc7c016b35092caf9db25)
-rw-r--r-- | src/i830_exa.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/i830_exa.c b/src/i830_exa.c index 4a046447..636aa0af 100644 --- a/src/i830_exa.c +++ b/src/i830_exa.c @@ -785,17 +785,11 @@ i830_uxa_prepare_access (PixmapPtr pixmap, uxa_access_t access) i830->need_sync = FALSE; } - /* For tiled front buffer, short-circuit to the GTT mapping. */ - if (i830_pixmap_tiled(pixmap)) { - drm_intel_gem_bo_start_gtt_access(bo, access == UXA_ACCESS_RW); - - pixmap->devPrivate.ptr = pI830->FbBase + bo->offset; - } else { - if (dri_bo_map (bo, access == UXA_ACCESS_RW) != 0) - return FALSE; + if (drm_intel_bo_pin(bo, 4096) != 0) + return FALSE; - pixmap->devPrivate.ptr = bo->virtual; - } + drm_intel_gem_bo_start_gtt_access(bo, access == UXA_ACCESS_RW); + pixmap->devPrivate.ptr = pI830->FbBase + bo->offset; } return TRUE; } @@ -810,8 +804,7 @@ i830_uxa_finish_access (PixmapPtr pixmap) ScrnInfoPtr scrn = xf86Screens[screen->myNum]; I830Ptr i830 = I830PTR(scrn); - if (!i830_pixmap_tiled(pixmap)) - dri_bo_unmap(bo); + drm_intel_bo_unpin(bo); pixmap->devPrivate.ptr = NULL; if (bo == i830->front_buffer->bo) |