aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorJohn Harrison <John.C.Harrison@Intel.com>2014-11-24 13:49:26 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-12-03 03:35:14 -0500
commit97b2a6a10a1aef6f32832fcbc9d6a27650354904 (patch)
tree9099e2821f3664e9949b3c338f9f8e0e8df786db /drivers/gpu/drm/i915/i915_drv.h
parentb793a00a57da8d5057168aace0695a823bbb6e02 (diff)
drm/i915: Replace last_[rwf]_seqno with last_[rwf]_req
The object structure contains the last read, write and fenced seqno values for use in syncrhonisation operations. These have now been replaced with their request structure counterparts. Note that to ensure that objects do not end up with dangling pointers, the assignments of last_*_req include reference count updates. Thus a request cannot be freed if an object is still hanging on to it for any reason. v2: Corrected 'last_rendering_' to 'last_read_' in a number of comments that did not get updated when 'last_rendering_seqno' became 'last_read|write_seqno' several millenia ago. For: VIZ-4377 Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Thomas Daniel <Thomas.Daniel@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 48c0c4a60364..4924f1d3d4b4 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1944,10 +1944,10 @@ struct drm_i915_gem_object {
1944 struct intel_engine_cs *ring; 1944 struct intel_engine_cs *ring;
1945 1945
1946 /** Breadcrumb of last rendering to the buffer. */ 1946 /** Breadcrumb of last rendering to the buffer. */
1947 uint32_t last_read_seqno; 1947 struct drm_i915_gem_request *last_read_req;
1948 uint32_t last_write_seqno; 1948 struct drm_i915_gem_request *last_write_req;
1949 /** Breadcrumb of last fenced GPU access to the buffer. */ 1949 /** Breadcrumb of last fenced GPU access to the buffer. */
1950 uint32_t last_fenced_seqno; 1950 struct drm_i915_gem_request *last_fenced_req;
1951 1951
1952 /** Current tiling stride for the object, if it's tiled. */ 1952 /** Current tiling stride for the object, if it's tiled. */
1953 uint32_t stride; 1953 uint32_t stride;
@@ -1986,9 +1986,10 @@ void i915_gem_track_fb(struct drm_i915_gem_object *old,
1986 * The request queue allows us to note sequence numbers that have been emitted 1986 * The request queue allows us to note sequence numbers that have been emitted
1987 * and may be associated with active buffers to be retired. 1987 * and may be associated with active buffers to be retired.
1988 * 1988 *
1989 * By keeping this list, we can avoid having to do questionable 1989 * By keeping this list, we can avoid having to do questionable sequence
1990 * sequence-number comparisons on buffer last_rendering_seqnos, and associate 1990 * number comparisons on buffer last_read|write_seqno. It also allows an
1991 * an emission time with seqnos for tracking how far ahead of the GPU we are. 1991 * emission time to be associated with the request for tracking how far ahead
1992 * of the GPU the submission is.
1992 */ 1993 */
1993struct drm_i915_gem_request { 1994struct drm_i915_gem_request {
1994 struct kref ref; 1995 struct kref ref;