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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux