Re: [PATCH v2 2/5] iommu/mediatek: Always check runtime PM status in tlb flush range callback

From: AngeloGioacchino Del Regno
Date: Mon Jan 10 2022 - 06:45:19 EST


Il 08/12/21 13:07, Dafna Hirschfeld ha scritto:
From: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>

In case of v4l2_reqbufs() it is possible, that a TLB flush is done
without runtime PM being enabled. In that case the "Partial TLB flush
timed out, falling back to full flush" warning is printed.

Commit c0b57581b73b ("iommu/mediatek: Add power-domain operation")
introduced has_pm as optimization to avoid checking runtime PM
when there is no power domain attached. But without the PM domain
there is still the device driver's runtime PM suspend handler, which
disables the clock. Thus flushing should also be avoided when there
is no PM domain involved.

Signed-off-by: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>
Reviewed-by: Dafna Hirschfeld <dafna.hirschfeld@xxxxxxxxxxxxx>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>