[PATCH] drm/amdgpu: added synchronization for psp cmd buf access

Clements, John John.Clements at amd.com
Wed Aug 4 03:34:23 UTC 2021


[Public]

@Chen, Guchun<mailto:Guchun.Chen at amd.com>,
Based off your feedback I double checked the code, and I changed my opinion about it, I think it's better just to reuse the original mutex for now. I've submitted an updated patch for review

From: Clements, John <John.Clements at amd.com>
Sent: Tuesday, August 3, 2021 10:07 PM
To: Chen, Guchun <Guchun.Chen at amd.com>; amd-gfx at lists.freedesktop.org
Cc: Zhang, Hawking <Hawking.Zhang at amd.com>; Li, Candice <Candice.Li at amd.com>; Lazar, Lijo <Lijo.Lazar at amd.com>
Subject: Re: [PATCH] drm/amdgpu: added synchronization for psp cmd buf access

Hello Guchun,

In most of those cases you are right it is redundant, the reason i kept them separate for now is to resolve this bug while also keeping those interfaces modular, and not affecting the psp submit sequence yet. We are planning a bigger change to that source to remove alot of the duplicate code regarding the cmd buffer prepare/submit flow and will probably go back down to one mutex there.

Thank you,
John Clements

________________________________
From: Chen, Guchun <Guchun.Chen at amd.com<mailto:Guchun.Chen at amd.com>>
Sent: Tuesday, August 3, 2021 9:58 PM
To: Clements, John <John.Clements at amd.com<mailto:John.Clements at amd.com>>; amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org> <amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>>
Cc: Zhang, Hawking <Hawking.Zhang at amd.com<mailto:Hawking.Zhang at amd.com>>; Li, Candice <Candice.Li at amd.com<mailto:Candice.Li at amd.com>>; Lazar, Lijo <Lijo.Lazar at amd.com<mailto:Lijo.Lazar at amd.com>>
Subject: RE: [PATCH] drm/amdgpu: added synchronization for psp cmd buf access


[Public]



Before calling into psp_cmd_submit_buf, a mutex psp->cmd_buf_mutex is there, and after entering psp_cmd_submit_buf, there is another mutex psp->mutex, is it a bit redundant?



Regards,

Guchun



From: Clements, John <John.Clements at amd.com<mailto:John.Clements at amd.com>>
Sent: Tuesday, August 3, 2021 5:50 PM
To: amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>
Cc: Zhang, Hawking <Hawking.Zhang at amd.com<mailto:Hawking.Zhang at amd.com>>; Li, Candice <Candice.Li at amd.com<mailto:Candice.Li at amd.com>>; Lazar, Lijo <Lijo.Lazar at amd.com<mailto:Lijo.Lazar at amd.com>>; Chen, Guchun <Guchun.Chen at amd.com<mailto:Guchun.Chen at amd.com>>
Subject: [PATCH] drm/amdgpu: added synchronization for psp cmd buf access



[AMD Official Use Only]



Submitting patch to synchronize access to psp cmd submission memory to resolve potential race conditions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20210804/0b571744/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-drm-amdgpu-added-synchronization-for-psp-cmd-buf-acc.patch
Type: application/octet-stream
Size: 20630 bytes
Desc: 0001-drm-amdgpu-added-synchronization-for-psp-cmd-buf-acc.patch
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20210804/0b571744/attachment-0001.obj>


More information about the amd-gfx mailing list