summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ttm/ttm_resource.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2024-03-12 11:37:58 +0100
committerChristian König <christian.koenig@amd.com>2024-03-20 11:18:10 +0100
commit5a95f39d9b214d59cbe742002767737e03d43844 (patch)
tree873148ac9c97fc5d173b98550d7aa591551eeba2 /drivers/gpu/drm/ttm/ttm_resource.c
parent172695f145fb4798ab605e8a73f6e87711930124 (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 'drivers/gpu/drm/ttm/ttm_resource.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_resource.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c
index 65155f2013ca..be8d286513f9 100644
--- a/drivers/gpu/drm/ttm/ttm_resource.c
+++ b/drivers/gpu/drm/ttm/ttm_resource.c
@@ -105,6 +105,7 @@ static void ttm_lru_bulk_move_add(struct ttm_lru_bulk_move *bulk,
pos->first = res;
pos->last = res;
} else {
+ WARN_ON(pos->first->bo->base.resv != res->bo->base.resv);
ttm_lru_bulk_move_pos_tail(pos, res);
}
}