]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix overlay frontbuffer tracking
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 9 Feb 2021 02:19:17 +0000 (04:19 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 9 Feb 2021 22:38:24 +0000 (00:38 +0200)
commit3ae9b7fe599235004b19a56a5e2b1038256ec4a7
treec23ae937186adc3a69b745f16257ae3cf9ba93ea
parent4e372502882e6601fee6c164899b5f3a6c9ed843
drm/i915: Fix overlay frontbuffer tracking

We don't have a persistent fb holding a reference to the frontbuffer
object, so every time we do the get+put we throw the frontbuffer object
immediately away. And so the next time around we get a pristine
frontbuffer object with bits==0 even for the old vma. This confuses
the frontbuffer tracking code which understandably expects the old
frontbuffer to have the overlay's bit set.

Fix this by hanging on to the frontbuffer reference until the next
flip. And just to make this a bit more clear let's track the frontbuffer
explicitly instead of just grabbing it via the old vma.

Cc: stable@vger.kernel.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1136
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210209021918.16234-2-ville.syrjala@linux.intel.com
Fixes: 9899f79f848d ("drm/i915: Extract intel_frontbuffer active tracking")
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/display/intel_overlay.c