Re: [PATCH v9 2/2] drm/tyr: put iomem behind the hardware gate

From: Alice Ryhl

Date: Sun Nov 22 2026 - 03:59:23 EST


On Sun, Nov 22, 2026 at 08:40:33AM +0300, Onur Özkan wrote:
> Move iomem mapping into HwGate and pass Arc<HwGate> to components that
> access hardware. Callers obtain HwAccessGuard before accessing the iomem
> so the reset worker waits for ongoing accesses.
>
> Acquire the gate once per address-space operation and pass the guarded
> iomem reference to its helpers. This prevents nested gate acquisition
> from deadlocking with reset and keeps each operation protected throughout.
> Clone the gate Arc before acquiring the guard so mutating helpers can
> retain their mutable self receivers.
>
> Suggested-by: Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>
> Reviewed-by: Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>
> Signed-off-by: Onur Özkan <work@xxxxxxxxxxxxx>

Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>