Re: [PATCH 2/2] drm: rcar-du: Add Standby Mode to suspend()

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

 



Hello Hoan-san,

On Friday, 14 December 2018 09:25:18 EET Nguyen An Hoan wrote:
> From: Hoan Nguyen An <na-hoan@xxxxxxxxxxx>
> 
> Enter Standby Mode before suspend by drm
> We will not need to "Release from Module Standby Mode"
> because after resume() is called, this is done.
> 
> Signed-off-by: Hoan Nguyen An <na-hoan@xxxxxxxxxxx>
> ---
>  drivers/gpu/drm/rcar-du/rcar_du_drv.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> b/drivers/gpu/drm/rcar-du/rcar_du_drv.c index 32dba13..1ab3f56 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> @@ -426,6 +426,20 @@ static struct drm_driver rcar_du_driver = {
>  static int rcar_du_pm_suspend(struct device *dev)
>  {
>  	struct rcar_du_device *rcdu = dev_get_drvdata(dev);
> +	int ret;
> +	unsigned int i = 0;
> +
> +	for (i = 0; i < rcdu->num_crtcs; i++)
> +	{
> +		struct rcar_du_crtc *rcrtc = &rcdu->crtcs[i];
> +
> +		ret = rcar_du_crtc_standby(rcrtc);
> +		if(ret)
> +		{
> +			dev_err(dev, "failed to enter Standby mode\n");
> +			return ret;
> +		}
> +	}

Could you please explain why this is needed ? The call to 
drm_mode_config_helper_suspend() should disable all CRTCs, so there shouldn't 
be a need to disable them manually first.

>  	return drm_mode_config_helper_suspend(rcdu->ddev);
>  }

-- 
Regards,

Laurent Pinchart






[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux