Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp316305pxa; Fri, 21 Aug 2020 08:02:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx//IvTWlkEMmUiG+mYE4nUFnuGP6G6GBb3OuSi9ZWrTh157GEwV+YJBMC54kQ52gePb6H7 X-Received: by 2002:a05:6402:22ab:: with SMTP id cx11mr3392243edb.102.1598022143410; Fri, 21 Aug 2020 08:02:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598022143; cv=none; d=google.com; s=arc-20160816; b=QY4oFSmQ/q5ROeOPMmF7Szc/+jvVLqHhXKIMHm4sGkX382FnSj+VzrI99/zawxazbe ycBQOBEtqRDvoKCir1u8fc2YzhXvzVDxXkr6nEjBA5bGkpWl8pkuSwGBE3p98MPZM4xJ ZAl4/trAXpgO9KdZtoeVS8XifY2d1WrdIVoug49WtWyOUSuJ9oqUujhuRWwtokx3cNcs yWSEihKuut5U/DKo027juy8amXXwlMHB34l3kJB3OF9KXy9n0ubKWQJCm9h+Y55iFZlL GhVzcptbCTZ99saNqH+heHZ//UmD1Ad/UaXrKOCW6iYc03r/u6yZPsi5QVg6mejBeqtj aO0A== 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=P5XXksAPO/4REfIkNswMcIgm6ADIqamS1pg3cmCZ8fg=; b=eGQdY6vDBnDr5z5B67W3XCOxWftazhgLog2gkBFM6RbCmVIlDjtV95kQZHIAwnqLZe 9NQO4I8ucc8ZuUpgAL96cs5t6CJISD5hGm1swEM8jd6cdmWlzlh2aEoECgnKRFoYpnDc ifes2994grlFaEYuUK/BL/4vI3u0ZC5ZfMGQFq1Qklx1Z4EsPcs7jfMMSokI/RScTngB wzq2byW4SlE4/OHR35s+hquePnjlfyonG+r5GW4RdWWZAB1t2FtEpP5XlPUyX0wzaZTq 5aWk2PqzdFL0yvO1l0f9OFN0968JZw9CTcAZ234KqZgYckzcjCs5cIvTN2y98Z8TsuE5 H6UA== 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 l23si1249080ejq.620.2020.08.21.08.01.59; Fri, 21 Aug 2020 08:02:23 -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 S1727941AbgHUPAb (ORCPT + 99 others); Fri, 21 Aug 2020 11:00:31 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:40807 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727887AbgHUPA1 (ORCPT ); Fri, 21 Aug 2020 11:00:27 -0400 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 relay11.mail.gandi.net (Postfix) with ESMTPA id 0D0D010000F; Fri, 21 Aug 2020 15:00:23 +0000 (UTC) From: =?UTF-8?q?K=C3=A9vin=20L=27h=C3=B4pital?= To: linux-media@vger.kernel.org Cc: mchehab@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, mripard@kernel.org, wens@csie.org, yong.deng@magewell.com, p.zabel@pengutronix.de, 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 1/7] media: sun6i-csi: Fix the bpp for 10-bit bayer formats Date: Fri, 21 Aug 2020 16:59:29 +0200 Message-Id: <20200821145935.20346-2-kevin.lhopital@bootlin.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200821145935.20346-1-kevin.lhopital@bootlin.com> References: <20200821145935.20346-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. 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