mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alen Karnil <alen.karnil@ideasonboard.com>
To: Isaac Scott <isaac.scott@ideasonboard.com>, linux-media@vger.kernel.org
Cc: dafna@fastmail.com, laurent.pinchart@ideasonboard.com,
	mchehab@kernel.org, heiko@sntech.de,
	linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] media: rkisp1-isp: Set correct data mode for YUV bypass
Date: Thu, 17 Sep 2026 09:10:42 +0100	[thread overview]
Message-ID: <a6343116-618a-4616-a4e5-c04afc7d46da@ideasonboard.com> (raw)
In-Reply-To: <20260205103207.4020959-2-isaac.scott@ideasonboard.com>

Hi all,

Taking over from Isaac but have some points to discuss.

On 05/02/2026 10:32, Isaac Scott wrote:
> The rkisp1 features a 'bypass' mode for RAW and YUV formats. This
> disables all ISP blocks, and makes the rkisp1 display input data from
> the MIPI CSI receiver at the output, unmodified.
> 
> To determine whether we can activate bypass, we can detect whether both
> the source and sink formats are YUV. If they are, we must configure the
> ISP to expect a YUV input, interpreting H/VSYNC signals as data
> enable / disable.
> 
> Signed-off-by: Isaac Scott <isaac.scott@ideasonboard.com>
> ---
> 
> Changelog since v1:
> - Removed in_bypass flag
> - Renamed the patch to better represent the functionality of the patch
> 
> ---
>   drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
> index 2311672cedb1..21bfa0edbaf1 100644
> --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
> +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
> @@ -240,7 +240,9 @@ static int rkisp1_config_isp(struct rkisp1_isp *isp,
>   		}
>   	} else if (sink_fmt->pixel_enc == V4L2_PIXEL_ENC_YUV) {
>   		acq_mult = 2;
> -		if (mbus_type == V4L2_MBUS_CSI2_DPHY) {
> +		if (src_fmt->pixel_enc == V4L2_PIXEL_ENC_YUV) {
As Laurent states, this condition is always true, this will need to be 
reworked.
> +			isp_ctrl = RKISP1_CIF_ISP_CTRL_ISP_MODE_DATA_MODE;
Having tested this, DATA_MODE is correct, I am seeing a garbled image if 
using ITU601, definitely needs a comment if it goes against the 
documentation.

If we drop the earlier always true if statement, then the fix is to 
replace ITU601 selection with DATA_MODE, but there two paths that lead 
to ITU601 being selected, and I can only test one of them.

So the question is should both be replaced?
> +		} else if (mbus_type == V4L2_MBUS_CSI2_DPHY) {
>   			isp_ctrl = RKISP1_CIF_ISP_CTRL_ISP_MODE_ITU601;
>   		} else {
>   			if (mbus_type == V4L2_MBUS_BT656)

-- 
Thanks,
Alen Karnil


  parent reply	other threads:[~2026-09-17  8:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05 10:32 [PATCH v2 0/2] media: rkisp1: Add YUV bypass support for rkisp1 Isaac Scott
2026-02-05 10:32 ` [PATCH v2 1/2] media: rkisp1-isp: Set correct data mode for YUV bypass Isaac Scott
2026-02-06  0:17   ` Laurent Pinchart
2026-09-17  8:10   ` Alen Karnil [this message]
2026-02-05 10:32 ` [PATCH v2 2/2] media: rkisp1: Treat 8 bus width and 16 bus width formats the same Isaac Scott
2026-02-06  0:29   ` Laurent Pinchart

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=a6343116-618a-4616-a4e5-c04afc7d46da@ideasonboard.com \
    --to=alen.karnil@ideasonboard.com \
    --cc=dafna@fastmail.com \
    --cc=heiko@sntech.de \
    --cc=isaac.scott@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mchehab@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®