From patchwork Fri Aug 28 13:17:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?S8OpdmluIEwnaMO0cGl0YWw=?= X-Patchwork-Id: 11742777 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BDB16913 for ; Fri, 28 Aug 2020 13:18:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 9378520872 for ; Fri, 28 Aug 2020 13:18:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="26s1Q/Tt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9378520872 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ne0YkMHSXo6vk1u9Fz1KszuFT/nTfgeuGFvO6leBQ9o=; b=26s1Q/TtDPpAoCH9ZIWDY9d7I 0ahWd82kezE9f2qu55tpInsECEpQYFiajCSBOScoznzv9Ezy3aPY/yE7JUyQRJWiN9nKVR5s5xL+i qxrWNweSA0+5uWDmiJHNbMhI792UwwyraEXpFZ20hxflO2TUnShWZr5Q9ug0PNhXw8/yg/zGtAXPg sNgryW4r7IAvmGO3kbaoFo3zl37KNihSxYETrcLjEhLLCfi2vl4M+ITbZ5swsxFJr+H+7Lw14FiIP DufIwS6u5U8aJdx7XiJKSgxohoeSLxa8XjDE2PiQIwyfAxtuCzWmz9q8R69h42qscWNWLT1nAThf+ irSdQYezQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBeGb-0004ig-5L; Fri, 28 Aug 2020 13:18:05 +0000 Received: from relay9-d.mail.gandi.net ([217.70.183.199]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBeGI-0004Zf-1v for linux-arm-kernel@lists.infradead.org; Fri, 28 Aug 2020 13:17:46 +0000 X-Originating-IP: 90.89.180.255 Received: from lhopital-XPS-13-9360.home (lfbn-tou-1-1372-bdcst.w90-89.abo.wanadoo.fr [90.89.180.255]) (Authenticated sender: kevin.lhopital@bootlin.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPA id BA267FF803; Fri, 28 Aug 2020 13:17:43 +0000 (UTC) From: =?utf-8?b?S8OpdmluIEwnaMO0cGl0YWw=?= To: linux-media@vger.kernel.org Subject: [PATCH v2 1/4] media: sun6i-csi: Fix the bpp for 10-bit bayer formats Date: Fri, 28 Aug 2020 15:17:33 +0200 Message-Id: <20200828131737.12483-2-kevin.lhopital@bootlin.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200828131737.12483-1-kevin.lhopital@bootlin.com> References: <20200828131737.12483-1-kevin.lhopital@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200828_091746_224779_1D1C1620 X-CRM114-Status: GOOD ( 13.80 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.70.183.199 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.199 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, p.zabel@pengutronix.de, thomas.petazzoni@bootlin.com, =?utf-8?b?S8OpdmluIEwnaMO0cGl0YWw=?= , linux-kernel@vger.kernel.org, mripard@kernel.org, sakari.ailus@linux.intel.com, paul.kocialkowski@bootlin.com, wens@csie.org, robh+dt@kernel.org, hans.verkuil@cisco.com, yong.deng@magewell.com, mchehab+samsung@kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 10-bit bayer formats are aligned to 16 bits in memory, so this is what needs to be used as bpp for calculating the size of the buffers to allocate. This function is only used to generate the number of bytes per line. Fixes: 5cc7522d8965 ("media: sun6i: Add support for Allwinner CSI V3s") Signed-off-by: Kévin L'hôpital --- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h index c626821aaedb..8b83d15de0d0 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h @@ -100,7 +100,7 @@ static inline int sun6i_csi_get_bpp(unsigned int pixformat) case V4L2_PIX_FMT_SGBRG10: case V4L2_PIX_FMT_SGRBG10: case V4L2_PIX_FMT_SRGGB10: - return 10; + return 16; case V4L2_PIX_FMT_SBGGR12: case V4L2_PIX_FMT_SGBRG12: case V4L2_PIX_FMT_SGRBG12: