summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-10-20 09:29:10 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-10-20 15:37:19 +0100
commitfc0ba65f5efe217f2ab5e920255d2133d7c9e5e8 (patch)
treebeca347e598ffe226826826f3b9ddcb47afebae0
parentf4c32af48b0c92a48131090886a6a6b6c45dbe34 (diff)
uxa: Disable bo reuse after binding to a scanout
On gen6+, bo are expected to be LLC by default. However, as using the bo for the scanout causes it to be moved into the uncached domain, this assumption is then false and we should release the bo back to the system rather than spread the uncached buffers around. The most common allocator of scanouts is for pageflipping which are already non-reusable due to the DRI2 export, so there should actually be little impact. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/intel_display.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/intel_display.c b/src/intel_display.c
index d58e6e0b..ce1b9a8f 100644
--- a/src/intel_display.c
+++ b/src/intel_display.c
@@ -493,6 +493,8 @@ intel_crtc_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
ErrorF("failed to add fb\n");
return FALSE;
}
+
+ drm_intel_gem_bo_disable_resuse(intel->front_buffer);
}
saved_mode = crtc->mode;
@@ -597,6 +599,8 @@ intel_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
return NULL;
}
+ drm_intel_gem_bo_disable_resuse(intel_crtc->rotate_bo);
+
intel_crtc->rotate_pitch = rotate_pitch;
return intel_crtc->rotate_bo;
}
@@ -723,6 +727,8 @@ intel_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)
ErrorF("have front buffer\n");
}
+ drm_intel_gem_bo_disable_resuse(bo);
+
intel_crtc->scanout_pixmap = ppix;
return drmModeAddFB(intel->drmSubFD, ppix->drawable.width,
ppix->drawable.height, ppix->drawable.depth,
@@ -1494,6 +1500,7 @@ intel_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
if (ret)
goto fail;
+ drm_intel_gem_bo_disable_resuse(intel->front_buffer);
intel->front_pitch = pitch;
intel->front_tiling = tiling;
@@ -1555,6 +1562,7 @@ intel_do_pageflip(intel_screen_private *intel,
new_front->handle, &new_fb_id))
goto error_out;
+ drm_intel_gem_bo_disable_resuse(new_front);
intel_glamor_flush(intel);
intel_batch_submit(scrn);