linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] drm/syncobj: Fix sync syncobj issue
@ 2022-07-07 10:29 jie1zhan
  2022-07-12 10:26 ` Christian König
  0 siblings, 1 reply; 6+ messages in thread
From: jie1zhan @ 2022-07-07 10:29 UTC (permalink / raw)
  To: broonie, dri-devel-bounces, dri-devel
  Cc: Christian.Koenig, Vijendar.Mukunda, Basavaraj.Hiregoudar,
	Sunil-kumar.Dommati, ajitkumar.pandey, lucas.demarchi,
	nirmoy.das, lionel.g.landwerlin, jie1zhan, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
	open list

enable signaling after flatten dma_fence_chains on transfer

Signed-off-by: jie1zhan <jesse.zhang@amd.com>
---
 drivers/gpu/drm/drm_syncobj.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index 7e48dcd1bee4..0d9d3577325f 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -920,6 +920,7 @@ static int drm_syncobj_transfer_to_timeline(struct drm_file *file_private,
 	if (ret)
 		goto err_free_fence;
 
+	dma_fence_enable_sw_signaling(fence);
 	chain = dma_fence_chain_alloc();
 	if (!chain) {
 		ret = -ENOMEM;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/syncobj: Fix sync syncobj issue
  2022-07-07 10:29 [PATCH v2] drm/syncobj: Fix sync syncobj issue jie1zhan
@ 2022-07-12 10:26 ` Christian König
  2022-07-12 14:22   ` Lionel Landwerlin
  2022-07-13  8:42   ` Das, Nirmoy
  0 siblings, 2 replies; 6+ messages in thread
From: Christian König @ 2022-07-12 10:26 UTC (permalink / raw)
  To: jie1zhan, broonie, dri-devel-bounces, dri-devel
  Cc: Vijendar.Mukunda, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	ajitkumar.pandey, lucas.demarchi, nirmoy.das,
	lionel.g.landwerlin, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, open list

Ping to the Intel guys here. Especially Lucas/Nirmoy/Lionel.

IIRC you stumbled over that problem as well, have you found any solution?

Regards,
Christian.

