mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Devarsh Thakkar <devarsht@ti.com>
To: Brandon Brnich <b-brnich@ti.com>, <mchehab@kernel.org>,
	<hverkuil@kernel.org>, <sebastian.fricke@collabora.com>,
	<benjamin.gaignard@collabora.com>, <linux-media@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: <stable@vger.kernel.org>,
	Jai Luthra <jai.luthra@ideasonboard.com>,
	Kendall Willis <k-willis@ti.com>
Subject: Re: [PATCH v4 3/4] media: imagination: e5010: Move e5010_init_device to Runtime Resume Hook
Date: Fri, 18 Sep 2026 15:11:16 +0530	[thread overview]
Message-ID: <5c96e842-5b1b-4dd5-9dd8-01c5d77583b8@ti.com> (raw)
In-Reply-To: <20260831213231.2125544-4-b-brnich@ti.com>


On 01/09/26 03:02, Brandon Brnich wrote:
> The PM framework skips the runtime resume hook if the device was never on
> in the first place. This results in a crash in the system resume hook when
> a call to e5010_init_device attempts a write to a powered down device.
> 
> Move e5010_init_device to the resume hook to ensure register write only
> occurs when device is properly powered on.
> 
> Fixes: a1e294045885 ("media: imagination: Add E5010 JPEG Encoder driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Brandon Brnich <b-brnich@ti.com>
> Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com>
> Reviewed-by: Kendall Willis <k-willis@ti.com>

Reviewed-by: Devarsh Thakkar <devarsht@ti.com>

Regards
Devarsh

> ---
>   drivers/media/platform/imagination/e5010-jpeg-enc.c | 13 +++++++------
>   1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/media/platform/imagination/e5010-jpeg-enc.c b/drivers/media/platform/imagination/e5010-jpeg-enc.c
> index e98fcd3fcd9ae..488f5d7e4c9d5 100644
> --- a/drivers/media/platform/imagination/e5010-jpeg-enc.c
> +++ b/drivers/media/platform/imagination/e5010-jpeg-enc.c
> @@ -1511,6 +1511,13 @@ static int e5010_runtime_resume(struct device *dev)
>   		return ret;
>   	}
>   
> +	ret = e5010_init_device(e5010);
> +	if (ret) {
> +		dev_err(dev, "Failed to re-enable e5010 device\n");
> +		clk_disable_unprepare(e5010->clk);
> +		return ret;
> +	}
> +
>   	return 0;
>   }
>   
> @@ -1543,12 +1550,6 @@ static int e5010_resume(struct device *dev)
>   	if (ret < 0)
>   		return ret;
>   
> -	ret = e5010_init_device(e5010);
> -	if (ret) {
> -		dev_err(dev, "Failed to re-enable e5010 device\n");
> -		return ret;
> -	}
> -
>   	v4l2_m2m_resume(e5010->m2m_dev);
>   
>   	return ret;


  reply	other threads:[~2026-09-18  9:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 21:32 [PATCH v4 0/4] E5010 Probe Cleanup and Adding autosuspend Brandon Brnich
2026-08-31 21:32 ` [PATCH v4 1/4] media: imagination: e5010: Properly Release m2m_dev if probe fails Brandon Brnich
2026-09-18  9:08   ` Devarsh Thakkar
2026-10-05 13:16     ` Devarsh Thakkar
2026-10-05 17:33       ` Brandon Brnich
2026-08-31 21:32 ` [PATCH v4 2/4] media: imagination: e5010: Fix clk never enabled without CONFIG_PM Brandon Brnich
2026-09-18  9:11   ` Devarsh Thakkar
2026-08-31 21:32 ` [PATCH v4 3/4] media: imagination: e5010: Move e5010_init_device to Runtime Resume Hook Brandon Brnich
2026-09-18  9:41   ` Devarsh Thakkar [this message]
2026-08-31 21:32 ` [PATCH v4 4/4] media: imagination: e5010: Enable autosuspend for runtime PM Brandon Brnich
2026-09-18 15:55   ` Devarsh Thakkar
2026-09-24 19:25     ` Brandon Brnich
2026-09-28 13:24       ` Devarsh Thakkar

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=5c96e842-5b1b-4dd5-9dd8-01c5d77583b8@ti.com \
    --to=devarsht@ti.com \
    --cc=b-brnich@ti.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=hverkuil@kernel.org \
    --cc=jai.luthra@ideasonboard.com \
    --cc=k-willis@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sebastian.fricke@collabora.com \
    --cc=stable@vger.kernel.org \
    /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®