diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-03-27 14:22:11 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-03-30 20:20:34 +0300 |
commit | 229007e02d697b0662f85378aae53531b0dfea05 (patch) | |
tree | ef42fcaa28cedf8c8511df5f15b61cef61d85a03 /drivers/gpu/drm/i915/i915_active.h | |
parent | d75a92a81467933404547edf47ec63d58d7e2b2f (diff) | |
download | linux-229007e02d697b0662f85378aae53531b0dfea05.tar.xz |
drm/i915: Wrap i915_active in a simple kreffed struct
For conveniences of callers that just want to use an i915_active to
track a wide array of concurrent timelines, wrap the base i915_active
struct inside a kref. This i915_active will self-destruct after use.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200327112212.16046-2-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_active.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_active.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_active.h b/drivers/gpu/drm/i915/i915_active.h index 4f9aa7bab514..b526d310a585 100644 --- a/drivers/gpu/drm/i915/i915_active.h +++ b/drivers/gpu/drm/i915/i915_active.h @@ -225,4 +225,8 @@ void i915_request_add_active_barriers(struct i915_request *rq); void i915_active_print(struct i915_active *ref, struct drm_printer *m); void i915_active_unlock_wait(struct i915_active *ref); +struct i915_active *i915_active_create(void); +struct i915_active *i915_active_get(struct i915_active *ref); +void i915_active_put(struct i915_active *ref); + #endif /* _I915_ACTIVE_H_ */ |