Skip to content

Commit 594271b

Browse files
committed
drm/apple: Mark DCP as being in the wakeup path
This prevents the PD from being shut down on suspend, which we need until we support runtime PM properly again. Signed-off-by: Hector Martin <[email protected]>
1 parent e180f55 commit 594271b

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

  • drivers/gpu/drm/apple

drivers/gpu/drm/apple/dcp.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,26 @@ static void dcp_platform_shutdown(struct platform_device *pdev)
585585
component_del(&pdev->dev, &dcp_comp_ops);
586586
}
587587

588+
static __maybe_unused int dcp_platform_suspend(struct device *dev)
589+
{
590+
/*
591+
* Set the device as a wakeup device, which forces its power
592+
* domains to stay on. We need this as we do not support full
593+
* shutdown properly yet.
594+
*/
595+
device_set_wakeup_path(dev);
596+
597+
return 0;
598+
}
599+
600+
static __maybe_unused int dcp_platform_resume(struct device *dev)
601+
{
602+
return 0;
603+
}
604+
605+
static SIMPLE_DEV_PM_OPS(dcp_platform_pm_ops,
606+
dcp_platform_suspend, dcp_platform_resume);
607+
588608
static const struct of_device_id of_match[] = {
589609
{ .compatible = "apple,dcp" },
590610
{}
@@ -598,6 +618,7 @@ static struct platform_driver apple_platform_driver = {
598618
.driver = {
599619
.name = "apple-dcp",
600620
.of_match_table = of_match,
621+
.pm = pm_sleep_ptr(&dcp_platform_pm_ops),
601622
},
602623
};
603624

0 commit comments

Comments
 (0)