The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: Linmao Li <lilinmao@kylinos.cn>
Cc: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>,
	Jai Luthra <jai.luthra+renesas@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] media: rppx1: bls: read the raw pattern from the PRE2 acquisition module
Date: Mon, 17 Aug 2026 19:14:12 +0200	[thread overview]
Message-ID: <20260817171412.GJ2757863@ragnatech.se> (raw)
In-Reply-To: <20260817104529.3132552-3-lilinmao@kylinos.cn>

Hello Linmao,

Thanks for your work.

On 2026-08-17 18:45:29 +0800, Linmao Li wrote:
> rppx1_bls_swap_regs() gets the Bayer pattern from the acquisition
> module. The PRE1 path uses pre1.acq, but the PRE2 path mistakenly uses
> pre2.bls. The BLS module does not store a Bayer pattern, so PRE2 would
> read zero (RGGB) and map fixed black levels to the wrong colour
> registers.
> 
> PRE2 is not started or dispatched yet, so the bug is currently
> latent. Read the pattern from pre2.acq, as the PRE1 path does.
> 
> Fixes: 3f8a2a883655 ("media: rppx1: bls: Add support for black level compensation")
> Signed-off-by: Linmao Li <lilinmao@kylinos.cn>
> ---
>  drivers/media/platform/dreamchip/rppx1/rppx1_bls.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/dreamchip/rppx1/rppx1_bls.c b/drivers/media/platform/dreamchip/rppx1/rppx1_bls.c
> index 01a61db279bf7..71c5561457d52 100644
> --- a/drivers/media/platform/dreamchip/rppx1/rppx1_bls.c
> +++ b/drivers/media/platform/dreamchip/rppx1/rppx1_bls.c
> @@ -70,7 +70,7 @@ rppx1_bls_swap_regs(struct rpp_module *mod, const u32 input[4], u32 output[4])
>  
>  	/* Swap to pattern used in our path, PRE1 or PRE2. */
>  	struct rpp_module *acq = mod == &mod->rpp->pre1.bls ?
> -		&mod->rpp->pre1.acq : &mod->rpp->pre2.bls;
> +		&mod->rpp->pre1.acq : &mod->rpp->pre2.acq;

As pointed out elsewhere in this series, PRE2 is not enabled yet.

>  	enum rpp_raw_pattern pattern = acq->info.acq.raw_pattern;
>  
>  	for (unsigned int i = 0; i < 4; ++i)
> -- 
> 2.25.1
> 

-- 
Kind Regards,
Niklas Söderlund

  reply	other threads:[~2026-08-17 17:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 10:45 [PATCH 0/2] media: rppx1: parameters block fixes Linmao Li
2026-08-17 10:45 ` [PATCH 1/2] media: rppx1: handle the MAIN_POST white balance gains block Linmao Li
2026-08-17 15:49   ` Niklas Söderlund
2026-08-17 16:00     ` Jacopo Mondi
2026-08-17 10:45 ` [PATCH 2/2] media: rppx1: bls: read the raw pattern from the PRE2 acquisition module Linmao Li
2026-08-17 17:14   ` Niklas Söderlund [this message]
2026-08-18  6:25     ` Jacopo Mondi
2026-08-18  8:20       ` Niklas Söderlund
2026-08-18  8:41         ` Jacopo Mondi
2026-08-18  8:46           ` Niklas Söderlund

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=20260817171412.GJ2757863@ragnatech.se \
    --to=niklas.soderlund@ragnatech.se \
    --cc=jacopo.mondi+renesas@ideasonboard.com \
    --cc=jai.luthra+renesas@ideasonboard.com \
    --cc=lilinmao@kylinos.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.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