Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77ec30a0 authored by Kieran Bingham's avatar Kieran Bingham Committed by Greg Kroah-Hartman
Browse files

media: vsp1: Prevent suspending and resuming DRM pipelines




[ Upstream commit a17d2d6c ]

When used as part of a display pipeline, the VSP is stopped and
restarted explicitly by the DU from its suspend and resume handlers.
There is thus no need to stop or restart pipelines in the VSP suspend
and resume handlers, and doing so would cause the hardware to be
left in a misconfigured state.

Ensure that the VSP suspend and resume handlers do not affect DRM-based
pipelines.

Signed-off-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 32097005
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -571,7 +571,13 @@ static int __maybe_unused vsp1_pm_suspend(struct device *dev)
{
	struct vsp1_device *vsp1 = dev_get_drvdata(dev);

	/*
	 * When used as part of a display pipeline, the VSP is stopped and
	 * restarted explicitly by the DU.
	 */
	if (!vsp1->drm)
		vsp1_pipelines_suspend(vsp1);

	pm_runtime_force_suspend(vsp1->dev);

	return 0;
@@ -582,6 +588,12 @@ static int __maybe_unused vsp1_pm_resume(struct device *dev)
	struct vsp1_device *vsp1 = dev_get_drvdata(dev);

	pm_runtime_force_resume(vsp1->dev);

	/*
	 * When used as part of a display pipeline, the VSP is stopped and
	 * restarted explicitly by the DU.
	 */
	if (!vsp1->drm)
		vsp1_pipelines_resume(vsp1);

	return 0;