mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "jackson.lee" <jackson.lee@chipsnmedia.com>
To: Thorsten Lannynd <t-lannynd@ti.com>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Cc: "b-brnich@ti.com" <b-brnich@ti.com>,
	"k-willis@ti.com" <k-willis@ti.com>,
	"detheridge@ti.com" <detheridge@ti.com>,
	Nas Chung <nas.chung@chipsnmedia.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] media: chips-media: wave5: Add system suspend/resume support
Date: Wed, 9 Sep 2026 03:57:24 +0000	[thread overview]
Message-ID: <SLXP216MB11485404EB8CB32CE88FAFEEEDB02@SLXP216MB1148.KORP216.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20260707201655.781174-1-t-lannynd@ti.com>



> -----Original Message-----
> From: Thorsten Lannynd <t-lannynd@ti.com>
> Sent: Wednesday, July 8, 2026 5:17 AM
> To: linux-media@vger.kernel.org
> Cc: b-brnich@ti.com; k-willis@ti.com; detheridge@ti.com; Nas Chung
> <nas.chung@chipsnmedia.com>; jackson.lee <jackson.lee@chipsnmedia.com>;
> Mauro Carvalho Chehab <mchehab@kernel.org>; linux-kernel@vger.kernel.org
> Subject: [PATCH] media: chips-media: wave5: Add system suspend/resume
> support
> 
> Add SET_SYSTEM_SLEEP_PM_OPS with wave5_system_suspend() and
> wave5_system_resume() so the driver handles system suspend to RAM. When
> suspended, Wave5 should gracefully finish the job and shutdown. When
> resumed, Wave5 should resume the context and finish executing the
> suspended stream.
> 
> Signed-off-by: Thorsten Lannynd <t-lannynd@ti.com>

Reviewed-by: Jackson.Lee <jackson.lee@chipsnmedia.com>

thanks


> ---
>  .../platform/chips-media/wave5/wave5-vpu.c    | 30 +++++++++++++++++++
>  1 file changed, 30 insertions(+)
> 
> diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu.c
> b/drivers/media/platform/chips-media/wave5/wave5-vpu.c
> index 76d57c6b6..a83640751 100644
> --- a/drivers/media/platform/chips-media/wave5/wave5-vpu.c
> +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu.c
> @@ -254,7 +254,37 @@ static __maybe_unused int wave5_pm_resume(struct
> device *dev)
>  	return ret;
>  }
> 
> +static __maybe_unused int wave5_system_suspend(struct device *dev) {
> +	struct vpu_device *vpu = dev_get_drvdata(dev);
> +
> +	if (vpu->v4l2_m2m_dec_dev)
> +		v4l2_m2m_suspend(vpu->v4l2_m2m_dec_dev);
> +	if (vpu->v4l2_m2m_enc_dev)
> +		v4l2_m2m_suspend(vpu->v4l2_m2m_enc_dev);
> +
> +	return pm_runtime_force_suspend(dev);
> +}
> +
> +static __maybe_unused int wave5_system_resume(struct device *dev) {
> +	struct vpu_device *vpu = dev_get_drvdata(dev);
> +	int ret;
> +
> +	ret = pm_runtime_force_resume(dev);
> +	if (ret < 0)
> +		return ret;
> +
> +	if (vpu->v4l2_m2m_dec_dev)
> +		v4l2_m2m_resume(vpu->v4l2_m2m_dec_dev);
> +	if (vpu->v4l2_m2m_enc_dev)
> +		v4l2_m2m_resume(vpu->v4l2_m2m_enc_dev);
> +
> +	return 0;
> +}
> +
>  static const struct dev_pm_ops wave5_pm_ops = {
> +	SET_SYSTEM_SLEEP_PM_OPS(wave5_system_suspend, wave5_system_resume)
>  	SET_RUNTIME_PM_OPS(wave5_pm_suspend, wave5_pm_resume, NULL)  };
> 
> --
> 2.34.1


      parent reply	other threads:[~2026-09-09  3:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-07 20:16 Thorsten Lannynd
2026-07-08 15:23 ` Kendall Willis
2026-07-08 16:12   ` Lannynd, Thorsten
2026-07-08 16:22     ` Kendall Willis
2026-09-09  3:57 ` jackson.lee [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SLXP216MB11485404EB8CB32CE88FAFEEEDB02@SLXP216MB1148.KORP216.PROD.OUTLOOK.COM \
    --to=jackson.lee@chipsnmedia.com \
    --cc=b-brnich@ti.com \
    --cc=detheridge@ti.com \
    --cc=k-willis@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=nas.chung@chipsnmedia.com \
    --cc=t-lannynd@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®