From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.white.stw.pengutronix.de (mx1.white.stw.pengutronix.de [185.203.200.13]) (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 BDEB836A374; Wed, 16 Sep 2026 15:09:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.200.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789571391; cv=none; b=mIx/UsZjlO7ayetfyHBKabTVb0UOc4N0jFCeTgh58zKCKN57G6Yg3fpBGWpbxT0SP4Fn+3YBrI6b7vr/ZfJOO23wiUD/rNGSuOxQajzJF6oLr1++LTrEHUwxGEXfZoAYk/hgZ4Q3IGzyMUpBSV7R2O91lKLjV/LVfXH0Yxmdybo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789571391; c=relaxed/simple; bh=v/YOzl4wt8ytYX4K8Ic7RoOs5A/Frfh4PmR1atoRt2U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tAzmoGD2V7tIeDoehRARemVX0ce+uqS50/xUJ2eAJ4mLBB+hZ2DadK4vdBPpKDXrkHDa8VM5YC+AN8E1+y3h19tXbvrdePHYb4zIsgOoubsVyFiZIyZnAQWVGG4Seb6ZZ7Qqy0I/uVE96eoAXXPIx86E0ILdivdemPFIr1rthEs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.200.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de X-PTX-Original-Recipient: ezequiel@vanguardiasur.com.ar X-PTX-Original-Recipient: jacob-chen@iotwrt.com X-PTX-Original-Recipient: mchehab@kernel.org X-PTX-Original-Recipient: detlev.casanova@collabora.com X-PTX-Original-Recipient: heiko@sntech.de X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-PTX-Original-Recipient: linux-media@vger.kernel.org X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-PTX-Original-Recipient: linux-rockchip@lists.infradead.org X-PTX-Original-Recipient: lgs201920130244@gmail.com X-PTX-Original-Recipient: p.zabel@pengutronix.de X-PTX-Original-Recipient: kernel@pengutronix.de X-PTX-Original-Recipient: s.pueschel@pengutronix.de X-PTX-Original-Recipient: m.tretter@pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de (drehscheibe.grey.stw.pengutronix.de [IPv6:2a0a:edc0:0:c01:1d::a2]) (Authenticated sender: relay-from-drehscheibe.grey.stw.pengutronix.de) by mx1.white.stw.pengutronix.de (Postfix) with ESMTPSA id C10552059ED; Wed, 16 Sep 2026 17:09:47 +0200 (CEST) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=peter.mobile.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1x6rGd-001Fsx-2A; Wed, 16 Sep 2026 17:09:47 +0200 From: =?utf-8?q?Sven_P=C3=BCschel?= Date: Wed, 16 Sep 2026 17:09:43 +0200 Subject: [PATCH v2 02/17] media: rockchip: rga: add comment about pixel alignment for YUV formats Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20260916-spu-rga3multicore-v2-2-23aa2cb74e61@pengutronix.de> References: <20260916-spu-rga3multicore-v2-0-23aa2cb74e61@pengutronix.de> In-Reply-To: <20260916-spu-rga3multicore-v2-0-23aa2cb74e61@pengutronix.de> To: Jacob Chen , Ezequiel Garcia , Mauro Carvalho Chehab , Heiko Stuebner , Philipp Zabel Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Detlev Casanova , Michael Tretter , Guangshuo Li , =?utf-8?q?Sven_P=C3=BCschel?= X-Mailer: b4 0.15.2 Add a comment to clarify the use of fixed step_height values for all YUV formats. While the commit introducing the change already explains the reasoning, add an explicit comment to improve the visibility of the reasoning. Signed-off-by: Sven Püschel --- drivers/media/platform/rockchip/rga/rga.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c index bd0afd33affe4..efe5541078214 100644 --- a/drivers/media/platform/rockchip/rga/rga.c +++ b/drivers/media/platform/rockchip/rga/rga.c @@ -414,6 +414,16 @@ static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f) .step_height = 1, }; + /* + * Technically 4:2:2 YUV formats don't need a step_height of 2. + * But for the RGA3 this is explicitly documented in section 5.6.3 + * of the RK3588 TRM Part 2. + * And the RGA2 vendor driver also checks that the height (and width) + * is aligned to 2 when a YUV format is used. + * + * Therefore be safe and always align width and height to 2 + * when a YUV format is used. + */ if (v4l2_is_format_yuv(v4l2_format_info(pix_fmt->pixelformat))) { frmsize.step_width = 2; frmsize.step_height = 2; -- 2.55.0