[Intel-gfx] [PATCH] uxa: Restore old bo on failure

Chris Wilson chris at chris-wilson.co.uk
Wed Mar 23 21:01:58 UTC 2016


On Wed, Mar 23, 2016 at 03:44:37PM -0400, Lyude wrote:
> When we fail to do a modeset, we need to make sure that we restore the
> previous bo in the event that it's changed. Otherwise we'll crash the X
> server the next time we do a pageflip.
> 
> This fixes an issue with panning crashing the X server if a user tries
> to set a large panning resolution such as 5200x3200, and the GPU doesn't
> have enough memory to handle the bo due to being in UXA mode.
> 
> Signed-off-by: Lyude <cpaul at redhat.com>

Ok, the reference handling there is a little dodgy, but since this only
occurs along one very specific callpath where we know that a ref is held
for both new/old bo here, it all just works and so avoids having to dive
into the mess that is set_pixmap_bo.

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

I'll valgrind the flip-vs-xrandr tests tomorrow to be sure.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list