Skip to contentSkip to conversation

nouveau: reset the bo resource bus info after an eviction

PATCH In review Dave Airlie 3 participants 3 messages Mar 11, 2024

Subsystems (3)
lore
Share & tools
lore

Dave Airlie

author maintainer
#0 lore raw

PATCH 1/1 nouveau: reset the bo resource bus info after an eviction

From: Dave Airlie <[email protected]>

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 <[email protected]>
---
 drivers/gpu/drm/nouveau/nouveau_bo.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/nouveau/nouveau_bo.c +2 -0
index c6c544d7c911..a4e8f625fce6 100644
@@ -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;
 		}
 
Signature · 1 line
2.43.2
#1 lore raw
Quoted 2 lines · Dave Airlie

Later attempts to refault the bo won't happen and the whole GPU does to lunch. I think Christian's refactoring of this

Typo: I think you meant "goes to lunch".

Acked-by on v1 1/1
#2 lore raw
In reply to Dave Airlie

Am 11.03.24 um 08:20 schrieb Dave Airlie:

Quoted 5 lines

From: Dave Airlie <[email protected]>

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.

Quoted 4 lines
Fixes 141b15e59175 ("drm/nouveau: move io_reserve_lru handling into the driver v5")
Cc Christian König <[email protected]>
Quoted 17 lines
---
  drivers/gpu/drm/nouveau/nouveau_bo.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/gpu/drm/nouveau/nouveau_bo.c +2 -0
index c6c544d7c911..a4e8f625fce6 100644
@@ -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;
  		}