]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/exec, drm/xe: Avoid abusing the drm_exec retry pointer
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Wed, 20 May 2026 10:16:15 +0000 (12:16 +0200)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Mon, 25 May 2026 08:45:38 +0000 (10:45 +0200)
commitbba175a2d4be400312a64bd3d1e0481ef28a1681
treea01fd03086a07091d8a2027b7320bcd8609dce6b
parent25331d9d40d093dfe2805ab558e8ad238bd2a2dc
drm/exec, drm/xe: Avoid abusing the drm_exec retry pointer

The xe driver was using the drm_exec retry pointer directly to
restart the locking loop after out-of-memory errors. This is
relying on undocumented behaviour.

Instead add a drm_exec_retry() macro that can be used in this
situation, and that also warns if the struct drm_exec is
not newly (re-)initialized.

Use that macro in xe.

v2:
- Only allow if the drm_exec context is newly initialized.
  (Christian)

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-4-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/drm_exec.c
drivers/gpu/drm/xe/xe_validation.h
include/drm/drm_exec.h