aboutsummaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorGravatar Christian König <christian.koenig@amd.com> 2024-03-12 11:37:58 +0100
committerGravatar Christian König <christian.koenig@amd.com> 2024-03-20 11:18:10 +0100
commit5a95f39d9b214d59cbe742002767737e03d43844 (patch)
tree873148ac9c97fc5d173b98550d7aa591551eeba2 /include/drm
parentdrm/lcdif: Do not disable clocks on already suspended hardware (diff)
downloadlinux-5a95f39d9b214d59cbe742002767737e03d43844.tar.gz
linux-5a95f39d9b214d59cbe742002767737e03d43844.tar.bz2
linux-5a95f39d9b214d59cbe742002767737e03d43844.zip
drm/ttm: warn when resv objs are mixed in a bulk_move
The BOs in a bulk move must share all the same reservation object to make sure that we lock the whole bulk during eviction. Actually document and enforce that with a warning. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240312105555.3065-1-christian.koenig@amd.com
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/ttm/ttm_resource.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_resource.h b/include/drm/ttm/ttm_resource.h
index 7561023db43d..69769355139f 100644
--- a/include/drm/ttm/ttm_resource.h
+++ b/include/drm/ttm/ttm_resource.h
@@ -251,6 +251,9 @@ struct ttm_lru_bulk_move_pos {
*
* Container for the current bulk move state. Should be used with
* ttm_lru_bulk_move_init() and ttm_bo_set_bulk_move().
+ * All BOs in a bulk_move structure need to share the same reservation object to
+ * ensure that the bulk as a whole is locked for eviction even if only one BO of
+ * the bulk is evicted.
*/
struct ttm_lru_bulk_move {
struct ttm_lru_bulk_move_pos pos[TTM_NUM_MEM_TYPES][TTM_MAX_BO_PRIORITY];