Linux Media Controller development
 help / color / mirror / Atom feed
From: <Balakrishnan.S@microchip.com>
To: <ehristev@kernel.org>, <mchehab@kernel.org>
Cc: <hverkuil@kernel.org>, <sakari.ailus@linux.intel.com>,
	<linux-media@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<stable@vger.kernel.org>
Subject: Re: [PATCH 04/10] media: microchip-isc: disable histogram and flush AWB work on stop
Date: Mon, 22 Jun 2026 11:27:39 +0000	[thread overview]
Message-ID: <9f769285-e328-4f98-8f1e-9112d1ef7be0@microchip.com> (raw)
In-Reply-To: <dad6ba27-5fd1-4a52-ae0b-6e0db3a9d1eb@kernel.org>

Hi Eugen,

Thanks for the feedback on this.

On 21/06/26 11:53 am, Eugen Hristev wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On 6/16/26 14:50, Balakrishnan Sambath wrote:
>> isc_stop_streaming() masked the DMA done interrupt but left the
>> histogram enabled, so a HISDONE that fired just before the stop could
>> still queue isc_awb_work() after pm_runtime_put_sync() gated the clocks.
>> isc_awb_work() reads the histogram registers in isc_hist_count() before
>> taking its own PM reference, so the access faults on the suspended
>> device.
>>
>> Disable the histogram and flush the work before dropping the PM
>> reference, mirroring the start_streaming error path.
>>
> 
> In here you reference some error path that you mirror, but you add it in
> the next commit in which you say you mirror this exact commit :/
> Circular mirroring of paths which initially did not exist.
> I would squash this commit with the next one and show the facts as they
> are : stop histogram and work queue in different stop/error scenarios,
> no more mirroring.

Agreed, indeed its circular.
Will squash both commits and reword so each path stands on its own.

> 
> Eugen
> 
>> Fixes: 91b4e487b0c6 ("media: microchip: add ISC driver as Microchip ISC")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Balakrishnan Sambath <balakrishnan.s@microchip.com>
>> ---
>>   drivers/media/platform/microchip/microchip-isc-base.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/media/platform/microchip/microchip-isc-base.c b/drivers/media/platform/microchip/microchip-isc-base.c
>> index 3245dd7cb980..8f255a4c4e7a 100644
>> --- a/drivers/media/platform/microchip/microchip-isc-base.c
>> +++ b/drivers/media/platform/microchip/microchip-isc-base.c
>> @@ -425,9 +425,13 @@ static void isc_stop_streaming(struct vb2_queue *vq)
>>        /* Disable DMA interrupt */
>>        regmap_write(isc->regmap, ISC_INTDIS, ISC_INT_DDONE);
>>
>> +     isc_set_histogram(isc, false);
>> +
>>        /* let a running IRQ handler finish before the clock is disabled */
>>        synchronize_irq(isc->irq);
>>
>> +     cancel_work_sync(&isc->awb_work);
>> +
>>        pm_runtime_put_sync(isc->dev);
>>
>>        /* Disable stream on the sub device */
>>
> 


  reply	other threads:[~2026-06-22 11:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16 11:50 [PATCH 00/10] media: microchip-isc: AWB, stream-stop and endpoint-ref fixes Balakrishnan Sambath
2026-06-16 11:50 ` [PATCH 01/10] media: microchip-isc: fix awb_mutex and lock lifecycle Balakrishnan Sambath
2026-06-16 11:50 ` [PATCH 02/10] media: microchip-isc: take a reference on the parsed endpoints Balakrishnan Sambath
2026-06-16 11:50 ` [PATCH 03/10] media: microchip-isc: synchronize the IRQ before disabling clocks on stop Balakrishnan Sambath
2026-06-19  8:01   ` Eugen Hristev
2026-06-16 11:50 ` [PATCH 04/10] media: microchip-isc: disable histogram and flush AWB work " Balakrishnan Sambath
2026-06-21  6:23   ` Eugen Hristev
2026-06-22 11:27     ` Balakrishnan.S [this message]
2026-06-16 11:51 ` [PATCH 05/10] media: microchip-isc: clean up histogram on the start_streaming error path Balakrishnan Sambath
2026-06-16 11:51 ` [PATCH 06/10] media: microchip-isc: do not touch WB registers when not streaming Balakrishnan Sambath
2026-06-16 11:51 ` [PATCH 07/10] media: microchip-isc: fix pfe_cfg0_bps comment Balakrishnan Sambath
2026-06-21  6:27   ` Eugen Hristev
2026-06-22 11:32     ` Balakrishnan.S
2026-06-16 11:51 ` [PATCH 08/10] media: microchip-isc: fix PM runtime leak in AWB work handler Balakrishnan Sambath
2026-06-16 11:51 ` [PATCH 09/10] media: microchip-isc: fix SBGGR10 Bayer pattern Balakrishnan Sambath
2026-06-16 11:51 ` [PATCH 10/10] media: microchip-isc: fix WB offset and gain register field masking Balakrishnan Sambath

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=9f769285-e328-4f98-8f1e-9112d1ef7be0@microchip.com \
    --to=balakrishnan.s@microchip.com \
    --cc=ehristev@kernel.org \
    --cc=hverkuil@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.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