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>
This commit is contained in:
Chris Wilson 2012-10-20 09:29:10 +01:00
parent f4c32af48b
commit fc0ba65f5e
1 changed files with 8 additions and 0 deletions

View File

@ -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);