From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5E42AE95389 for ; Wed, 4 Feb 2026 11:25:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=76Vgv1g8PCmSCm7PU68jUne3wEmGp8DDaRf6LmJn7Tg=; b=jIBm6g8tL4ji+m xAJD9drDL2fOZ0ppDPRdoJWKbAocXPxOxOZqFUHvJL9BG95jUE6h74hhvVaPNm0yLVRkBhA48tYNC DTcKk3QagJf1BH3jEbA4Kd/oo8iUsawrMFlzFNMBJbrFCvLGM3IG8Drk3KMz9NINmFmAvM2o/LA2Z mRh+ORY7ywlHxmBf+soPgaKCyRhMjkm70+rX8K9nBc5zyfIJgBE27NaS1ZSPQ2kZrKu44USPvsUFZ 5hRKew0hZMABRwAl2JIPMtNovbtBOeHKKSXU0+8uUxQBonsxPO1Aks8XTTRob7rIWhZ4eRL+AdviI fGvqOUOleB2tfxYmKttw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vnb0c-00000008M3H-0DvW; Wed, 04 Feb 2026 11:25:22 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vnb0X-00000008Lyq-0lUm; Wed, 04 Feb 2026 11:25:18 +0000 Received: from t16.ideasonboard.com (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B7F1F1337; Wed, 4 Feb 2026 12:24:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1770204272; bh=BN1rqD2UnDUl0GUeoH96i0K4YwyQWxp/kIksm/8/gh4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SnyoIVeti2D98FR9LQYR8dnmP+B0sto2MCJoSJfJcfthO3SVDwDpoBY2A2ldKGCUZ XlduBL7e/IgT5lLUvErEGe5ofevcnQLkzNyCEq85ZXZ9zPe+4jtENkL8xEBXNC8yhs GS2iVo2JLgEPVZfHylUzVxxAZuiR7SRLtXdg8XcY= From: Isaac Scott To: 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, Isaac Scott Subject: [PATCH v1 2/6] media: rkisp1-isp: Add in_bypass flag for YUV bypass Date: Wed, 4 Feb 2026 11:25:02 +0000 Message-ID: <20260204112506.3706049-3-isaac.scott@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260204112506.3706049-1-isaac.scott@ideasonboard.com> References: <20260204112506.3706049-1-isaac.scott@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260204_032517_357224_85BA81A3 X-CRM114-Status: GOOD ( 12.68 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org 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 can set a new in_bypass flag. For YUV bypass, we should configure the ISP input to interpret incoming H/VSYNC signals as data enable / disable. Add this. Signed-off-by: Isaac Scott --- drivers/media/platform/rockchip/rkisp1/rkisp1-common.h | 1 + drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h index 5e6a4d5f6fd1..d90233e31ad3 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h @@ -532,6 +532,7 @@ struct rkisp1_device { struct rkisp1_debug debug; const struct rkisp1_info *info; int irqs[RKISP1_NUM_IRQS]; + bool in_bypass; bool irqs_enabled; }; diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c index 2311672cedb1..f636d738b7e8 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c @@ -212,6 +212,8 @@ static int rkisp1_config_isp(struct rkisp1_isp *isp, const struct v4l2_mbus_framefmt *sink_frm; const struct v4l2_rect *sink_crop; + rkisp1->in_bypass = false; + sink_frm = v4l2_subdev_state_get_format(sd_state, RKISP1_ISP_PAD_SINK_VIDEO); sink_crop = v4l2_subdev_state_get_crop(sd_state, @@ -240,7 +242,10 @@ 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) { + isp_ctrl = RKISP1_CIF_ISP_CTRL_ISP_MODE_DATA_MODE; + rkisp1->in_bypass = true; + } else if (mbus_type == V4L2_MBUS_CSI2_DPHY) { isp_ctrl = RKISP1_CIF_ISP_CTRL_ISP_MODE_ITU601; } else { if (mbus_type == V4L2_MBUS_BT656) -- 2.43.0 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip