Hi,
On 2023/4/4 22:10, Emil Velikov wrote:
+static const struct dev_pm_ops lsdc_pm_ops = {
+ .suspend = lsdc_pm_suspend,
+ .resume = lsdc_pm_resume,
+ .freeze = lsdc_pm_freeze,
+ .thaw = lsdc_pm_thaw,
+ .poweroff = lsdc_pm_freeze,
+ .restore = lsdc_pm_resume,
+};
+
The above section (and functions) should probably be wrapped in a
CONFIG_PM_SLEEP block.
I agree with you.
I see imx-drm has this guard, but it's for embedded platform.
But I also see drm/ast and drm/radeon also didn't add this.
Maybe S3/S4 support is mandatory for PC platform?
Coding this way to force the kernel to enable PM_SLEEP option, otherwise
there a pile of driver won't get compiled.
At lease drm/ast and drm/radeon is usable on LoongArch/Mips/X86-64 platform.