From 4f8be4fbf73f9a3565d88d8169004fb081267406 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 23 Dec 2024 16:52:24 +0100 Subject: [PATCH] 5.15-stable patches added patches: drm-amdgpu-handle-null-bo-tbo.resource-again-in-amdgpu_vm_bo_update.patch --- ...esource-again-in-amdgpu_vm_bo_update.patch | 42 +++++++++++++++++++ queue-5.15/series | 1 + 2 files changed, 43 insertions(+) create mode 100644 queue-5.15/drm-amdgpu-handle-null-bo-tbo.resource-again-in-amdgpu_vm_bo_update.patch diff --git a/queue-5.15/drm-amdgpu-handle-null-bo-tbo.resource-again-in-amdgpu_vm_bo_update.patch b/queue-5.15/drm-amdgpu-handle-null-bo-tbo.resource-again-in-amdgpu_vm_bo_update.patch new file mode 100644 index 00000000000..c7840cb39c0 --- /dev/null +++ b/queue-5.15/drm-amdgpu-handle-null-bo-tbo.resource-again-in-amdgpu_vm_bo_update.patch @@ -0,0 +1,42 @@ +From 85230ee36d88e7a09fb062d43203035659dd10a5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michel=20D=C3=A4nzer?= +Date: Tue, 17 Dec 2024 18:22:56 +0100 +Subject: drm/amdgpu: Handle NULL bo->tbo.resource (again) in amdgpu_vm_bo_update +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Michel Dänzer + +commit 85230ee36d88e7a09fb062d43203035659dd10a5 upstream. + +Third time's the charm, I hope? + +Fixes: d3116756a710 ("drm/ttm: rename bo->mem and make it a pointer") +Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3837 +Reviewed-by: Christian König +Signed-off-by: Michel Dänzer +Signed-off-by: Alex Deucher +(cherry picked from commit 695c2c745e5dff201b75da8a1d237ce403600d04) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +@@ -1958,10 +1958,9 @@ int amdgpu_vm_bo_update(struct amdgpu_de + * next command submission. + */ + if (bo && bo->tbo.base.resv == vm->root.bo->tbo.base.resv) { +- uint32_t mem_type = bo->tbo.resource->mem_type; +- +- if (!(bo->preferred_domains & +- amdgpu_mem_type_to_domain(mem_type))) ++ if (bo->tbo.resource && ++ !(bo->preferred_domains & ++ amdgpu_mem_type_to_domain(bo->tbo.resource->mem_type))) + amdgpu_vm_bo_evicted(&bo_va->base); + else + amdgpu_vm_bo_idle(&bo_va->base); diff --git a/queue-5.15/series b/queue-5.15/series index 8d419521311..378304ed91b 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -53,3 +53,4 @@ of-fix-error-path-in-of_parse_phandle_with_args_map.patch of-fix-refcount-leakage-for-of-node-returned-by-__of_get_dma_parent.patch ceph-validate-snapdirname-option-length-when-mounting.patch epoll-add-synchronous-wakeup-support-for-ep_poll_callback.patch +drm-amdgpu-handle-null-bo-tbo.resource-again-in-amdgpu_vm_bo_update.patch -- 2.47.2