From patchwork Tue Apr 27 12:06:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 12226607 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A84AAC433ED for ; Tue, 27 Apr 2021 12:09:54 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2135261007 for ; Tue, 27 Apr 2021 12:09:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2135261007 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=Op/YoW8e9baBHE9YCt1Qklg1gTwmylBriyviUg0fQwA=; b=Ujc0gwNIxmoRCtPwaInEgSJyL Dbol1SY/w7ucEMrACvJWDA3ggC1LBDXNXVOgtd+B45/MP/yFO472ezdHabPb4nKKCvkqQzT0ZUKWS NxfLgUogQj1BWnLkyNVy4M3c6ZbygfAaH1cCmGRFmaWoix3r4wXYL9tx1L0ADMSAIV+cFdRLpzJ7y LpaZWtymCya+uVXkVWd12I4edLEmuHuyaUaTV+0VeMRJO6wm2hhZ902T9rvbQmFTXzfHXJkjjzHS6 kknf0wpVexaksU1QwPI/Mj/XkmAhdG2ZHDVQbKVzdu2mHVTGCQoF6ACpL8yK5eVfDNLopAcTD/Cdf Rc1nn6dHA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lbMVd-001aBd-F7; Tue, 27 Apr 2021 12:08:09 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbMV3-001a5z-Fp for linux-arm-kernel@desiato.infradead.org; Tue, 27 Apr 2021 12:07:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=5b0PkQUEXdzvfQXaAbcYshJsF53c29pH4UXnYc3GLEY=; b=fmPpkVB+acw+cGncNfhDhGFkPz UjvPfTwsQcR8zLqiLSCr9vQzQOaIS4xZe5eqSnG1kP8Cw+5W7qQSwJDyGBEHTiALTU1Srxq/i7u7A 2AyMK/Bpg2SnodL1+Fhei3TaGK2+5SU3myUUvt31fiCtCvAQOS3BPkRzAOCF1dgjQ0ROyDull+oym ZaEJCQdXoIP1S0iCiJjDTmKvlAfrgF1Fxdyfh6PHL92iwfkzdCvpIGtQMYOMRVJHjGnEhiH96/wti tvXPb0ceKHmk8m0gL5b8yxDCeSMjQyin+rUqXbwHCyq2ij+zecyvM6LANahv9MItoKDGk0iIlgqQE 4/gdN6+Q==; Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbMV0-00GiB5-Rk for linux-arm-kernel@lists.infradead.org; Tue, 27 Apr 2021 12:07:32 +0000 Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lbMUm-0006DG-0C; Tue, 27 Apr 2021 14:07:16 +0200 Received: from mfe by dude02.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lbMUl-0005ul-Aj; Tue, 27 Apr 2021 14:07:15 +0200 From: Marco Felsch To: p.zabel@pengutronix.de, mchehab@kernel.org, slongerbeam@gmail.com, hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com, sakari.ailus@linux.intel.com Cc: linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 1/6] media: uapi: Add MEDIA_BUS_FMT_SGRGB_IGIG_GBGR_IGIG media bus formats Date: Tue, 27 Apr 2021 14:06:56 +0200 Message-Id: <20210427120701.21809-2-m.felsch@pengutronix.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210427120701.21809-1-m.felsch@pengutronix.de> References: <20210427120701.21809-1-m.felsch@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::28 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210427_050730_904278_B972BEEB X-CRM114-Status: GOOD ( 11.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add special 8/12bit bayer media bus format for the OnSemi AR0237IR camera sensor [1]. OnSemi calls this format RGB-IR, the pixel array with the interleaved IR pixels looks like: | G | R | G | B | ... +----+----+----+----+--- | IR | G | IR | G | ... +----+----+----+----+--- | G | B | G | R | ... +----+----+----+----+--- | IR | G | IR | G | ... +----+----+----+----+--- | .. | .. | .. | .. | .. [1] https://www.framos.com/media/pdf/96/ac/8f/AR0237CS-D-PDF-framos.pdf Signed-off-by: Marco Felsch --- .../media/v4l/subdev-formats.rst | 42 +++++++++++++++++++ include/uapi/linux/media-bus-format.h | 4 +- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst index bd68588b2683..d774ccd57c1b 100644 --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst @@ -2252,6 +2252,27 @@ organization is given as an example for the first pixel only. - g\ :sub:`2` - g\ :sub:`1` - g\ :sub:`0` + * .. _MEDIA_BUS_FMT_SGRGB_IGIG_GBGR_IGIG8_1X8: + + - MEDIA_BUS_FMT_SGRGB_IGIG_GBGR_IGIG8_1X8 + - 0x3021 + - + - + - + - + - + - + - + - + - + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` * .. _MEDIA-BUS-FMT-SRGGB8-1X8: - MEDIA_BUS_FMT_SRGGB8_1X8 @@ -2748,6 +2769,27 @@ organization is given as an example for the first pixel only. - g\ :sub:`2` - g\ :sub:`1` - g\ :sub:`0` + * .. _MEDIA_BUS_FMT_SGRGB_IGIG_GBGR_IGIG12_1X12: + + - MEDIA_BUS_FMT_SGRGB_IGIG_GBGR_IGIG12_1X12 + - 0x3022 + - + - + - + - + - + - g\ :sub:`11` + - g\ :sub:`10` + - g\ :sub:`9` + - g\ :sub:`8` + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` * .. _MEDIA-BUS-FMT-SRGGB12-1X12: - MEDIA_BUS_FMT_SRGGB12_1X12 diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h index 0dfc11ee243a..cdd995e44926 100644 --- a/include/uapi/linux/media-bus-format.h +++ b/include/uapi/linux/media-bus-format.h @@ -112,10 +112,11 @@ #define MEDIA_BUS_FMT_YUV16_1X48 0x202a #define MEDIA_BUS_FMT_UYYVYY16_0_5X48 0x202b -/* Bayer - next is 0x3021 */ +/* Bayer - next is 0x3023 */ #define MEDIA_BUS_FMT_SBGGR8_1X8 0x3001 #define MEDIA_BUS_FMT_SGBRG8_1X8 0x3013 #define MEDIA_BUS_FMT_SGRBG8_1X8 0x3002 +#define MEDIA_BUS_FMT_SGRGB_IGIG_GBGR_IGIG8_1X8 0x3021 #define MEDIA_BUS_FMT_SRGGB8_1X8 0x3014 #define MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8 0x3015 #define MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8 0x3016 @@ -136,6 +137,7 @@ #define MEDIA_BUS_FMT_SBGGR12_1X12 0x3008 #define MEDIA_BUS_FMT_SGBRG12_1X12 0x3010 #define MEDIA_BUS_FMT_SGRBG12_1X12 0x3011 +#define MEDIA_BUS_FMT_SGRGB_IGIG_GBGR_IGIG12_1X12 0x3022 #define MEDIA_BUS_FMT_SRGGB12_1X12 0x3012 #define MEDIA_BUS_FMT_SBGGR14_1X14 0x3019 #define MEDIA_BUS_FMT_SGBRG14_1X14 0x301a