aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorJohn Harrison <John.C.Harrison@Intel.com>2014-11-24 18:49:42 +0000
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-12-03 09:35:22 +0100
commit1b5a433a4dd967b125131da42b89b5cc0d5b1f57 (patch)
tree64e16dd2052cb12fa91d0d4d687b19855b148eef /drivers/gpu/drm/i915/intel_display.c
parentdrm/i915: Connect requests to rings at creation not submission (diff)
downloadlinux-dev-1b5a433a4dd967b125131da42b89b5cc0d5b1f57.tar.xz
linux-dev-1b5a433a4dd967b125131da42b89b5cc0d5b1f57.zip
drm/i915: Convert 'i915_seqno_passed' calls into 'i915_gem_request_completed'
Almost everywhere that caled i915_seqno_passed() was really asking 'has the given seqno popped out of the hardware yet?'. Thus it had to query the current hardware seqno and then do a signed delta comparison (which copes with wrapping around zero but not with seqno values more than 2GB apart, although the latter is unlikely!). Now that the majority of seqno instances have been replaced with request structures, it is possible to convert this test to be request based as well. There is now a 'i915_gem_request_completed()' function which takes a request and returns true or false as appropriate. Note that this currently just wraps up the original _passed() test but a later patch in the series will reduce this to simply returning a cached internal value, i.e.: _completed(req) { return req->completed; }' This checkin converts almost all _seqno_passed() calls. The only one left is in the semaphore code which still requires seqnos not request structures. For: VIZ-4377 Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Thomas Daniel <Thomas.Daniel@intel.com> [danvet: Drop hunk touching the trace_irq code since I've dropped the patch which converts that, and resolve resulting conflict.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 766cea7472d5..92a0350c1df9 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9742,11 +9742,7 @@ static bool __intel_pageflip_stall_check(struct drm_device *dev,
if (work->flip_ready_vblank == 0) {
if (work->flip_queued_ring) {
- uint32_t s1 = work->flip_queued_ring->get_seqno(
- work->flip_queued_ring, true);
- uint32_t s2 = i915_gem_request_get_seqno(
- work->flip_queued_req);
- if (!i915_seqno_passed(s1, s2))
+ if (!i915_gem_request_completed(work->flip_queued_req, true))
return false;
}