Dave Airlie
2024-Mar-11 07:20 UTC
[PATCH] nouveau: reset the bo resource bus info after an eviction
From: Dave Airlie <airlied at redhat.com>
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 at amd.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
drivers/gpu/drm/nouveau/nouveau_bo.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c
b/drivers/gpu/drm/nouveau/nouveau_bo.c
index c6c544d7c911..a4e8f625fce6 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -1271,6 +1271,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;
}
--
2.43.2
Timur Tabi
2024-Mar-11 13:02 UTC
[PATCH] nouveau: reset the bo resource bus info after an eviction
On Mon, 2024-03-11 at 17:20 +1000, Dave Airlie wrote:> Later attempts to refault the bo won't happen and the whole > GPU does to lunch. I think Christian's refactoring of thisTypo: I think you meant "goes to lunch".
Christian König
2024-Mar-11 13:51 UTC
[PATCH] nouveau: reset the bo resource bus info after an eviction
Am 11.03.24 um 08:20 schrieb Dave Airlie:> From: Dave Airlie <airlied at redhat.com> > > 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.Yeah that is certainly possible.> > Fixes: 141b15e59175 ("drm/nouveau: move io_reserve_lru handling into the driver v5") > Cc: Christian K?nig <christian.koenig at amd.com> > Signed-off-by: Dave Airlie <airlied at redhat.com>Acked-by: Christian K?nig <christian.koenig at amd.com>> --- > drivers/gpu/drm/nouveau/nouveau_bo.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c > index c6c544d7c911..a4e8f625fce6 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_bo.c > +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c > @@ -1271,6 +1271,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; > } >