aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu/drm/ttm/ttm_bo_util.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2021-06-07 19:56:32 +0200
committerChristian König <christian.koenig@amd.com>2021-06-07 20:04:16 +0200
commit72db41c9336d155d441541e9010c868e3cf62451 (patch)
tree0dd7b3210434ee20bac3246835d1cf356f4ec439 /drivers/gpu/drm/ttm/ttm_bo_util.c
parentdrm/ttm: fix access to uninitialized variable. (diff)
downloadwireguard-linux-72db41c9336d155d441541e9010c868e3cf62451.tar.xz
wireguard-linux-72db41c9336d155d441541e9010c868e3cf62451.zip
drm/ttm: fix warning after moving resource to ghost obj
After we moved the resource to the ghost the bo->resource pointer needs to be reset since the owner of the resource is now the ghost. 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/20210607175737.1405-1-christian.koenig@amd.com
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo_util.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo_util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 1d25994411a0..9be6a10a5873 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -507,6 +507,7 @@ static int ttm_bo_move_to_ghost(struct ttm_buffer_object *bo,
ghost_obj->ttm = NULL;
else
bo->ttm = NULL;
+ bo->resource = NULL;
dma_resv_unlock(&ghost_obj->base._resv);
ttm_bo_put(ghost_obj);