Am 07.07.22 um 12:29 schrieb jie1zhan:
> enable signaling after flatten dma_fence_chains on transfer
>
> Signed-off-by: jie1zhan <jesse.zhang@amd.com>
> ---
>   drivers/gpu/drm/drm_syncobj.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
> index 7e48dcd1bee4..0d9d3577325f 100644
> --- a/drivers/gpu/drm/drm_syncobj.c
> +++ b/drivers/gpu/drm/drm_syncobj.c
> @@ -920,6 +920,7 @@ static int drm_syncobj_transfer_to_timeline(struct drm_file *file_private,
>   	if (ret)
>   		goto err_free_fence;
>   
> +	dma_fence_enable_sw_signaling(fence);
>   	chain = dma_fence_chain_alloc();
>   	if (!chain) {
>   		ret = -ENOMEM;


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/syncobj: Fix sync syncobj issue
  2022-07-12 10:26 ` Christian König
@ 2022-07-12 14:22   ` Lionel Landwerlin
  2022-07-12 14:57     ` Christian König
  2022-07-13  8:42   ` Das, Nirmoy
  1 sibling, 1 reply; 6+ messages in thread
From: Lionel Landwerlin @ 2022-07-12 14:22 UTC (permalink / raw)
  To: Christian König, jie1zhan, broonie, dri-devel-bounces, dri-devel
  Cc: Vijendar.Mukunda, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	ajitkumar.pandey, lucas.demarchi, nirmoy.das, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
	open list

I'll let Lucas comment. I've only looked a little at it.
 From what I remember just enabling sw_signaling was enough to fix the 
issue.

-Lionel

On 12/07/2022 13:26, Christian König wrote:
> Ping to the Intel guys here. Especially Lucas/Nirmoy/Lionel.
>
> IIRC you stumbled over that problem as well, have you found any solution?
>
> Regards,
> Christian.
>
> Am 07.07.22 um 12:29 schrieb jie1zhan:
>> enable signaling after flatten dma_fence_chains on transfer
>>
>> Signed-off-by: jie1zhan <jesse.zhang@amd.com>
>> ---
>>   drivers/gpu/drm/drm_syncobj.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/drm_syncobj.c 
>> b/drivers/gpu/drm/drm_syncobj.c
>> index 7e48dcd1bee4..0d9d3577325f 100644
>> --- a/drivers/gpu/drm/drm_syncobj.c
>> +++ b/drivers/gpu/drm/drm_syncobj.c
>> @@ -920,6 +920,7 @@ static int 
>> drm_syncobj_transfer_to_timeline(struct drm_file *file_private,
>>       if (ret)
>>           goto err_free_fence;
>>   +    dma_fence_enable_sw_signaling(fence);
>>       chain = dma_fence_chain_alloc();
>>       if (!chain) {
>>           ret = -ENOMEM;
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/syncobj: Fix sync syncobj issue
  2022-07-12 14:22   ` Lionel Landwerlin
@ 2022-07-12 14:57     ` Christian König
  0 siblings, 0 replies; 6+ messages in thread
From: Christian König @ 2022-07-12 14:57 UTC (permalink / raw)
  To: Lionel Landwerlin, jie1zhan, broonie, dri-devel-bounces, dri-devel
  Cc: Vijendar.Mukunda, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	ajitkumar.pandey, lucas.demarchi, nirmoy.das, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
	open list

Yeah, adding dma_fence_enable_sw_signaling() is the right thing to do.

The question is where to add that? Usually right before the fence is 
returned from the object or queried from userspace would probably be the 
right place.

Regards,
Christian.

Am 12.07.22 um 16:22 schrieb Lionel Landwerlin:
> I'll let Lucas comment. I've only looked a little at it.
> From what I remember just enabling sw_signaling was enough to fix the 
> issue.
>
> -Lionel
>
> On 12/07/2022 13:26, Christian König wrote:
>> Ping to the Intel guys here. Especially Lucas/Nirmoy/Lionel.
>>
>> IIRC you stumbled over that problem as well, have you found any 
>> solution?
>>
>> Regards,
>> Christian.
>>
>> Am 07.07.22 um 12:29 schrieb jie1zhan:
>>> enable signaling after flatten dma_fence_chains on transfer
>>>
>>> Signed-off-by: jie1zhan <jesse.zhang@amd.com>
>>> ---
>>>   drivers/gpu/drm/drm_syncobj.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/gpu/drm/drm_syncobj.c 
>>> b/drivers/gpu/drm/drm_syncobj.c
>>> index 7e48dcd1bee4..0d9d3577325f 100644
>>> --- a/drivers/gpu/drm/drm_syncobj.c
>>> +++ b/drivers/gpu/drm/drm_syncobj.c
>>> @@ -920,6 +920,7 @@ static int 
>>> drm_syncobj_transfer_to_timeline(struct drm_file *file_private,
>>>       if (ret)
>>>           goto err_free_fence;
>>>   +    dma_fence_enable_sw_signaling(fence);
>>>       chain = dma_fence_chain_alloc();
>>>       if (!chain) {
>>>           ret = -ENOMEM;
>>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/syncobj: Fix sync syncobj issue
  2022-07-12 10:26 ` Christian König
  2022-07-12 14:22   ` Lionel Landwerlin
@ 2022-07-13  8:42   ` Das, Nirmoy
  2022-07-13  9:15     ` Christian König
  1 sibling, 1 reply; 6+ messages in thread
From: Das, Nirmoy @ 2022-07-13  8:42 UTC (permalink / raw)
  To: Christian König, jie1zhan, broonie, dri-devel-bounces, dri-devel
  Cc: Vijendar.Mukunda, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	ajitkumar.pandey, lucas.demarchi, lionel.g.landwerlin,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter, open list

Hi Christian,

On 7/12/2022 12:26 PM, Christian König wrote:
> Ping to the Intel guys here. Especially Lucas/Nirmoy/Lionel.
>
> IIRC you stumbled over that problem as well, have you found any solution?

I might be wrong but  I think you are talking about 
igt@syncobj_timeline@transfer-timeline-point testcase which seems to be

green in CI now 
https://intel-gfx-ci.01.org/tree/drm-tip/igt@syncobj_timeline@transfer-timeline-point.html

Lucas found out that the issues got fixed after ec8d985ff26f ("drm: use 
dma_fence_unwrap_merge() in drm_syncobj")


Regards,

Nirmoy

>
> Regards,
> Christian.
>
> Am 07.07.22 um 12:29 schrieb jie1zhan:
>> enable signaling after flatten dma_fence_chains on transfer
>>
>> Signed-off-by: jie1zhan <jesse.zhang@amd.com>
>> ---
>>   drivers/gpu/drm/drm_syncobj.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/drm_syncobj.c 
>> b/drivers/gpu/drm/drm_syncobj.c
>> index 7e48dcd1bee4..0d9d3577325f 100644
>> --- a/drivers/gpu/drm/drm_syncobj.c
>> +++ b/drivers/gpu/drm/drm_syncobj.c
>> @@ -920,6 +920,7 @@ static int 
>> drm_syncobj_transfer_to_timeline(struct drm_file *file_private,
>>       if (ret)
>>           goto err_free_fence;
>>   +    dma_fence_enable_sw_signaling(fence);
>>       chain = dma_fence_chain_alloc();
>>       if (!chain) {
>>           ret = -ENOMEM;
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/syncobj: Fix sync syncobj issue
  2022-07-13  8:42   ` Das, Nirmoy
@ 2022-07-13  9:15     ` Christian König
  0 siblings, 0 replies; 6+ messages in thread
From: Christian König @ 2022-07-13  9:15 UTC (permalink / raw)
  To: Das, Nirmoy, jie1zhan, broonie, dri-devel-bounces, dri-devel
  Cc: Vijendar.Mukunda, Basavaraj.Hiregoudar, Sunil-kumar.Dommati,
	ajitkumar.pandey, lucas.demarchi, lionel.g.landwerlin,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter, open list

Am 13.07.22 um 10:42 schrieb Das, Nirmoy:
> Hi Christian,
>
> On 7/12/2022 12:26 PM, Christian König wrote:
>> Ping to the Intel guys here. Especially Lucas/Nirmoy/Lionel.
>>
>> IIRC you stumbled over that problem as well, have you found any 
>> solution?
>
> I might be wrong but  I think you are talking about 
> igt@syncobj_timeline@transfer-timeline-point testcase which seems to be
>
> green in CI now 
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fintel-gfx-ci.01.org%2Ftree%2Fdrm-tip%2Figt%40syncobj_timeline%40transfer-timeline-point.html&amp;data=05%7C01%7Cchristian.koenig%40amd.com%7C722fc33842734ef5c05108da64abac60%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637932985747614383%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=q8JygSVZfGA8cEZn%2BdxVXX79pkpXRjZTS8kBQ6Lq%2Bmw%3D&amp;reserved=0
>
> Lucas found out that the issues got fixed after ec8d985ff26f ("drm: 
> use dma_fence_unwrap_merge() in drm_syncobj")

Yeah, but that's just coincident. The original bug that we fail to 
enable signaling in the syncobj is still there.

No that this is any major problem, but it would still be nice to have 
that fixed.

Regards,
Christian.

>
>
> Regards,
>
> Nirmoy
>
>>
>> Regards,
>> Christian.
>>
>> Am 07.07.22 um 12:29 schrieb jie1zhan:
>>> enable signaling after flatten dma_fence_chains on transfer
>>>
>>> Signed-off-by: jie1zhan <jesse.zhang@amd.com>
>>> ---
>>>   drivers/gpu/drm/drm_syncobj.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/gpu/drm/drm_syncobj.c 
>>> b/drivers/gpu/drm/drm_syncobj.c
>>> index 7e48dcd1bee4..0d9d3577325f 100644
>>> --- a/drivers/gpu/drm/drm_syncobj.c
>>> +++ b/drivers/gpu/drm/drm_syncobj.c
>>> @@ -920,6 +920,7 @@ static int 
>>> drm_syncobj_transfer_to_timeline(struct drm_file *file_private,
>>>       if (ret)
>>>           goto err_free_fence;
>>>   +    dma_fence_enable_sw_signaling(fence);
>>>       chain = dma_fence_chain_alloc();
>>>       if (!chain) {
>>>           ret = -ENOMEM;
>>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-13  9:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07 10:29 [PATCH v2] drm/syncobj: Fix sync syncobj issue jie1zhan
2022-07-12 10:26 ` Christian König
2022-07-12 14:22   ` Lionel Landwerlin
2022-07-12 14:57     ` Christian König
2022-07-13  8:42   ` Das, Nirmoy
2022-07-13  9:15     ` 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).