* [PATCH] iommu/vsi: keep the runtime PM callbacks without PM_SLEEP
@ 2026-10-25 13:27 Daniel Golle
2026-10-26 8:33 ` Benjamin Gaignard
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Golle @ 2026-10-25 13:27 UTC (permalink / raw)
To: Benjamin Gaignard, Joerg Roedel, Will Deacon, Robin Murphy,
Joerg Roedel, iommu, linux-kernel
The runtime PM operations are handed to the driver core through
pm_sleep_ptr(), which is NULL unless CONFIG_PM_SLEEP is set.
Without system sleep support the IOMMU has no runtime PM callbacks at
all: its clocks are never enabled by the driver, the page table is not
restored when the power domain comes back, and iommu->enable stays set
while genpd powers the domain off.
The TLB flush issued from vsi_iommu_map() then writes to the unpowered
IOMMU, and the first buffer allocation of the RK3588 AV1 decoder ends
in an asynchronous SError.
Use pm_ptr(), which keeps the operations whenever CONFIG_PM is set.
Fixes: 917ace84b770 ("iommu: Add verisilicon IOMMU driver")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
drivers/iommu/vsi-iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/vsi-iommu.c b/drivers/iommu/vsi-iommu.c
index 5dac20b143a55..1b447c0693936 100644
--- a/drivers/iommu/vsi-iommu.c
+++ b/drivers/iommu/vsi-iommu.c
@@ -780,7 +780,7 @@ static struct platform_driver rockchip_vsi_iommu_driver = {
.driver = {
.name = "vsi_iommu",
.of_match_table = vsi_iommu_dt_ids,
- .pm = pm_sleep_ptr(&vsi_iommu_pm_ops),
+ .pm = pm_ptr(&vsi_iommu_pm_ops),
.suppress_bind_attrs = true,
},
};
base-commit: bd1ecbb61afefc6a8b876ccbc31e9228b44e9eab
--
2.56.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] iommu/vsi: keep the runtime PM callbacks without PM_SLEEP
2026-10-25 13:27 [PATCH] iommu/vsi: keep the runtime PM callbacks without PM_SLEEP Daniel Golle
@ 2026-10-26 8:33 ` Benjamin Gaignard
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Gaignard @ 2026-10-26 8:33 UTC (permalink / raw)
To: Daniel Golle, Joerg Roedel, Will Deacon, Robin Murphy,
Joerg Roedel, iommu, linux-kernel
Le 25/10/2026 à 14:27, Daniel Golle a écrit :
> The runtime PM operations are handed to the driver core through
> pm_sleep_ptr(), which is NULL unless CONFIG_PM_SLEEP is set.
>
> Without system sleep support the IOMMU has no runtime PM callbacks at
> all: its clocks are never enabled by the driver, the page table is not
> restored when the power domain comes back, and iommu->enable stays set
> while genpd powers the domain off.
> The TLB flush issued from vsi_iommu_map() then writes to the unpowered
> IOMMU, and the first buffer allocation of the RK3588 AV1 decoder ends
> in an asynchronous SError.
>
> Use pm_ptr(), which keeps the operations whenever CONFIG_PM is set.
>
> Fixes: 917ace84b770 ("iommu: Add verisilicon IOMMU driver")
Thanks for the patch.
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
> drivers/iommu/vsi-iommu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/vsi-iommu.c b/drivers/iommu/vsi-iommu.c
> index 5dac20b143a55..1b447c0693936 100644
> --- a/drivers/iommu/vsi-iommu.c
> +++ b/drivers/iommu/vsi-iommu.c
> @@ -780,7 +780,7 @@ static struct platform_driver rockchip_vsi_iommu_driver = {
> .driver = {
> .name = "vsi_iommu",
> .of_match_table = vsi_iommu_dt_ids,
> - .pm = pm_sleep_ptr(&vsi_iommu_pm_ops),
> + .pm = pm_ptr(&vsi_iommu_pm_ops),
> .suppress_bind_attrs = true,
> },
> };
>
> base-commit: bd1ecbb61afefc6a8b876ccbc31e9228b44e9eab
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-26 8:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-25 13:27 [PATCH] iommu/vsi: keep the runtime PM callbacks without PM_SLEEP Daniel Golle
2026-10-26 8:33 ` Benjamin Gaignard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®