From nobody Sat Oct 11 00:21:48 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 979DD23C50F; Thu, 12 Jun 2025 12:53:54 +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=1749732834; cv=none; b=dHdkSrt5gD/DqTY9IkVhHZVLzqMWl9oHiDLKsqpRZ+JdEPCKvQL+08IU4rhH1688y3ASmLYxhSsdHNOKUAkPyhQ4/I1zSmcxG2nA30DO0epBavzrU+RL/CKkXoV0X05FaFsbu3p8+icXJyigwI9rg+Gd/lsIsOvNEwjnnNBShSs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749732834; c=relaxed/simple; bh=7G0cws/Pe3XBneIH9rCyYiUV0a/VekpAv58Mjc90PL4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BDBaBmEYNnI3DDOb0k1iy8Z+HD0aDkZ3YiBRjMs54GU6yDdVauw256MqsunrxHRgKvwnMxqRBF9sDRoao/Y+D3wGQtahSeAef5sdMde/0I/InMbQuWz7HVMZarSEFnYy3hfzwJbIRyvu3zTLsOb83Rg5M9TDhprY3cwhFAkykec= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mrlBzqse; 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="mrlBzqse" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AACF9C4CEEA; Thu, 12 Jun 2025 12:53:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1749732834; bh=7G0cws/Pe3XBneIH9rCyYiUV0a/VekpAv58Mjc90PL4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=mrlBzqsepPzF+PUq2GYU6LkukotyTI9pvbrzSEyORk0GhF1O6IRtG5L6eIE4y34WV H10P24rpp62YDB5pogFudZUX26qKBXIc1DHjJ+ltBFcSoVo0xSNEHwWJv6wLi/vz6u GSFofoG0AO672D9MKDT3z9TZbzyo27zU1gmhXNN7MzhSc1VlwJXRWXI0ueetPUeF9C qTA2ds2MAMvOZ1RdmIbwATwyK7oSZzZzRXrwesV3TOmioaRGSQGY9jRkDLB4Jm3ZA8 YOusdhpApujsWiORti/tAqHbWRiky/JlSpCha9XgDrALGuVQdIgDHMBwZe0JNHj0Ap EOockdCOGsFRQ== From: Maxime Ripard Date: Thu, 12 Jun 2025 14:53:39 +0200 Subject: [PATCH 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: <20250612-csi-bgr-rgb-v1-1-dc8a309118f8@kernel.org> References: <20250612-csi-bgr-rgb-v1-0-dc8a309118f8@kernel.org> In-Reply-To: <20250612-csi-bgr-rgb-v1-0-dc8a309118f8@kernel.org> To: Mauro Carvalho Chehab , Hans Verkuil , Mats Randgaard , Alain Volmat , Sakari Ailus Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Hans Verkuil , Dave Stevenson , Maxime Ripard X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2324; i=mripard@kernel.org; h=from:subject:message-id; bh=7G0cws/Pe3XBneIH9rCyYiUV0a/VekpAv58Mjc90PL4=; b=owGbwMvMwCmsHn9OcpHtvjLG02pJDBleZ2+VbD3x6+z+//mCC3k8Px+p3r5LcIP908Oca6PuL jFy3+7t1DGVhUGYk0FWTJHliUzY6eXti6sc7Ff+gJnDygQyhIGLUwAmMoefsT69t7dDWXBVYPiF RRxzs2dYz+jdkHTOMXvR7mvqHbY6PLtfNR+x7HLZPCP+SF76z7vWoowNt7t6XjXV7HroHP286Mu HVTw3CoSMnu9I0g+QvlawU8pA8WLWvW1vNNnC1FXvvNiwKnYTAA== X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D 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.49.0