lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d6ac234f-c21b-b583-f375-1e7cbdd89adf@oss.nxp.com>
Date:   Sat, 23 Apr 2022 03:52:17 +0300
From:   "mirela.rabulea@....nxp.com" <mirela.rabulea@....nxp.com>
To:     Ming Qian <ming.qian@....com>, mchehab@...nel.org,
        shawnguo@...nel.org, s.hauer@...gutronix.de
Cc:     hverkuil-cisco@...all.nl, kernel@...gutronix.de,
        festevam@...il.com, linux-imx@....com, linux-media@...r.kernel.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] media: imx-jpeg: Add pm-sleep support for imx-jpeg



On 06.04.2022 12:47, Ming Qian wrote:
> Wait finishing jpeg job before system sleep,
> otherwise the encoding/decoding can't be resumed after suspend.
> 
> Signed-off-by: Ming Qian <ming.qian@....com>

Reviewed-by: Mirela Rabulea <mirela.rabulea@....com>

> ---
>   .../media/platform/nxp/imx-jpeg/mxc-jpeg.c    | 24 +++++++++++++++++++
>   1 file changed, 24 insertions(+)
> 
> diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
> index ccc26372e178..3df51d866011 100644
> --- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
> +++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
> @@ -2356,9 +2356,33 @@ static int mxc_jpeg_runtime_suspend(struct device *dev)
>   }
>   #endif
>   
> +#ifdef CONFIG_PM_SLEEP
> +static int mxc_jpeg_suspend(struct device *dev)
> +{
> +	struct mxc_jpeg_dev *jpeg = dev_get_drvdata(dev);
> +
> +	v4l2_m2m_suspend(jpeg->m2m_dev);
> +	return pm_runtime_force_suspend(dev);
> +}
> +
> +static int mxc_jpeg_resume(struct device *dev)
> +{
> +	struct mxc_jpeg_dev *jpeg = dev_get_drvdata(dev);
> +	int ret;
> +
> +	ret = pm_runtime_force_resume(dev);
> +	if (ret < 0)
> +		return ret;
> +
> +	v4l2_m2m_resume(jpeg->m2m_dev);
> +	return ret;
> +}
> +#endif
> +
>   static const struct dev_pm_ops	mxc_jpeg_pm_ops = {
>   	SET_RUNTIME_PM_OPS(mxc_jpeg_runtime_suspend,
>   			   mxc_jpeg_runtime_resume, NULL)
> +	SET_SYSTEM_SLEEP_PM_OPS(mxc_jpeg_suspend, mxc_jpeg_resume)
>   };
>   
>   static int mxc_jpeg_remove(struct platform_device *pdev)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