Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1190753pxa; Fri, 28 Aug 2020 06:21:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylZCNzRe0Ix1Fws6wCMIJU2h1O3vjmx4EcKxQhWEkooi+VRvJxdjoErZunYzat6DAZRTPi X-Received: by 2002:a17:906:a209:: with SMTP id r9mr1862931ejy.413.1598620878804; Fri, 28 Aug 2020 06:21:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598620878; cv=none; d=google.com; s=arc-20160816; b=Ybh6YHKwWcA45JxCA6CamV1cuOQPvwyiCNabJkGRh/Vr/EGE3sHnskUDkclHEt0gPr P+qFyA7+InTrIsClzp+UWKcqqV3BlpiaeKJUTrffXFg47Sf8SGS5oGYUo7TYgmeYA/y2 PNMJ4knBRALMnrnPRTjFFBHo046U2YrmkWUh0CQMxqtPEvNiSMloIoVDONi+yeYGdWlw 3urfEaKPskGSyDk3yel0xC6tENvZzVa37FUbr76Mf4eZe0WRKHfS/Kk1ViaT47GvvkfV +Gb7vjqAlvXCFArx1bsyW/RrWagHc0MRhHuPmhHT7w/SkcHCzuFqqy25xM199yN7r0dl qv3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=XpYLtxrY1W78FdTgxNzFYNpUbS6Za8aq0h+1FADnSC8=; b=Knpxh+AWnjfhUPoryoR8hcs1Be4Ll+yr5Y7GAgof513uEH6y/wI4MFZHerKAX1Tii9 AWlpJAa6kMRrf0DyVnNLvHc46Rga3kUI40tJrEaEi+nWPMJ9xESuxmlpBUbLaof9MZfc RXGuFpQGl3fRBov1gbVL4TFBiiKWVIlPljAoE+OcJ6TReUb+OYNRSr0tzsMDMHld3ZXM 6NaQm6D3Haj2ON+Rjvzwhs/uWUO0yZBGJDSsBwztfYKhzm3on/eD7+rP2N3MtkKCoNpT uQVA+byuTc2UtqtTu7pcH9alp6jtHEb7IBUkLVUFqmZ42+4QdPk9IPtJ/8u2d4V0UuWX /wdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p14si593739eji.611.2020.08.28.06.20.55; Fri, 28 Aug 2020 06:21:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729602AbgH1NUC (ORCPT + 99 others); Fri, 28 Aug 2020 09:20:02 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:48035 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729544AbgH1NRq (ORCPT ); Fri, 28 Aug 2020 09:17:46 -0400 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?q?K=C3=A9vin=20L=27h=C3=B4pital?= To: linux-media@vger.kernel.org Cc: robh+dt@kernel.org, mark.rutland@arm.com, mripard@kernel.org, wens@csie.org, yong.deng@magewell.com, mchehab+samsung@kernel.org, p.zabel@pengutronix.de, sakari.ailus@linux.intel.com, hans.verkuil@cisco.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, paul.kocialkowski@bootlin.com, thomas.petazzoni@bootlin.com, =?UTF-8?q?K=C3=A9vin=20L=27h=C3=B4pital?= 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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: -- 2.17.1