]> git.itanic.dy.fi Git - linux-stable/commitdiff
nouveau: reset the bo resource bus info after an eviction
authorDave Airlie <airlied@redhat.com>
Mon, 11 Mar 2024 07:20:37 +0000 (17:20 +1000)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:17:31 +0000 (18:17 -0400)
[ Upstream commit f35c9af45ea7a4b1115b193d84858b14d13517fc ]

Later attempts to refault the bo won't happen and the whole
GPU does to lunch. I think Christian's refactoring of this
code out to the driver broke this not very well tested path.

Fixes: 141b15e59175 ("drm/nouveau: move io_reserve_lru handling into the driver v5")
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240311072037.287905-1-airlied@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/nouveau/nouveau_bo.c

index 00cc7d1abaa39b7330f4ade2551d881f649cd255..5d8ee17295424b0a7875eb471fcb75f6b93ef14f 100644 (file)
@@ -1264,6 +1264,8 @@ nouveau_ttm_io_mem_reserve(struct ttm_device *bdev, struct ttm_resource *reg)
                        drm_vma_node_unmap(&nvbo->bo.base.vma_node,
                                           bdev->dev_mapping);
                        nouveau_ttm_io_mem_free_locked(drm, nvbo->bo.resource);
+                       nvbo->bo.resource->bus.offset = 0;
+                       nvbo->bo.resource->bus.addr = NULL;
                        goto retry;
                }