diff options
author | Ben Widawsky <ben@bwidawsk.net> | 2012-04-11 14:18:21 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-12 15:14:14 -0400 |
commit | 1500f7ea06858819abcf8eec8f952e2f9281c610 (patch) | |
tree | 2e29c9de3db986d3e10a6317973c1db6bd3e8bf7 /drivers/gpu | |
parent | e3a5a2250aa9e67d169f33e6c91dc7604cab513b (diff) |
drm/i915: hide (seqno-1) in ringbuffer code
Waiting for seqno-1 in our object synchronization code is an
implementation detail given how we've decided to do the waits within the
rest of our code.
Requested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 0115b12df573..71934dd0ee43 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -2002,7 +2002,7 @@ i915_gem_object_sync(struct drm_i915_gem_object *obj, | |||
2002 | } | 2002 | } |
2003 | 2003 | ||
2004 | 2004 | ||
2005 | ret = to->sync_to(to, from, seqno - 1); | 2005 | ret = to->sync_to(to, from, seqno); |
2006 | if (!ret) | 2006 | if (!ret) |
2007 | from->sync_seqno[idx] = seqno; | 2007 | from->sync_seqno[idx] = seqno; |
2008 | 2008 | ||
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index dfdb613752c5..467b3319e4bd 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -482,6 +482,12 @@ intel_ring_sync(struct intel_ring_buffer *waiter, | |||
482 | MI_SEMAPHORE_COMPARE | | 482 | MI_SEMAPHORE_COMPARE | |
483 | MI_SEMAPHORE_REGISTER; | 483 | MI_SEMAPHORE_REGISTER; |
484 | 484 | ||
485 | /* Throughout all of the GEM code, seqno passed implies our current | ||
486 | * seqno is >= the last seqno executed. However for hardware the | ||
487 | * comparison is strictly greater than. | ||
488 | */ | ||
489 | seqno -= 1; | ||
490 | |||
485 | ret = intel_ring_begin(waiter, 4); | 491 | ret = intel_ring_begin(waiter, 4); |
486 | if (ret) | 492 | if (ret) |
487 | return ret; | 493 | return ret; |