From nobody Thu Dec 18 09:09:37 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5AEE626980E; Mon, 13 Oct 2025 11:01:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760353300; cv=none; b=BOtffSIxB54SYzDkbKZmH+fn/YH8DCbhHzsztTgThFcvAxg+2NChV20xQS1PR3JtKmJeomhRoEexKc4KpvDQlIbcePFEVR9tfIF2qhek2oExZZQBee0c2qyz9bu7wIN1Xa2uHFrwh4sbJc/oLa5WN4ljuC+thKr26eW+LmEkG7s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760353300; c=relaxed/simple; bh=+z+Ke/wL3drYAMEVfttRbXzJ7JvbhYEKSbH29MXPYEo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UM6Fo3Lq0HwqETigxUnKVG/BZiyEPAm+f7AhQrV9OQULz7U4c2tRZwZolsm1vHAlVXreJDIHnIzPwFTKR00dnJXxGCZigZlcpERP972zsWHUEHvPOhpaKqXjWRT2O7KzrBGQgQtKY7MJIjMTvhSitpEscORQdUEI59CIjgQPc0U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nSkTTk3z; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nSkTTk3z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D7E2C4CEF8; Mon, 13 Oct 2025 11:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760353299; bh=+z+Ke/wL3drYAMEVfttRbXzJ7JvbhYEKSbH29MXPYEo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=nSkTTk3zAQWigZKVt8rQnuwdU11zfpGq88gvYNwBbyR8d7H1VFf+uEXC7DRQtgc9i zWWpLPqj/GmIR/NyeaAXxE4bDY2JVnhCkp91lStD8jkfJW/iaXEN+CpNhKU+5vNou7 W+F3LmxPDx6/xhL2xepLgGs7Zt5JbE8QO4uiFQRlgj/cJPK9eMY9jVCTY5n/9l+LUf Q9kc22BcchQDewtStauRI0R3q/c/Ss9dm9yFj5TVDt2BNhdk6EQodP9PfwiezN5yfh Wix3UomvdJstet05ELiQfyb4pwSd5gJZ8EeyD4ijWZhln+z2z66bn+06hqdAdhoo2D Zo+6ahZ8N2QCw== From: Maxime Ripard Date: Mon, 13 Oct 2025 13:01:33 +0200 Subject: [PATCH v4 1/4] media: uapi: Clarify MBUS color component order for serial buses 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: quoted-printable Message-Id: <20251013-csi-bgr-rgb-v4-1-55eab2caa69f@kernel.org> References: <20251013-csi-bgr-rgb-v4-0-55eab2caa69f@kernel.org> In-Reply-To: <20251013-csi-bgr-rgb-v4-0-55eab2caa69f@kernel.org> To: Mauro Carvalho Chehab , Mats Randgaard , Alain Volmat , Sakari Ailus , Hans Verkuil , Laurent Pinchart Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Hans Verkuil , Dave Stevenson , Maxime Ripard X-Mailer: b4 0.14.2 The subdev format documentation has a subsection describing how to use the media bus pixel codes for serial buses. While it describes the sampling part well, it doesn't really describe the current convention used for the components order. Let's improve that. Signed-off-by: Maxime Ripard --- Documentation/userspace-api/media/v4l/subdev-formats.rst | 14 ++++++++----= -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Doc= umentation/userspace-api/media/v4l/subdev-formats.rst index 2a94371448dc07e5c7097421bd82f42dcd7e21aa..8e92f784abd8123f9ea950f954a= 60af56ee76dbe 100644 --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst @@ -158,16 +158,18 @@ formats in memory (a raw Bayer image won't be magical= ly converted to JPEG just by storing it to memory), there is no one-to-one correspondence between them. =20 The media bus pixel codes document parallel formats. Should the pixel data= be transported over a serial bus, the media bus pixel code that describes a -parallel format that transfers a sample on a single clock cycle is used. F= or -instance, both MEDIA_BUS_FMT_BGR888_1X24 and MEDIA_BUS_FMT_BGR888_3X8 are = used -on parallel busses for transferring an 8 bits per sample BGR data, whereas= on -serial busses the data in this format is only referred to using -MEDIA_BUS_FMT_BGR888_1X24. This is because there is effectively only a sin= gle -way to transport that format on the serial busses. +parallel format that transfers a sample on a single clock cycle is used. T= he +color component order used is the same used on the serial bus. For instanc= e, +both MEDIA_BUS_FMT_BGR888_1X24 and MEDIA_BUS_FMT_BGR888_3X8 are used on pa= rallel +busses for transferring an 8 bits per sample BGR data, whereas on serial b= usses +the data in this format is only referred to using MEDIA_BUS_FMT_BGR888_1X2= 4, +with BGR meaning that the blue component is transmitted first, then green,= then +red. This is because there is effectively only a single way to transport t= hat +format on the serial busses. =20 Packed RGB Formats ^^^^^^^^^^^^^^^^^^ =20 Those formats transfer pixel data as red, green and blue components. The --=20 2.51.0