drm/i915: Clear fb_tracking.busy_bits also for synchronous flips
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 18 Jun 2015 09:23:24 +0000 (11:23 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 23 Jun 2015 22:22:20 +0000 (00:22 +0200)
commitfdbff9282c0f5f61ffc87d57461b04d943250910
treed4bcdc0c74df19f5f9ff7455f7e9286184a70b19
parent5e60d790714bbda0402ddd715aee5e61b48682f4
drm/i915: Clear fb_tracking.busy_bits also for synchronous flips

The current/old frontbuffer might still have gpu frontbuffer rendering
pending. But once flipped it won't have the corresponding frontbuffer
bits any more and hence the request retire function won't ever clear
the corresponding busy bits. The async flip tracking (with the
flip_prepare and flip_complete functions) already does this, but
somehow I've forgotten to do this for synchronous flips.

Note that we don't track outstanding rendering of the new framebuffer
with busy_bits since all our plane update code waits for previous
rendering to complete before displaying a new buffer. Hence a new
buffer will never be busy.

v2: Drop the spurious inline Ville spotted.

v3: Don't touch flip_bits in the synchronsou frontbuffer_flip
function, noticed by Paulo.

v4: Remove one more inline that slipped through (Paulo).

Reported-by: Paulo Zanoni <przanoni@gmail.com>
Cc: Paulo Zanoni <przanoni@gmail.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Testcase: igt/kms_frontbuffer_tracking/fbc-modesetfrombusy
Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_frontbuffer.c