Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp2407699pja; Thu, 26 Mar 2020 14:49:53 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsRJ7N/FTXgiFVa/FXRhj4YLQVBizHLFUSnsesFtQbVSFYb4guBMIb4NFM0zQnDWoK3Rcbc X-Received: by 2002:a9d:949:: with SMTP id 67mr7997535otp.304.1585259393183; Thu, 26 Mar 2020 14:49:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585259393; cv=none; d=google.com; s=arc-20160816; b=vRS5A0JQUo+dqDmzJB+8tCO4OaSj9Bq5uivO7hsjA1i9o32DQ67GjgQ+axE8ImaikG kS8w/2uDy1rETtUdV8ez/WkKH7a+37c/ljCLMGQTwApfQhBjkJloEmyDFrGH63T/UAsM FkoCNtVuvV+/cE0/2ugcRiUvKmbg6HwU10efvvPmdPond/ViRgsjcIicoDn9sD0gCibZ hjZmQtdx1kB+R1ZTyDQmpcgpYd7qqkyzIg9uU73L8drg/IFcrd3phkDzgsC2O6F7w4F9 LFv2iWqgkytliqIJQAnhWZKlJSefCRQlqJy4Kuv0V/WOO7Q5OKUNALZ/rbSAAPz32Zmj JYzQ== 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:subject:reply-to:cc:from:to :dkim-signature:date; bh=18CceoDh9UrcHTAVgytEoyZx8kyTstuJIIJjwoHl4TE=; b=NAvE6LL0RhVxNuB3aF1d6lVBA4eWvT4do7RO8XXLbKY0DwUlKRYBosIVJi7eZU08Km aH6/QFO/BFTmWmNTkr+W3aRGK2opIbq6uNE/SNJt5SYf9nOdlLKxtJEHmj+ByCGYZuji emxKUIjVqtY3WfjlHLhRX/1i7GT4op2x8Yg1F417nO6EUIWfn0vf3FpOj51D8K4K5woR crYNNcpm0xXWcBi/yx3pXjrNjt3y4Vhr4+plLvlhyt3geDgP0cJMkGxsgGW+QpfiuNey eWlODiw20LkkDM7Cq8Fnd7IKT3DZFnAQ1xGfHZ8Un+ccW7tVSlysHCPZRBdzvzRHLmKf iMjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=default header.b=c7EYnump; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 194si1486295oii.2.2020.03.26.14.49.40; Thu, 26 Mar 2020 14:49:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@protonmail.com header.s=default header.b=c7EYnump; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727718AbgCZVr7 (ORCPT + 99 others); Thu, 26 Mar 2020 17:47:59 -0400 Received: from mail1.protonmail.ch ([185.70.40.18]:23349 "EHLO mail1.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727677AbgCZVr6 (ORCPT ); Thu, 26 Mar 2020 17:47:58 -0400 Date: Thu, 26 Mar 2020 21:47:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1585259277; bh=18CceoDh9UrcHTAVgytEoyZx8kyTstuJIIJjwoHl4TE=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=c7EYnump6tFPcO299rWZ8X6sJZE976P/peUKGUJJuqHgi3iOsrjPUGwrgv+FF3d+R /Xc365MqGJLcUBE6DQ7ewGGlyEuLwmpPbK8zMtdAUao1ppJ1PVUNkGyF8LVW2Oc2KO AEYiBGcpIOAVVxK7W3hmoB1oP9XtzHwMqSWLD/3c= To: linux-media@vger.kernel.org From: =?UTF-8?Q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado?= Cc: Helen Koike , Shuah Khan , Mauro Carvalho Chehab , Hans Verkuil , linux-kernel@vger.kernel.org, lkcamp@lists.libreplanetbr.org Reply-To: =?UTF-8?Q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado?= Subject: [PATCH v2 2/3] media: vimc: Add missing {RGB,BGR,GBR}888 media bus codes Message-ID: <20200326214730.2449707-3-nfraprado@protonmail.com> In-Reply-To: <20200326214730.2449707-1-nfraprado@protonmail.com> References: <20200326214730.2449707-1-nfraprado@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mail.protonmail.ch Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add missing RGB888_*, BGR888_* and GBR888_* media bus codes in the vimc_pix_map_list. Since there is no GBR24 pixelformat, use the RGB24 pixelformat for MEDIA_BUS_FMT_GBR888_1X24. Co-developed-by: Vitor Massaru Iha Signed-off-by: Vitor Massaru Iha Signed-off-by: N=C3=ADcolas F. R. A. Prado --- Changes in v2: - Fix array formatting - Change commit message to reflect v2 changes - Change code array size - Add other BGR888 and RGB888 formats to BGR24 and RGB24 pixelformats drivers/media/platform/vimc/vimc-common.c | 16 ++++++++++++++-- drivers/media/platform/vimc/vimc-common.h | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/vimc/vimc-common.c b/drivers/media/plat= form/vimc/vimc-common.c index 119846f3eaa5..11489334cff7 100644 --- a/drivers/media/platform/vimc/vimc-common.c +++ b/drivers/media/platform/vimc/vimc-common.c @@ -19,13 +19,25 @@ static const struct vimc_pix_map vimc_pix_map_list[] = =3D { =20 =09/* RGB formats */ =09{ -=09=09.code =3D { MEDIA_BUS_FMT_BGR888_1X24 }, +=09=09.code =3D { +=09=09=09MEDIA_BUS_FMT_BGR888_1X24, +=09=09=09MEDIA_BUS_FMT_BGR888_3X8 +=09=09}, =09=09.pixelformat =3D V4L2_PIX_FMT_BGR24, =09=09.bpp =3D 3, =09=09.bayer =3D false, =09}, =09{ -=09=09.code =3D { MEDIA_BUS_FMT_RGB888_1X24 }, +=09=09.code =3D { +=09=09=09MEDIA_BUS_FMT_RGB888_1X24, +=09=09=09MEDIA_BUS_FMT_RGB888_2X12_BE, +=09=09=09MEDIA_BUS_FMT_RGB888_2X12_LE, +=09=09=09MEDIA_BUS_FMT_RGB888_3X8, +=09=09=09MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, +=09=09=09MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA, +=09=09=09MEDIA_BUS_FMT_RGB888_1X32_PADHI, +=09=09=09MEDIA_BUS_FMT_GBR888_1X24 +=09=09}, =09=09.pixelformat =3D V4L2_PIX_FMT_RGB24, =09=09.bpp =3D 3, =09=09.bayer =3D false, diff --git a/drivers/media/platform/vimc/vimc-common.h b/drivers/media/plat= form/vimc/vimc-common.h index 585441694c86..d5e0e8d32542 100644 --- a/drivers/media/platform/vimc/vimc-common.h +++ b/drivers/media/platform/vimc/vimc-common.h @@ -69,7 +69,7 @@ do {=09=09=09=09=09=09=09=09=09\ * V4L2_PIX_FMT_* fourcc pixelformat and its bytes per pixel (bpp) */ struct vimc_pix_map { -=09unsigned int code[1]; +=09unsigned int code[8]; =09unsigned int bpp; =09u32 pixelformat; =09bool bayer; --=20 2.25.2