aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorRodrigo Vivi <rodrigo.vivi@intel.com>2014-06-30 12:51:11 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-07-07 16:02:49 -0400
commitddd4dbc6c16e4719841447348e6b5ec3541c8f68 (patch)
treedcb78680b82d33210b3d496c6491bad3215366f4 /drivers/gpu/drm/i915/i915_gem.c
parentf7b64236854b0862e9967090f227cf08d81c71f4 (diff)
drm/i915: Updating comments.
ring index calculation table was out of date after other rings were added, although the formula is flexible and scale when adding new rings. So this patch just update the comments and add a brief explanation why to use sync_seqno[ring index]. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index f6d123828926..e85c85c0333e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2842,6 +2842,8 @@ i915_gem_object_sync(struct drm_i915_gem_object *obj,
2842 idx = intel_ring_sync_index(from, to); 2842 idx = intel_ring_sync_index(from, to);
2843 2843
2844 seqno = obj->last_read_seqno; 2844 seqno = obj->last_read_seqno;
2845 /* Optimization: Avoid semaphore sync when we are sure we already
2846 * waited for an object with higher seqno */
2845 if (seqno <= from->semaphore.sync_seqno[idx]) 2847 if (seqno <= from->semaphore.sync_seqno[idx])
2846 return 0; 2848 return 0;
2847 2849