Re: [PATCH] drm: mxsfb: Shutdown the display on system shutdown

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marek,

Thank you for the patch.

On Sat, Jan 01, 2022 at 10:37:55PM +0100, Marek Vasut wrote:
> When the system shuts down or warm reboots, the display may be active.
> Implement the platform_driver .shutdown() operation and shut down the
> display.
> 
> Signed-off-by: Marek Vasut <marex@xxxxxxx>
> Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
> Cc: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> Cc: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
> Cc: Sam Ravnborg <sam@xxxxxxxxxxxx>
> Cc: Stefan Agner <stefan@xxxxxxxx>
> Cc: Thomas Zimmermann <tzimmermann@xxxxxxx>

Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/mxsfb/mxsfb_drv.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> index 6d7a3aeff50b0..375f26d4a4172 100644
> --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> @@ -381,6 +381,13 @@ static int mxsfb_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static void mxsfb_shutdown(struct platform_device *pdev)
> +{
> +	struct drm_device *drm = platform_get_drvdata(pdev);
> +
> +	drm_atomic_helper_shutdown(drm);
> +}
> +
>  #ifdef CONFIG_PM_SLEEP
>  static int mxsfb_suspend(struct device *dev)
>  {
> @@ -404,6 +411,7 @@ static const struct dev_pm_ops mxsfb_pm_ops = {
>  static struct platform_driver mxsfb_platform_driver = {
>  	.probe		= mxsfb_probe,
>  	.remove		= mxsfb_remove,
> +	.shutdown	= mxsfb_shutdown,
>  	.driver	= {
>  		.name		= "mxsfb",
>  		.of_match_table	= mxsfb_dt_ids,

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux