All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Do not trigger the pageflip stall check too early
@ 2014-12-17 16:41 Chris Wilson
  2014-12-17 16:48 ` Chris Wilson
  2014-12-18  5:30 ` shuang.he
  0 siblings, 2 replies; 7+ messages in thread
From: Chris Wilson @ 2014-12-17 16:41 UTC (permalink / raw)
  To: intel-gfx

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@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@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

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-12-18  5:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-17 16:41 [PATCH] drm/i915: Do not trigger the pageflip stall check too early Chris Wilson
2014-12-17 16:48 ` Chris Wilson
2014-12-17 18:19   ` Ville Syrjälä
2014-12-17 18:35     ` Chris Wilson
2014-12-17 20:59       ` Daniel Vetter
2014-12-17 21:19         ` Ville Syrjälä
2014-12-18  5:30 ` shuang.he

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.