Skip to content

Commit fb4e6ef

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 <marcan@marcan.st>
1 parent dbf3ca2 commit fb4e6ef

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
@@ -587,6 +587,26 @@ static void dcp_platform_shutdown(struct platform_device *pdev)
587587
component_del(&pdev->dev, &dcp_comp_ops);
588588
}
589589

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

0 commit comments

Comments
 (0)