Skip to content

Commit

Permalink
drm/amdgpu: fix dropped backing store handling in amdgpu_dma_buf_move…
Browse files Browse the repository at this point in the history
…_notify

[ Upstream commit fc74881 ]

bo->tbo.resource can now be NULL.

Signed-off-by: Christian König <christian.koenig@amd.com>
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1811
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211210083927.1754-1-christian.koenig@amd.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Christian König authored and gregkh committed Jan 11, 2022
1 parent 4ed66cd commit 31d95ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
Expand Up @@ -384,7 +384,7 @@ amdgpu_dma_buf_move_notify(struct dma_buf_attachment *attach)
struct amdgpu_vm_bo_base *bo_base;
int r;

if (bo->tbo.resource->mem_type == TTM_PL_SYSTEM)
if (!bo->tbo.resource || bo->tbo.resource->mem_type == TTM_PL_SYSTEM)
return;

r = ttm_bo_validate(&bo->tbo, &placement, &ctx);
Expand Down

0 comments on commit 31d95ff

Please sign in to comment.