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 From patchwork Tue Apr 27 12:06:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 12226613 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 CB219C433B4 for ; Tue, 27 Apr 2021 12:10:18 +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 7AC0361007 for ; Tue, 27 Apr 2021 12:10:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AC0361007 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=HlArCkF2b2plNrYI80twpRRvGKC8DNSx62Pof4OKZEA=; b=SqTVJN/i/AIg5z2hlqxftWjju LhOYSMIf4zlcwinKF0QMBe8WrN8IhpFhY1JesbpNUntMqKshDQyNqcl88N2gle374fRs460bJ0BhN +0FvlkXP5jase3YGZYsl/CvxL/epaAF+4X6vH9K9rFgicQnHotiZ3kxcKOOdea8r77GgpILUS4aGt yvx6K7PXbLYrmta9XB1MGPWSVocSC0HYp80G0rvjcMmyT84dfmr5/a3uPieP9ss61RT4BXLDugE1n Wh8Z7cnuOg+3yrjcQzSRKLnb8MF0DxkgB3FmUCHvrufMdBhunvXjZDFb2YHpeNShFq1Sg7MtvJ2z4 6Uk7Kd/rg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lbMVO-001aA8-7b; Tue, 27 Apr 2021 12:07:54 +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 1lbMV2-001a5o-00 for linux-arm-kernel@desiato.infradead.org; Tue, 27 Apr 2021 12:07:32 +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=9NVk8r9weUVDBhYOPyHYWPRF8TwojXmJOVcIw3pYy5g=; b=42EiI3dEeo2WPNwp7c4Y5nASyi r9F+DM9PzhASbEGnT6iV/RUcW9bpQyUnzrmyrGb1UU6yic9XFdYczp3eTjEkj2hbytruVhE/I7Ij5 2hYjo0irCi1OpUWa+WwowYNgdmk1XeDkOlUAbGbk9pLjIAY7/btYfCmEjMO2WuZHITq6jdguV6mHt y+DlNEKgeBQs+8WVgF6MV+G+K9GiCQ8f8RhVIKPvJIe16mJqIQLZhZJVYzuw3Yni7hDWBxnvUo75h KTEc8I+gBimO7+1KCydbi1QiRoICxiwL58G3C4CzbOuviiYoUvO5ybOAZiihpvUExCYJfTy5XMF8O T0YGICPQ==; 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 1lbMUz-00GiAo-DD for linux-arm-kernel@lists.infradead.org; Tue, 27 Apr 2021 12:07:30 +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-0006DH-0K; 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-0005uo-BA; 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 2/6] media: v4l: Add definition for bayered IR formats Date: Tue, 27 Apr 2021 14:06:57 +0200 Message-Id: <20210427120701.21809-3-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_050729_451781_DBA6C032 X-CRM114-Status: GOOD ( 10.52 ) 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 Reviewed-by: Philipp Zabel --- include/uapi/linux/videodev2.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 311a01cc5775..45ffd3867394 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -632,6 +632,8 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ #define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */ #define V4L2_PIX_FMT_SRGGB8 v4l2_fourcc('R', 'G', 'G', 'B') /* 8 RGRG.. GBGB.. */ + /* 8bit infrared interleaved bayer format */ +#define V4L2_PIX_FMT_SGRGB_IGIG_GBGR_IGIG8 v4l2_fourcc('I', 'R', '0', '8') /* 8 GRGB.. IGIG.. GBGR.. IGIG.. */ #define V4L2_PIX_FMT_SBGGR10 v4l2_fourcc('B', 'G', '1', '0') /* 10 BGBG.. GRGR.. */ #define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */ #define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */ @@ -673,6 +675,8 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_SGBRG16 v4l2_fourcc('G', 'B', '1', '6') /* 16 GBGB.. RGRG.. */ #define V4L2_PIX_FMT_SGRBG16 v4l2_fourcc('G', 'R', '1', '6') /* 16 GRGR.. BGBG.. */ #define V4L2_PIX_FMT_SRGGB16 v4l2_fourcc('R', 'G', '1', '6') /* 16 RGRG.. GBGB.. */ + /* 16bit infrared interleaved bayer format */ +#define V4L2_PIX_FMT_SGRGB_IGIG_GBGR_IGIG16 v4l2_fourcc('I', 'R', '1', '6') /* 16 GRGB.. IGIG.. GBGR.. IGIG.. */ /* HSV formats */ #define V4L2_PIX_FMT_HSV24 v4l2_fourcc('H', 'S', 'V', '3') From patchwork Tue Apr 27 12:06:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 12226615 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=ham 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 7873CC433ED for ; Tue, 27 Apr 2021 12:10:20 +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 24670613B1 for ; Tue, 27 Apr 2021 12:10:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24670613B1 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=aHErSj9tt1QmIS/fQ5qBBi/pku2WOHZyISXVzE9PVx0=; b=JNBtnhCU3WGgxHcrbjuvkaQuq R3Yhct4k3O8lwm4hQGoCtGHQo86z4h4IoeEHgd+Qh43mIA279228AYdALAm2ZH9RofddB3/SoWFhB HbYC86kM8Euf6iIz/tcwXQ7sWWMekopIcC0a5i8dcEsTFFCNmdk7sRngzdQCDgfpvYkP3wJ5P92dn bLBTQ3TLaKklHqjgsW53PK85/TU8bfeNm4hh5H4f0xeKjqaI9Wjv/4ccf5O9CaCu5znOTLenum1My QlvnwUHweB8PYaQ7ZRplS60vkqMjPrlOzuHyaT4/QuIAUnNS2zo+t5bh7H6PDEV7C9d4GRzkJt7Hl Crncg/LLw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lbMWD-001aKD-8O; Tue, 27 Apr 2021 12:08:45 +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 1lbMVI-001a9h-86 for linux-arm-kernel@desiato.infradead.org; Tue, 27 Apr 2021 12:07:49 +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=2SwywBWmw0QAaXirGd34IAtaPaRk5C4qHObUzOUgZys=; b=rEQO1EeK056mc1t0kdm/luSPZz Um7YbhmhKfNqWC49kCwBpCzrpAJGRbuEamJk0a47vCV+4QaXG/sr0fZqjdLoIHk5fnVxa/SKEy+nS fLft71AsqSFQIIOBUSoJtISwHXs6cy6AgHdpWAFH69B1SaFpTDcj0QgJ9hZj8V5J6EUhAqxN9Ad3T DcYyR1bu3TjdD8P7bGYKkWGc1BOJRHk5sOHmWBasmnXKcAz1ib+KlbCrSyPrAcrW4bAZZ0T9SuHkU gUMauw+PHVqagB/2AzzW4BqsusyHkg/tbX+LuBeVcefGy1woJkX9ARYy7fFzSjMOFaAFY06fFXPZU D030d9iw==; 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 1lbMVF-00GiD9-L5 for linux-arm-kernel@lists.infradead.org; Tue, 27 Apr 2021 12:07:47 +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-0006DI-0E; 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-0005ur-Bo; 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 3/6] media: v4l2-ioctl.c: add V4L2_PIX_FMT_SGRGB_IGIG_GBGR_IGIG to v4l_fill_fmtdesc Date: Tue, 27 Apr 2021 14:06:58 +0200 Message-Id: <20210427120701.21809-4-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_050745_694697_48C8D417 X-CRM114-Status: GOOD ( 10.06 ) 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 custom OnSemi RGB-IR pixel formats to the list of pixelformats that v4l_fill_fmtdesc() understands. This format is used by the OnSemi AR0237IR camera sensor [1]. [1] https://www.framos.com/media/pdf/96/ac/8f/AR0237CS-D-PDF-framos.pdf Signed-off-by: Marco Felsch Reviewed-by: Philipp Zabel --- drivers/media/v4l2-core/v4l2-ioctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 6a5d1c6d11d6..e9d0c9417719 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1337,6 +1337,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) case V4L2_PIX_FMT_SGBRG8: descr = "8-bit Bayer GBGB/RGRG"; break; case V4L2_PIX_FMT_SGRBG8: descr = "8-bit Bayer GRGR/BGBG"; break; case V4L2_PIX_FMT_SRGGB8: descr = "8-bit Bayer RGRG/GBGB"; break; + case V4L2_PIX_FMT_SGRGB_IGIG_GBGR_IGIG8: descr = "8-bit GRGB/IGIG/GBGR/IGIG"; break; case V4L2_PIX_FMT_SBGGR10: descr = "10-bit Bayer BGBG/GRGR"; break; case V4L2_PIX_FMT_SGBRG10: descr = "10-bit Bayer GBGB/RGRG"; break; case V4L2_PIX_FMT_SGRBG10: descr = "10-bit Bayer GRGR/BGBG"; break; @@ -1377,6 +1378,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) case V4L2_PIX_FMT_SGBRG16: descr = "16-bit Bayer GBGB/RGRG"; break; case V4L2_PIX_FMT_SGRBG16: descr = "16-bit Bayer GRGR/BGBG"; break; case V4L2_PIX_FMT_SRGGB16: descr = "16-bit Bayer RGRG/GBGB"; break; + case V4L2_PIX_FMT_SGRGB_IGIG_GBGR_IGIG16: descr = "16-bit GRGB/IGIG/GBGR/IGIG"; break; case V4L2_PIX_FMT_SN9C20X_I420: descr = "GSPCA SN9C20X I420"; break; case V4L2_PIX_FMT_SPCA501: descr = "GSPCA SPCA501"; break; case V4L2_PIX_FMT_SPCA505: descr = "GSPCA SPCA505"; break; From patchwork Tue Apr 27 12:06:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 12226611 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=ham 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 ABFCAC433B4 for ; Tue, 27 Apr 2021 12:10:01 +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 50E98611BE for ; Tue, 27 Apr 2021 12:10:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 50E98611BE 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=Ief4pDqkZ1SONkX6oE9jKp45EolWMLXw14vK1S2TNxQ=; b=XUwRlI33XViSsvx/P/BiuGnH0 HZHu+w20zwpVYszBMhHFlwsA3+sF8BnC8QtsLo7EVDFsixHhq1s9QuYi1CgvVwUNYQP9cyastjHQ3 6uJXFpwn1i8ODulWAgRb4jZMkpGuWJF1EcaVh1ifjIXXj/Su5hh3XBuGyFUD6WALuIoE8fdBoGXWI LlSrkhbmLPauXUDAf6iyeKyViJ27MN7yeX09/rgL/j6dWfZ3dkp1rI0JCv2eKqcdwErXk2fbpIltp fFBLOwiaRZPL0Fldo38QBJh8eaPsgqGXtRJYQJGmnkHcHSpu6Msw+0rNQwmE1oavClI2CyuMzPdr2 6DwXw2JnQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lbMVp-001aDp-2v; Tue, 27 Apr 2021 12:08:21 +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 1lbMVB-001a6b-59 for linux-arm-kernel@desiato.infradead.org; Tue, 27 Apr 2021 12:07:41 +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=/yxavfAtn5sQ7eM86+6MCsfdb5f60fGQP+1AccRZe3A=; b=lolTgM453fKLK4kvciR8t0v68b R9oWxvFOXDIShjAD769bKenyjUemdPS5nYxsFpd+nJ7u6F7I9G4I0mbL+z6i+L1GfoMe4jDVw8RgX kbBnoWNR0uxAPo+FFSszlpKYQUefr6cCyMbX1377UnLjqLQisT/HYqnhjkmzkzDhC9bJLuuSN2dqw b5XSnVSnKvOZhN8oqALVw2ijeSw6bYOJi2tFJJCJRklRv+lp8nqZFY5VVXfw5Ihkz+QO8mt+u4NMW 3ZDjlMVLE7Gg53FLYjzYIVMvrr5CMPEt8KDvZQB5DEAw3XYmOtDrzpNDA4Bp06BSpPNlms2UW0paw 8SdKK91g==; 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 1lbMV8-00GiC0-KB for linux-arm-kernel@lists.infradead.org; Tue, 27 Apr 2021 12:07:39 +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-0006DJ-09; 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-0005uu-CC; 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 4/6] media: video-mux: add new SGRGB_IGIG_GBGR_IGIG format support Date: Tue, 27 Apr 2021 14:06:59 +0200 Message-Id: <20210427120701.21809-5-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_050738_689751_8485AD85 X-CRM114-Status: UNSURE ( 9.63 ) X-CRM114-Notice: Please train this message. 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 custom OnSemi RGB-IR pixel formats. This format is used by the OnSemi AR0237IR camera sensor [1]. [1] https://www.framos.com/media/pdf/96/ac/8f/AR0237CS-D-PDF-framos.pdf Signed-off-by: Marco Felsch Reviewed-by: Philipp Zabel --- drivers/media/platform/video-mux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/video-mux.c b/drivers/media/platform/video-mux.c index 133122e38515..aaec24d60101 100644 --- a/drivers/media/platform/video-mux.c +++ b/drivers/media/platform/video-mux.c @@ -268,6 +268,7 @@ static int video_mux_set_format(struct v4l2_subdev *sd, case MEDIA_BUS_FMT_SGBRG8_1X8: case MEDIA_BUS_FMT_SGRBG8_1X8: case MEDIA_BUS_FMT_SRGGB8_1X8: + case MEDIA_BUS_FMT_SGRGB_IGIG_GBGR_IGIG8_1X8: case MEDIA_BUS_FMT_SBGGR10_1X10: case MEDIA_BUS_FMT_SGBRG10_1X10: case MEDIA_BUS_FMT_SGRBG10_1X10: @@ -276,6 +277,7 @@ static int video_mux_set_format(struct v4l2_subdev *sd, case MEDIA_BUS_FMT_SGBRG12_1X12: case MEDIA_BUS_FMT_SGRBG12_1X12: case MEDIA_BUS_FMT_SRGGB12_1X12: + case MEDIA_BUS_FMT_SGRGB_IGIG_GBGR_IGIG12_1X12: case MEDIA_BUS_FMT_SBGGR14_1X14: case MEDIA_BUS_FMT_SGBRG14_1X14: case MEDIA_BUS_FMT_SGRBG14_1X14: From patchwork Tue Apr 27 12:07:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 12226617 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 13B1EC43460 for ; Tue, 27 Apr 2021 12:10:21 +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 BBCAF610FA for ; Tue, 27 Apr 2021 12:10:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BBCAF610FA 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=yHCeX4ORkp0QvXdF2hSX/RJyWA7IE6HcLYxqQLUgtqs=; b=ZuKVPoUG+JlWcDEsQNqbMl9ZX PXlCnrmZWZjwSIwC0IsZhUpQNr217cWLnOjnf/fYG1AZhVcd+o+RaJPzUZpzDB7i4GGbQO8QImQRj rHCwU/14+hna5nL8P9fqrhEig3i3wJZ9dDMOc4eiwxxQ6wjQhVon/zh+7k2TAeh3yJLxxpneLgoPS qvBGsxy2MzRQidJwSo4vsM78ohHFPZ5mW/oUKQf9H9qkzN9SOweonZOc+6+CMAhmdO2x+fzEggdo9 AsZIH9FCUe2zBozMM3mQzncMELcpzPKzm4rDwvkPgg9RBfFDg4z7dk8oPkV1LV0cko6/q3EKip4Gy gCLIYCwUQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lbMW0-001aHO-KR; Tue, 27 Apr 2021 12:08:32 +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 1lbMVB-001a6c-7C for linux-arm-kernel@desiato.infradead.org; Tue, 27 Apr 2021 12:07:41 +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=nmq/ytTPRHqz0x03nld/8E/ZmOvyh+LHypdlu3+oi/0=; b=un23On4IqFOtBGGhHVz4EFKsga wIVhg91LrQXjqwQh34XOW1sHsB3BzLemmXvaStmvcM5OREYmQHVSLZF82RgqpQbMQL0FywR+WKqVQ gUhimcYHdcsg9WnI+aC48/oWJN1cy4yRN+pGdgbLu7LyAMRe0oyRZRUBjVskqE1hUpg5PG4fvAInn L4TuPk+QDsKtqG6A/NWwmjbFMmEGlayXZJ9HYBLec29CKRtv604ni/LAJqWMhupKujqONdto5ynY9 h1MKsxuI6ls//QCj4F0lsVMVJi0DlIa4gHL6xzkJYPSoo/kP/5oVr82T0mMG63hG4IXssJqGJIhA2 q+LReLUg==; 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 1lbMV8-00GiC2-KB for linux-arm-kernel@lists.infradead.org; Tue, 27 Apr 2021 12:07:40 +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-0006DK-0F; 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-0005ux-Ci; 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 5/6] gpu: ipu-v3: add custom SGRGB_IGIG_GBGR_IGIG format support Date: Tue, 27 Apr 2021 14:07:00 +0200 Message-Id: <20210427120701.21809-6-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_050738_689619_CC7FE884 X-CRM114-Status: UNSURE ( 9.49 ) X-CRM114-Notice: Please train this message. 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 custom OnSemi RGB-IR pixel formats to the ipu library functions. This format is used by the OnSemi AR0237IR camera sensor [1]. [1] https://www.framos.com/media/pdf/96/ac/8f/AR0237CS-D-PDF-framos.pdf Signed-off-by: Marco Felsch Reviewed-by: Philipp Zabel --- drivers/gpu/ipu-v3/ipu-cpmem.c | 2 ++ drivers/gpu/ipu-v3/ipu-csi.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c index a1c85d1521f5..c579aafb60ba 100644 --- a/drivers/gpu/ipu-v3/ipu-cpmem.c +++ b/drivers/gpu/ipu-v3/ipu-cpmem.c @@ -861,6 +861,7 @@ int ipu_cpmem_set_image(struct ipuv3_channel *ch, struct ipu_image *image) case V4L2_PIX_FMT_SGBRG8: case V4L2_PIX_FMT_SGRBG8: case V4L2_PIX_FMT_SRGGB8: + case V4L2_PIX_FMT_SGRGB_IGIG_GBGR_IGIG8: case V4L2_PIX_FMT_GREY: offset = image->rect.left + image->rect.top * pix->bytesperline; break; @@ -868,6 +869,7 @@ int ipu_cpmem_set_image(struct ipuv3_channel *ch, struct ipu_image *image) case V4L2_PIX_FMT_SGBRG16: case V4L2_PIX_FMT_SGRBG16: case V4L2_PIX_FMT_SRGGB16: + case V4L2_PIX_FMT_SGRGB_IGIG_GBGR_IGIG16: case V4L2_PIX_FMT_Y16: offset = image->rect.left * 2 + image->rect.top * pix->bytesperline; diff --git a/drivers/gpu/ipu-v3/ipu-csi.c b/drivers/gpu/ipu-v3/ipu-csi.c index 8ae301eef643..cf7763f50fdf 100644 --- a/drivers/gpu/ipu-v3/ipu-csi.c +++ b/drivers/gpu/ipu-v3/ipu-csi.c @@ -268,6 +268,7 @@ static int mbus_code_to_bus_cfg(struct ipu_csi_bus_config *cfg, u32 mbus_code, case MEDIA_BUS_FMT_SGBRG8_1X8: case MEDIA_BUS_FMT_SGRBG8_1X8: case MEDIA_BUS_FMT_SRGGB8_1X8: + case MEDIA_BUS_FMT_SGRGB_IGIG_GBGR_IGIG8_1X8: case MEDIA_BUS_FMT_Y8_1X8: cfg->data_fmt = CSI_SENS_CONF_DATA_FMT_BAYER; cfg->mipi_dt = MIPI_DT_RAW8; @@ -298,6 +299,7 @@ static int mbus_code_to_bus_cfg(struct ipu_csi_bus_config *cfg, u32 mbus_code, case MEDIA_BUS_FMT_SGBRG12_1X12: case MEDIA_BUS_FMT_SGRBG12_1X12: case MEDIA_BUS_FMT_SRGGB12_1X12: + case MEDIA_BUS_FMT_SGRGB_IGIG_GBGR_IGIG12_1X12: case MEDIA_BUS_FMT_Y12_1X12: cfg->data_fmt = CSI_SENS_CONF_DATA_FMT_BAYER; cfg->mipi_dt = MIPI_DT_RAW12; From patchwork Tue Apr 27 12:07:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 12226605 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 D105BC433B4 for ; Tue, 27 Apr 2021 12:09:33 +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 6F1E3613B2 for ; Tue, 27 Apr 2021 12:09:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F1E3613B2 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=F2wCssuxinHbpX3zhV4MWbwwVeuPXe6uONqmFNSl8d8=; b=YKYvjVMD3pdt2WJQ6PPJxzEUK g5S0Y0PuAXC07v8nBXhYWTeFMkm7Btl+JzWMlvnV7En+3Nu2mTu4pVBGSM6FWyV7BVsHAUuy+Q9WX 6Wk8Y/MaIB6fTw87lTTLsGvdJciAKVea8U8o9FpeVksfgXkkGGNQE1dTI/FFApPSvqbnZTd4KKDjN Utrsp7fSZPttOtkEdKPac8leHZKtuek5fBAomxFdlKD/V4y1mV2rOleCWUwVE8zRYa6Vs8HO+U7yj KFT+SOhf6p523D7hioFjtybWlwOp+ieHY93q1b4JHEVq0OFqo08qiGw0okr6l/hybU7x0WMiZfSeU rNM6zoKTA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lbMV3-001a5q-2n; Tue, 27 Apr 2021 12:07:33 +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 1lbMUy-001a4K-AL for linux-arm-kernel@desiato.infradead.org; Tue, 27 Apr 2021 12:07:29 +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=VHs8nVLWorn0uji7ju48XaztA21JkN7io5pjxH2VFAw=; b=rCEvYl8JLQvislnWJRCUF+G4K/ 1EdFayF4uma5MEHzMUOJwb0sLo1x+/bdSvtbyahyxxoCC/IGGtU5dRj1UtU+pSK2cBfZ+gxscSbLa 4dTB/TIL4ghsbvHh4y9CTF2vbvBVGzGJQ70oGEhrEtnuOzXjZC+jNSpZI/y+GMACrpVsu4nofr5I9 1I5Kze2K5sKL2b4NMpkzn/0AIaqVeyThMy+W1ETbjuD7Ejc8grb56NTB+DbzlhCRCHvWyySFfHjaM UisupK/JPnCYotNzmARqUSIb8CndQ0hwYMgbJx6mYNbQmEBvQb37Tsktx2A5jgjEaFT4P5FBd2d9Z SEyWCqtg==; 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 1lbMUv-00Gi9c-Jl for linux-arm-kernel@lists.infradead.org; Tue, 27 Apr 2021 12:07:27 +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-0006DL-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-0005v0-D6; 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 6/6] media: imx: csi: add custom SGRGB_IGIG_GBGR_IGIG format support Date: Tue, 27 Apr 2021 14:07:01 +0200 Message-Id: <20210427120701.21809-7-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_050725_675859_CCFA51B2 X-CRM114-Status: GOOD ( 11.65 ) 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 custom OnSemi RGB-IR pixel formats which is used by the OnSemi AR0237IR sensor [1]. The colorspace is irrelevant since the user space has to debayer the images. [1] https://www.framos.com/media/pdf/96/ac/8f/AR0237CS-D-PDF-framos.pdf Signed-off-by: Marco Felsch Reviewed-by: Philipp Zabel --- drivers/staging/media/imx/imx-media-csi.c | 2 ++ drivers/staging/media/imx/imx-media-utils.c | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index e3bfd635a89a..1085feacf27f 100644 --- a/drivers/staging/media/imx/imx-media-csi.c +++ b/drivers/staging/media/imx/imx-media-csi.c @@ -448,6 +448,7 @@ static int csi_idmac_setup_channel(struct csi_priv *priv) case V4L2_PIX_FMT_SGBRG8: case V4L2_PIX_FMT_SGRBG8: case V4L2_PIX_FMT_SRGGB8: + case V4L2_PIX_FMT_SGRGB_IGIG_GBGR_IGIG8: case V4L2_PIX_FMT_GREY: burst_size = 16; passthrough_bits = 8; @@ -456,6 +457,7 @@ static int csi_idmac_setup_channel(struct csi_priv *priv) case V4L2_PIX_FMT_SGBRG16: case V4L2_PIX_FMT_SGRBG16: case V4L2_PIX_FMT_SRGGB16: + case V4L2_PIX_FMT_SGRGB_IGIG_GBGR_IGIG16: case V4L2_PIX_FMT_Y10: case V4L2_PIX_FMT_Y12: burst_size = 8; diff --git a/drivers/staging/media/imx/imx-media-utils.c b/drivers/staging/media/imx/imx-media-utils.c index 5128915a5d6f..c4ed8bf89b31 100644 --- a/drivers/staging/media/imx/imx-media-utils.c +++ b/drivers/staging/media/imx/imx-media-utils.c @@ -174,6 +174,18 @@ static const struct imx_media_pixfmt pixel_formats[] = { .cs = IPUV3_COLORSPACE_RGB, .bpp = 16, .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SGRGB_IGIG_GBGR_IGIG8, + .codes = IMX_BUS_FMTS(MEDIA_BUS_FMT_SGRGB_IGIG_GBGR_IGIG8_1X8), + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 8, + .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SGRGB_IGIG_GBGR_IGIG16, + .codes = IMX_BUS_FMTS(MEDIA_BUS_FMT_SGRGB_IGIG_GBGR_IGIG12_1X12), + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 16, + .bayer = true, }, { .fourcc = V4L2_PIX_FMT_GREY, .codes = IMX_BUS_FMTS(