diff options
| author | Thomas Hellström <thomas.hellstrom@linux.intel.com> | 2026-05-20 12:16:16 +0200 |
|---|---|---|
| committer | Thomas Hellström <thomas.hellstrom@linux.intel.com> | 2026-05-25 10:45:38 +0200 |
| commit | b34bafc38cd9573694f5049bb308387ba8d8c042 (patch) | |
| tree | 13da0e33d76231269304beb9dd4927542ac2f7c0 /include/drm/drm_exec.h | |
| parent | bba175a2d4be400312a64bd3d1e0481ef28a1681 (diff) | |
| download | linux-next-b34bafc38cd9573694f5049bb308387ba8d8c042.tar.gz linux-next-b34bafc38cd9573694f5049bb308387ba8d8c042.zip | |
drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticket
Drivers were accessing this drm_exec member directly.
While that may seem harmless, it will require action if
the drm_exec utility is made a subclass of a dma-resv transaction
utility as outlined in the cover-letter.
Provide an accessor, drm_exec_ticket() to avoid that.
v2:
- Fix amdgpu compile error (Intel CI)
- Update the commit message.
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patch.msgid.link/20260520101616.41284-5-thomas.hellstrom@linux.intel.com
Diffstat (limited to 'include/drm/drm_exec.h')
| -rw-r--r-- | include/drm/drm_exec.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/drm/drm_exec.h b/include/drm/drm_exec.h index 99c7e1bb3c5b..8725ba92ff91 100644 --- a/include/drm/drm_exec.h +++ b/include/drm/drm_exec.h @@ -161,6 +161,17 @@ static inline bool drm_exec_is_contended(struct drm_exec *exec) goto *__drm_exec_retry_ptr; \ } while (0) +/** + * drm_exec_ticket - return the ww_acquire_ctx for this exec context + * @exec: drm_exec object + * + * Return: Pointer to the ww_acquire_ctx embedded in @exec. + */ +static inline struct ww_acquire_ctx *drm_exec_ticket(struct drm_exec *exec) +{ + return &exec->ticket; +} + void drm_exec_init(struct drm_exec *exec, u32 flags, unsigned nr); void drm_exec_fini(struct drm_exec *exec); bool drm_exec_cleanup(struct drm_exec *exec); |
