]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/ttm: Add an allocation flag to propagate -ENOSPC on OOM
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Mon, 20 Oct 2025 11:54:11 +0000 (12:54 +0100)
committerTvrtko Ursulin <tursulin@ursulin.net>
Fri, 31 Oct 2025 09:27:28 +0000 (09:27 +0000)
commit402b3a865090578f9245115e17ee230e01daf60e
tree4f76b2b6355cdac416061df820ddc5b07fa7a092
parentccbadd9eea62aac0278d22a61a15a1d8f4df9a16
drm/ttm: Add an allocation flag to propagate -ENOSPC on OOM

Some graphics APIs differentiate between out-of-graphics-memory and
out-of-host-memory (system memory). Add a device init flag to have -ENOSPC
propagated from the resource managers instead of being converted to
-ENOMEM, to aid driver stacks in determining what error code to return or
whether corrective action can be taken at the driver level.

Co-developed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
Link: https://lore.kernel.org/r/20251020115411.36818-7-tvrtko.ursulin@igalia.com
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_device.c
include/drm/ttm/ttm_allocation.h
include/drm/ttm/ttm_device.h