drm/ttm: fix pipelined gutting for evictions v2
Subsystems (3)
PATCH 1/1 drm/ttm: fix pipelined gutting for evictions v2
We can't pipeline that during eviction because the memory needs to be available immediately.
v2: fix how we cleanup the BOs resources
--- drivers/gpu/drm/ttm/ttm_bo.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/ttm/ttm_bo.c +6 -2
@@ -652,8 +652,12 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo, placement.num_busy_placement =0 ; bdev->driver->evict_flags (bo, &placement); -if (!placement.num_placement && !placement.num_busy_placement) -return ttm_bo_pipeline_gutting (bo); +if (!placement.num_placement && !placement.num_busy_placement) { +ttm_bo_wait (bo, false, false); + +ttm_bo_cleanup_memtype_use (bo); +return 0 ; + } evict_mem = bo->mem; evict_mem.mm_node =NULL ;
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Am 2020-07-24 um 7:56 a.m. schrieb Christian König:
Quoted 6 lines
We can't pipeline that during eviction because the memory needs to be available immediately.
v2: fix how we cleanup the BOs resources
Signed-off-by Christian König <[email protected]>
It would be good to get a Tested-by from Alex as well.
Thanks,
Felix
Quoted 13 lines
--- drivers/gpu/drm/ttm/ttm_bo.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)drivers/gpu/drm/ttm/ttm_bo.c +0
-1@@ -652,8 +652,12 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo, placement.num_busy_placement =0 ; bdev->driver->evict_flags (bo, &placement); -if (!placement.num_placement && !placement.num_busy_placement)
drivers/gpu/drm/ttm/ttm_bo.c static int ttm_bo_evict(struct ttm_buffer_object *bo, · line 663
Quoted 10 lines
drivers/gpu/drm/ttm/ttm_bo.c +6
-1-return ttm_bo_pipeline_gutting (bo); +if (!placement.num_placement && !placement.num_busy_placement) { +ttm_bo_wait (bo, false, false); + +ttm_bo_cleanup_memtype_use (bo); +return 0 ; + } evict_mem = bo->mem; evict_mem.mm_node =NULL ;
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Sierra Guiza, Alejandro (Alex)
Tested-byQuoted 6 lines · Felix Kuehling
Am 2020-07-24 um 7:56 a.m. schrieb Christian König:
Quoted 5 lines
We can't pipeline that during eviction because the memory needs to be available immediately.
v2: fix how we cleanup the BOs resources
Quoted 7 lines
Quoted 1 line
Signed-off-by Christian König <[email protected]>Reviewed-by Felix Kuehling <[email protected]>It would be good to get a Tested-by from Alex as well.
Thanks,
Felix
Regards,
Alex Sierra
Quoted 22 lines
Quoted 22 lines
--- drivers/gpu/drm/ttm/ttm_bo.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)drivers/gpu/drm/ttm/ttm_bo.c +6
-2@@ -652,8 +652,12 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo, placement.num_busy_placement =0 ; bdev->driver->evict_flags (bo, &placement); -if (!placement.num_placement && !placement.num_busy_placement) -return ttm_bo_pipeline_gutting (bo); +if (!placement.num_placement && !placement.num_busy_placement) { +ttm_bo_wait (bo, false, false); + +ttm_bo_cleanup_memtype_use (bo); +return 0 ; + }
Quoted 2 lines
drivers/gpu/drm/ttm/ttm_bo.c static int ttm_bo_evict(struct ttm_buffer_object *bo, · line 663
Quoted 2 lines
drivers/gpu/drm/ttm/ttm_bo.c +0
-0evict_mem = bo->mem; evict_mem.mm_node =NULL ;
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel