[Intel-gfx] [PATCH] drm/i915: Do not trigger the pageflip stall check too early

Chris Wilson chris at chris-wilson.co.uk
Wed Dec 17 08:41:42 PST 2014


On gen2-4, we have a separate pageflip prepare/finish phase. The intent
of the stall check is to detect when we have incurred a delay,
potentially indefinite, after the pageflip is submitted and before the
flip is processed by the hardware. However, our notion of
INTEL_FLIP_PENDING/INTEL_FLIP_COMPLETE do not tally with how we set the
values during prepare/finish and the current stall check erroneously
assumes that when the pending value >= COMPLETE, the driver has seen the
hardware completion flag. But what the driver actually means, is that it
has seen the acknowlegement that the flip is queued and is now pending
the completion event.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85888
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 70a75136bc61..0c43d970dbf9 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9707,8 +9707,8 @@ static bool __intel_pageflip_stall_check(struct drm_device *dev,
 	struct intel_unpin_work *work = intel_crtc->unpin_work;
 	u32 addr;
 
-	if (atomic_read(&work->pending) >= INTEL_FLIP_COMPLETE)
-		return true;
+	if (atomic_read(&work->pending) < INTEL_FLIP_COMPLETE)
+		return false;
 
 	if (!work->enable_stall_check)
 		return false;
-- 
2.1.3



More information about the Intel-gfx mailing list