From nobody Mon Feb 9 11:47:23 2026 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4D9C3ECBD1; Wed, 4 Feb 2026 11:25:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770204322; cv=none; b=ZKNspZLwifHY3a6BdXFBd/VxH6MqTu1X4sHcoOwB7KK8p+QUJU8oVM1KxhZbpwvGXSR7frfpSn/dy5sISFXwDZbA7I6VzdMi2CLUttFai9aKeVQMVpt0FSw3Qt8f4Yfs3ltuPbZZTs/BkVSQIxhEQMPSg4M/nfoPR6tXqKmhY6I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770204322; c=relaxed/simple; bh=Dvl3Tree0wsEccwQaxwDEFxXPpQC0laXl6e03FgkyEg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dNXDVfKDRB74tm6+POg2zaznwVFesnD1ms4x9tmqwrPKKMBTf75sGJmj4vdfDfYPOkqlbJhn3aR+VEar+Tvu0yPlyRnbQR+MjnX9GdT53pquv6Lvu8FBR2WJZLaFb8Ho6y0BldD5PIVftC+DQ8XD4DIvSHCvnwM3akJ2uHBDblw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=bWhK2CM2; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="bWhK2CM2" 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 22DBD1356; Wed, 4 Feb 2026 12:24:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1770204273; bh=Dvl3Tree0wsEccwQaxwDEFxXPpQC0laXl6e03FgkyEg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bWhK2CM2Ml1myVRfbA2vz9SqyzEkleAq5+dv54lr6FCE59eA2ba+WNfxCeFh0tIQd 20C4ugZ3FQcpVnw7Pgv1fg2Sfb8LkQrywxNOotcXAUVuSPBhD6RkebFvIeRJtpzmf7 a+0qC8E20QAFhbfnklnTD7N00OOqMEw836bX+K+I= 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 3/6] media: rkisp1-isp: Add target_format Date: Wed, 4 Feb 2026 11:25:03 +0000 Message-ID: <20260204112506.3706049-4-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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In passthough mode, we want to make sure the output format of the ISP is identical to the input format. Add logic to ensure the format we configure the output of the ISP with is the sink format when we are in bypass, and the source format if we are not. Signed-off-by: Isaac Scott --- drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c b/drivers/= media/platform/rockchip/rkisp1/rkisp1-isp.c index f636d738b7e8..716bd7f3c66d 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c @@ -175,9 +175,10 @@ static void rkisp1_gasket_disable(struct rkisp1_device= *rkisp1) static void rkisp1_config_ism(struct rkisp1_isp *isp, const struct v4l2_subdev_state *sd_state) { - const struct v4l2_rect *src_crop =3D + const struct v4l2_rect *target_crop =3D v4l2_subdev_state_get_crop(sd_state, - RKISP1_ISP_PAD_SOURCE_VIDEO); + (isp->rkisp1->in_bypass ? + RKISP1_ISP_PAD_SINK_VIDEO : RKISP1_ISP_PAD_SOURCE_VIDEO)); struct rkisp1_device *rkisp1 =3D isp->rkisp1; u32 val; =20 @@ -185,10 +186,10 @@ static void rkisp1_config_ism(struct rkisp1_isp *isp, rkisp1_write(rkisp1, RKISP1_CIF_ISP_IS_MAX_DX, 0); rkisp1_write(rkisp1, RKISP1_CIF_ISP_IS_MAX_DY, 0); rkisp1_write(rkisp1, RKISP1_CIF_ISP_IS_DISPLACE, 0); - rkisp1_write(rkisp1, RKISP1_CIF_ISP_IS_H_OFFS, src_crop->left); - rkisp1_write(rkisp1, RKISP1_CIF_ISP_IS_V_OFFS, src_crop->top); - rkisp1_write(rkisp1, RKISP1_CIF_ISP_IS_H_SIZE, src_crop->width); - rkisp1_write(rkisp1, RKISP1_CIF_ISP_IS_V_SIZE, src_crop->height); + rkisp1_write(rkisp1, RKISP1_CIF_ISP_IS_H_OFFS, target_crop->left); + rkisp1_write(rkisp1, RKISP1_CIF_ISP_IS_V_OFFS, target_crop->top); + rkisp1_write(rkisp1, RKISP1_CIF_ISP_IS_H_SIZE, target_crop->width); + rkisp1_write(rkisp1, RKISP1_CIF_ISP_IS_V_SIZE, target_crop->height); =20 /* IS(Image Stabilization) is always on, working as output crop */ rkisp1_write(rkisp1, RKISP1_CIF_ISP_IS_CTRL, 1); --=20 2.43.0