* [PATCH] drm/ttm: fix logic inversion in ttm_eu_reserve_buffers
@ 2022-04-11 13:45 Christian König
2022-04-11 13:55 ` Matthew Auld
0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2022-04-11 13:45 UTC (permalink / raw)
To: matthew.auld, daniel, dri-devel; +Cc: Christian König
That should have been max, not min.
Signed-off-by: Christian König <christian.koenig@amd.com>
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(-)
diff --git a/drivers/gpu/drm/ttm/ttm_execbuf_util.c b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
index 0eb995d25df1..dbee34a058df 100644
--- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c
+++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
@@ -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);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/ttm: fix logic inversion in ttm_eu_reserve_buffers
2022-04-11 13:45 [PATCH] drm/ttm: fix logic inversion in ttm_eu_reserve_buffers Christian König
@ 2022-04-11 13:55 ` Matthew Auld
2022-04-11 13:58 ` Christian König
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Auld @ 2022-04-11 13:55 UTC (permalink / raw)
To: Christian König, daniel, dri-devel; +Cc: Christian König
On 11/04/2022 14:45, Christian König wrote:
> That should have been max, not min.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> 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 <matthew.auld@intel.com>
> ---
> drivers/gpu/drm/ttm/ttm_execbuf_util.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_execbuf_util.c b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
> index 0eb995d25df1..dbee34a058df 100644
> --- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c
> +++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
> @@ -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);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/ttm: fix logic inversion in ttm_eu_reserve_buffers
2022-04-11 13:55 ` Matthew Auld
@ 2022-04-11 13:58 ` Christian König
0 siblings, 0 replies; 3+ messages in thread
From: Christian König @ 2022-04-11 13:58 UTC (permalink / raw)
To: Matthew Auld, daniel, dri-devel; +Cc: Christian König
Am 11.04.22 um 15:55 schrieb Matthew Auld:
> On 11/04/2022 14:45, Christian König wrote:
>> That should have been max, not min.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> 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.
>
> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
>
>> ---
>> drivers/gpu/drm/ttm/ttm_execbuf_util.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/ttm/ttm_execbuf_util.c
>> b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
>> index 0eb995d25df1..dbee34a058df 100644
>> --- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c
>> +++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
>> @@ -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);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-11 13:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11 13:45 [PATCH] drm/ttm: fix logic inversion in ttm_eu_reserve_buffers Christian König
2022-04-11 13:55 ` Matthew Auld
2022-04-11 13:58 ` Christian König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).