[Intel-gfx] [PATCH 11/25] drm/i915/fbc: fix the FBC state checking code

chris at chris-wilson.co.uk chris at chris-wilson.co.uk
Tue Aug 16 07:36:08 UTC 2016


On Mon, Aug 15, 2016 at 10:47:18PM +0000, Zanoni, Paulo R wrote:
> Em Seg, 2016-08-15 às 21:55 +0100, Chris Wilson escreveu:
> > So this change is broken as intel_fbc_pre_update() depends upon state
> > derived from the pinned framebuffer object but is being called by
> > intel_crtc_page_flip() before that object is pinned with
> > intel_pin_and_fence_fb - i.e. state such as the gtt_offset or the
> > fence
> > for the object are incorrect, and even trying to look at them can
> > cause
> > an oops.
> 
> Nope:
> $ git show
> 1eb52238a5f5b6a3f497b47e6da39ccfebe6b878:drivers/gpu/drm/i915/intel_dis
> play.c
> 
> Back when the commit was merged, the pre_update() call was done after
> pin_and_fence_fb(). It looks like some later commit introduced the
> problem you point.

Hmm, 5a21b6650a239ebc020912968a44047701104159 ?

> Still, looks like we have code to fix.

Well the good news is that answers the question of whether that code is
intended to be safe under the struct_mutex as it once previously was.

So we can just rearrange the code to do the pre_update after the pin?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list