Re: [PATCH v7 3/3] drm/tyr: put iomem behind the hardware gate

From: Daniel Almeida

Date: Wed Sep 23 2026 - 10:01:24 EST




> On 12 Sep 2026, at 07:39, Onur Özkan <work@xxxxxxxxxxxxx> 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>
> Signed-off-by: Onur Özkan <work@xxxxxxxxxxxxx>


Reviewed-by: Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>