diff options
author | John Harrison <John.C.Harrison@Intel.com> | 2014-11-24 18:49:25 +0000 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-12-03 09:35:14 +0100 |
commit | b793a00a57da8d5057168aace0695a823bbb6e02 (patch) | |
tree | 30397a375d94528b05ef084d58e8911eca4c7a5e /drivers/gpu/drm/i915/i915_drv.h | |
parent | abfe262ae76246434fc427db855d716e575d0c1f (diff) | |
download | lwn-b793a00a57da8d5057168aace0695a823bbb6e02.tar.gz lwn-b793a00a57da8d5057168aace0695a823bbb6e02.zip |
drm/i915: Add helper functions to aid seqno -> request transition
Added helper functions for retrieving the ring and seqno entries from a request
structure. This allows the internal workings of the request structure to be
hidden from code that is using these. It also allows for useful
workarounds/debug code to be added as or when necessary.
Note that it is intended that the majority (if not all) uses of the seqno
accessor will disappear eventually as code is updated to use the request
structure itself rather than working with seqno values.
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.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 36d407848f28..48c0c4a60364 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -2024,6 +2024,18 @@ struct drm_i915_gem_request { void i915_gem_request_free(struct kref *req_ref); +static inline uint32_t +i915_gem_request_get_seqno(struct drm_i915_gem_request *req) +{ + return req ? req->seqno : 0; +} + +static inline struct intel_engine_cs * +i915_gem_request_get_ring(struct drm_i915_gem_request *req) +{ + return req ? req->ring : NULL; +} + static inline void i915_gem_request_reference(struct drm_i915_gem_request *req) { |