Re: [PATCH] media: renesas: vsp1: Move suspend/resume handling to LATE phase
From: Laurent Pinchart
Date: Tue Mar 17 2026 - 19:24:38 EST
Hi Tommaso,
Thank you for the patch.
On Fri, Dec 12, 2025 at 01:11:50PM +0100, Tommaso Merciai wrote:
> Switch the VSP1 driver's dev_pm_ops to LATE_SYSTEM_SLEEP_PM_OPS to ensure
> that suspend and resume callbacks are executed after DSI/DU suspend and
> before DSI/DU resume.
Have you considered handling this through device links ? Using late
system sleep is a hack that doesn't scale when more than two devices are
involved.
I've just written and posted [1] to address the issue in the rcar-du
driver (the suspend/resume ordering was right, but apparently only by
chance), it should be easy to replicate it in the rz-du driver..
[1] https://lore.kernel.org/dri-devel/20260317231930.595719-2-laurent.pinchart+renesas@xxxxxxxxxxxxxxxx/T/#u
> This prevents timeouts and vblank wait errors during
> system resume, such as:
>
> [drm] *ERROR* flip_done timed out [CRTC:43:crtc-0] vblank wait timed out
>
> This addresses display commit and vblank timeouts seen with DRM atomic
> helpers during s2ram.
>
> Co-developed-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@xxxxxxxxxxxxxx>
> ---
> drivers/media/platform/renesas/vsp1/vsp1_drv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/renesas/vsp1/vsp1_drv.c b/drivers/media/platform/renesas/vsp1/vsp1_drv.c
> index 2de515c497eb..0fbd27df1f46 100644
> --- a/drivers/media/platform/renesas/vsp1/vsp1_drv.c
> +++ b/drivers/media/platform/renesas/vsp1/vsp1_drv.c
> @@ -693,7 +693,7 @@ static int vsp1_pm_runtime_resume(struct device *dev)
> }
>
> static const struct dev_pm_ops vsp1_pm_ops = {
> - SYSTEM_SLEEP_PM_OPS(vsp1_pm_suspend, vsp1_pm_resume)
> + LATE_SYSTEM_SLEEP_PM_OPS(vsp1_pm_suspend, vsp1_pm_resume)
> RUNTIME_PM_OPS(vsp1_pm_runtime_suspend, vsp1_pm_runtime_resume, NULL)
> };
>
--
Regards,
Laurent Pinchart