Skip to content

Commit

Permalink
drm: rcar-du: Shutdown the display on system shutdown
Browse files Browse the repository at this point in the history
[ Upstream commit 015f2eb ]

When the system shuts down or warm reboots, the display may be active,
with the hardware accessing system memory. Upon reboot, the DDR will not
be accessible, which may cause issues.

Implement the platform_driver .shutdown() operation and shut down the
display to fix this.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Laurent Pinchart authored and gregkh committed Sep 18, 2021
1 parent 08e42d1 commit fb6593a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/gpu/drm/rcar-du/rcar_du_drv.c
Expand Up @@ -559,6 +559,13 @@ static int rcar_du_remove(struct platform_device *pdev)
return 0;
}

static void rcar_du_shutdown(struct platform_device *pdev)
{
struct rcar_du_device *rcdu = platform_get_drvdata(pdev);

drm_atomic_helper_shutdown(&rcdu->ddev);
}

static int rcar_du_probe(struct platform_device *pdev)
{
struct rcar_du_device *rcdu;
Expand Down Expand Up @@ -615,6 +622,7 @@ static int rcar_du_probe(struct platform_device *pdev)
static struct platform_driver rcar_du_platform_driver = {
.probe = rcar_du_probe,
.remove = rcar_du_remove,
.shutdown = rcar_du_shutdown,
.driver = {
.name = "rcar-du",
.pm = &rcar_du_pm_ops,
Expand Down

0 comments on commit fb6593a

Please sign in to comment.