drm/ttm: fix logic inversion in ttm_eu_reserve_buffers
Subsystems (3)
PATCH 1/1 drm/ttm: fix logic inversion in ttm_eu_reserve_buffers
That should have been max, not min.
Signed-off-by Christian König <[email protected]>
Fixes 73511edf8b19 ("dma-buf: specify usage while adding fences to dma_resv obj v7")
--- drivers/gpu/drm/ttm/ttm_execbuf_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/ttm/ttm_execbuf_util.c +1 -1
@@ -101,7 +101,7 @@ int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket,continue ; } - num_fences =min (entry->num_shared,1u ); + num_fences =max (entry->num_shared,1u );if (!ret) { ret =dma_resv_reserve_fences (bo->base.resv, num_fences);
Signature · 1 line
2.25.1
Quoted 4 lines · Christian König
That should have been max, not min.
Signed-off-by Christian König <[email protected]>Fixes 73511edf8b19 ("dma-buf: specify usage while adding fences to dma_resv obj v7")
Should that rather be:
Fixes c8d4c18bfbc4 ("dma-buf/drivers: make reserving a shared slot mandatory v4")
Reviewed-by Matthew Auld <[email protected]>
Quoted 17 lines
--- drivers/gpu/drm/ttm/ttm_execbuf_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/ttm/ttm_execbuf_util.c +1
-1@@ -101,7 +101,7 @@ int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket,continue ; } - num_fences =min (entry->num_shared,1u ); + num_fences =max (entry->num_shared,1u );if (!ret) { ret =dma_resv_reserve_fences (bo->base.resv, num_fences);
Am 11.04.22 um 15:55 schrieb Matthew Auld:
Quoted 9 lines · Christian König
Quoted 4 lines
That should have been max, not min.
Signed-off-by Christian König <[email protected]>Fixes 73511edf8b19 ("dma-buf: specify usage while adding fences to dma_resv obj v7")Should that rather be:
Fixes c8d4c18bfbc4 ("dma-buf/drivers: make reserving a shared slot mandatory v4")
Ah, yes good point. Thanks.
Quoted 20 lines
Reviewed-by Matthew Auld <[email protected]>Quoted 17 lines
---
drivers/gpu/drm/ttm/ttm_execbuf_util.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/ttm/ttm_execbuf_util.c +1
-0@@ -101,7 +101,7 @@ int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket, continue; } - num_fences = min(entry->num_shared, 1u); + num_fences = max(entry->num_shared, 1u); if (!ret) { ret = dma_resv_reserve_fences(bo->base.resv,
num_fences);