[PATCH v10 2/2] drm: add kms driver for loongson display controller

Sui Jingfeng 15330273260 at 189.cn
Tue Apr 11 10:44:32 UTC 2023


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.




More information about the dri-devel mailing list