[Intel-xe] [PATCH] drm/xe: Use atomic instead of mutex for xe_device_mem_access_ongoing

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Wed Mar 22 12:44:46 UTC 2023


On 2023-03-21 22:16, Rodrigo Vivi wrote:
> On Tue, Mar 21, 2023 at 02:39:04PM +0000, Matthew Brost wrote:
>> On Tue, Feb 28, 2023 at 11:17:30AM +0100, Maarten Lankhorst wrote:
>>> xe_guc_ct_fast_path() is called from an irq context, and cannot lock
>>> the mutex used by xe_device_mem_access_ongoing().
>>>
>>> Fortunately it is easy to fix, and the atomic guarantees are good enough
>>> to ensure xe->mem_access.hold_rpm is set before last ref is dropped.
>>>
>>> As far as I can tell, the runtime ref in device access should be
>>> killable, but don't dare to do it yet.
>>>
>>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
>> Reviewed-by: Matthew Brost <matthew.brost at intel.com>
>
> Acked-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> so we can unblock PVC.
>
> but we might re-thing the mem_access in general and consider
> some serialization like 'foo_' example at Documentation/power/runtime_pm.txt

Thanks, pushed.

We will probably need to do something like that on the longer term.

~Maarten



More information about the Intel-xe mailing list