mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 17:25:38 +00:00
drm/amdgpu: Handle NULL bo->tbo.resource (again) in amdgpu_vm_bo_update
commit85230ee36d
upstream. Third time's the charm, I hope? Fixes:d3116756a7
("drm/ttm: rename bo->mem and make it a pointer") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3837 Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Michel Dänzer <mdaenzer@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 695c2c745e5dff201b75da8a1d237ce403600d04) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
71a7e2f5b6
commit
bd050bb576
@ -1060,10 +1060,9 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev, struct amdgpu_bo_va *bo_va,
|
|||||||
* next command submission.
|
* next command submission.
|
||||||
*/
|
*/
|
||||||
if (bo && bo->tbo.base.resv == vm->root.bo->tbo.base.resv) {
|
if (bo && bo->tbo.base.resv == vm->root.bo->tbo.base.resv) {
|
||||||
uint32_t mem_type = bo->tbo.resource->mem_type;
|
if (bo->tbo.resource &&
|
||||||
|
!(bo->preferred_domains &
|
||||||
if (!(bo->preferred_domains &
|
amdgpu_mem_type_to_domain(bo->tbo.resource->mem_type)))
|
||||||
amdgpu_mem_type_to_domain(mem_type)))
|
|
||||||
amdgpu_vm_bo_evicted(&bo_va->base);
|
amdgpu_vm_bo_evicted(&bo_va->base);
|
||||||
else
|
else
|
||||||
amdgpu_vm_bo_idle(&bo_va->base);
|
amdgpu_vm_bo_idle(&bo_va->base);
|
||||||
|
Loading…
Reference in New Issue
Block a user