From patchwork Mon Jul 31 08:29:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 13334020 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1D9B3C04FDF for ; Mon, 31 Jul 2023 08:31:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=VKwnV/XD6nZtjAWCev2iLUMPl4z/uUXn0xlMegbbH8o=; b=fHIJxs4P5gdv+E ZRvbX0AXkcJMJSRFNO5Y5knu54TnT5XvZIT3rckFqDZNOiJQx6wUEJdbnU0wErwee14zs1gy1VAU8 zCH6vzncEvxnik6UWNEYCILOLcxtmQi+PNJkjE25QdST3yrDez92As8iqx4rJn+t4r7ijR9U6lvJL gS0rse2vVu3NH0Vhl45Izt2BStbsorrXqDyjJEUGKf0Nfv+K0VuM4l8uHVJxVYueJ2tVrbgEZhvWv JX2jKcYsvh6Zyb8+UpsUthTInpADsa0qZY1Ebp1qP9MUTJ98mKCvXD10FSLxgVjOtxAK4d+Fnnr+0 gLocigXc4RTpos+yrWRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qQOIR-00EXWd-1u; Mon, 31 Jul 2023 08:30:31 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qQOHv-00EXGf-0D for linux-arm-kernel@lists.infradead.org; Mon, 31 Jul 2023 08:30:00 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 36V8Trdh038442; Mon, 31 Jul 2023 03:29:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1690792193; bh=PDQzrcsyIWoQUkN7yFLXQsVX+NVhWg1yd6L7eS4+MDM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=s+nnnv2BvDOYsMSryZ028LknFrgCFwybH3BonV0iH3EPdjEVb5qN5ZJ2pEmKhIt4U 6g9fN0eCUHF4HI32S9zVriWWjglk940wn0uyQewYgjmhgHe5QQ40cNXbuT9oR+HYSQ NOaI0h7NjdironuSftAgLDT35Gnw3I1T46P0K8+4= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 36V8Tref012016 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 31 Jul 2023 03:29:53 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 31 Jul 2023 03:29:53 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 31 Jul 2023 03:29:53 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 36V8TqdF042012; Mon, 31 Jul 2023 03:29:53 -0500 From: Jai Luthra To: Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sakari Ailus , Laurent Pinchart , Tomi Valkeinen CC: , , , , Mauro Carvalho Chehab , Maxime Ripard , , Benoit Parrot , Vaishnav Achath , Vignesh Raghavendra , , , Subject: [PATCH v8 14/16] media: cadence: csi2rx: Support RAW8 and RAW10 formats Date: Mon, 31 Jul 2023 13:59:32 +0530 Message-ID: <20230731-upstream_csi-v8-14-fb7d3661c2c9@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230731-upstream_csi-v8-0-fb7d3661c2c9@ti.com> References: <20230731-upstream_csi-v8-0-fb7d3661c2c9@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1313; i=j-luthra@ti.com; h=from:subject:message-id; bh=AKVjO0CK0Wb+0rYPtuwRRSbLnnBHaMvq8vFCll7HWBQ=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBkx2xv5CU9imuLg6j7xlbdDkY3VAi/AN3bV9tUT QkMjlIkJumJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZMdsbwAKCRBD3pH5JJpx RXypEACCCViMSrv9s7qtfsLxhLdVVF/l9BXqyUQ7b1kx8WE0LdBrhEiJnwQSeOhlI5/hGat/nYu MdyJprqFWymw5wIIOIGCu4p6oBNyEnlj+LNQtAPY6kDX0TWIXCpkdaY75H7ZYCuixGV0rBC5RjL F+DhMfgtYNIFvBG9fQT8GSQsHRL6FdyKBjj15H709ukiFQic+Q/BS1XRtveTs7LN934Ai2K4EeX +SDc4cwn3DMFnsmJodMOiGLPXKEG+UdpSpN5oYJm3aI0sOMLMYxCSCHBEL9pc1SF5Uoq6Tii+kT SpoAz4FXvssm2/IK+VYXFIDcywqU9Zw/l0JL487p0suGsTs/93PS+J23F/EHe3lRW3gLyPj6nVW m3beHOkV5Jq8piewXKtMKMhEykiQaH/WH64ubNu58zRDFWXfMzgPDvEuIXD1ow1J9JoXRx59+Uo KUxzJT56K0SxrRYJ3WVuhPuCXzEGORODgimPa6GAUD7LWlGaHeq0BH4u78SUgOWlBmABO3fwrUu dLA6Jcs8f4/SWJ9oxowz/SMcU6U/ux5V2xDsW2O37uaEoBoQhVcV6mpaWsnCQX9aLHmfOaGON4g tWp3nilNj9WaZyPUcbaPM7TFLg4d5+AH9U/ZK0GH2hiNmSSVidRheQlHJf7VSLEVl+wUeVNHf93 EP4z/or+creRUfA== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230731_012959_186982_D7618CE8 X-CRM114-Status: GOOD ( 11.94 ) 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 Many CSI-2 sensors (specifically IMX219) send RAW bayer data instead of processed YUV or RGB, so add support for 8-bit and 10-bit bayer formats. Signed-off-by: Jai Luthra Reviewed-by: Tomi Valkeinen --- New in v8 drivers/media/platform/cadence/cdns-csi2rx.c | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/drivers/media/platform/cadence/cdns-csi2rx.c b/drivers/media/platform/cadence/cdns-csi2rx.c index aec33d28a66f..bac74474841a 100644 --- a/drivers/media/platform/cadence/cdns-csi2rx.c +++ b/drivers/media/platform/cadence/cdns-csi2rx.c @@ -122,6 +122,38 @@ static const struct csi2rx_fmt formats[] = { .code = MEDIA_BUS_FMT_VYUY8_1X16, .bpp = 16, }, + { + .code = MEDIA_BUS_FMT_SBGGR8_1X8, + .bpp = 8, + }, + { + .code = MEDIA_BUS_FMT_SGBRG8_1X8, + .bpp = 8, + }, + { + .code = MEDIA_BUS_FMT_SGRBG8_1X8, + .bpp = 8, + }, + { + .code = MEDIA_BUS_FMT_SRGGB8_1X8, + .bpp = 8, + }, + { + .code = MEDIA_BUS_FMT_SBGGR10_1X10, + .bpp = 10, + }, + { + .code = MEDIA_BUS_FMT_SGBRG10_1X10, + .bpp = 10, + }, + { + .code = MEDIA_BUS_FMT_SGRBG10_1X10, + .bpp = 10, + }, + { + .code = MEDIA_BUS_FMT_SRGGB10_1X10, + .bpp = 10, + }, }; static const struct csi2rx_fmt *csi2rx_get_fmt_by_code(u32 code)