diff options
author | Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> | 2024-05-31 18:12:30 +0200 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2024-05-31 21:59:23 +0200 |
commit | 877517f2dcba58867b64e3e0c616f26c62d4a8db (patch) | |
tree | 94346b59e5b1d07ee7d79a6bd1a5ec16175b9ac3 /drivers/gpu/drm/xe/xe_lrc.h | |
parent | drm/xe: Fix NULL ptr dereference in devcoredump (diff) | |
download | linux-877517f2dcba58867b64e3e0c616f26c62d4a8db.tar.xz linux-877517f2dcba58867b64e3e0c616f26c62d4a8db.zip |
drm/xe: Add kernel-doc to some xe_lrc interfaces
Add kernel-doc to xe_lrc_create/destroy and xe_lrc_get/put
interfaces.
v2: Fix kernel-doc for xe_lrc_create(), drop Fixes tag.
(Matt Brost, Michal Wajdeczko)
Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240531161230.32317-1-niranjana.vishwanathapura@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_lrc.h')
-rw-r--r-- | drivers/gpu/drm/xe/xe_lrc.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_lrc.h b/drivers/gpu/drm/xe/xe_lrc.h index ebe0e362e434..882c3437ba5c 100644 --- a/drivers/gpu/drm/xe/xe_lrc.h +++ b/drivers/gpu/drm/xe/xe_lrc.h @@ -26,12 +26,25 @@ struct xe_lrc *xe_lrc_create(struct xe_hw_engine *hwe, struct xe_vm *vm, u32 ring_size); void xe_lrc_destroy(struct kref *ref); +/** + * xe_lrc_get - Get reference to the LRC + * @lrc: Logical Ring Context + * + * Increment reference count of @lrc + */ static inline struct xe_lrc *xe_lrc_get(struct xe_lrc *lrc) { kref_get(&lrc->refcount); return lrc; } +/** + * xe_lrc_put - Put reference of the LRC + * @lrc: Logical Ring Context + * + * Decrement reference count of @lrc, call xe_lrc_destroy when + * reference count reaches 0. + */ static inline void xe_lrc_put(struct xe_lrc *lrc) { kref_put(&lrc->refcount, xe_lrc_destroy); |