Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2775575ybb; Mon, 30 Mar 2020 12:39:55 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsFiUXPlVI37FCUA9gwD2igzgV++TkYhlOHrAoHtNsY576PpRkDENXWlxf18TzBDmTw9R5l X-Received: by 2002:a4a:8241:: with SMTP id t1mr10703086oog.57.1585597195713; Mon, 30 Mar 2020 12:39:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585597195; cv=none; d=google.com; s=arc-20160816; b=axZUE//AUUZ3qgOt8r8a+pB0ASHTEbIJ9dKnOqr4Th+6yvBhib8MS3ChfX8k+V9GsT heN6FtwNuMkhuzrqLI35yDI3RNs4ZsAwI2QrzMcTRXuezksIB3buVwLJDwCx7i3szan0 fVdcs2semA1WgCGhuAGUtYsTCjV8cWbocoRwFlv7KW7ZjGPKfla+8aKD/2lf28jif/Iq WWoXU4B1oweUQg+yypRWF0Jt5YT652fZXUdIsmIzCAMRMH1z3ptIZj1HL4PXInFZCQSq U9CdrYhjo0Er+KSATbmCQftvQk6LX8WBsiqmVHXpaaJwjcA2NpaE7HKlYC4Qo1/ZWfHJ b1aw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=AkOYbslm2M3EDEU6+xK5WeyRpEIdyIgCrMjYGpwMTsA=; b=g3sL82eo6BfNCxXo8eeb3z/WY46db8YGmvwVnNrIqpnogljmkVlWa/iZ5bPwqg7ulb 9PE72m84LbC7PC4l3TJSD6BN6eAzO/CeEkDptQLtLNMLu/e6ea0RN4DTG3lsHixVwoAl IvccFkyYsy6nJbMVrOsMjaM/jMNAcjiJcWlfaPTkji9k2acSFhz+Den6X3t39ExSrDAi yp7pdFfkXRBB7rlOV+6QoVP/ez8u+5FtIIQB18Xto93VpjtJ1kYHGkpK1okdsLS/CyWy RbR19CzHB0mlP13GIz014iAZkhbZ+kGXtcVH339LwxTS5RFKjZQHmAVoWYYoePHy+NY/ 3WBQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i15si6953244ots.121.2020.03.30.12.39.42; Mon, 30 Mar 2020 12:39:55 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728322AbgC3Th6 (ORCPT + 99 others); Mon, 30 Mar 2020 15:37:58 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:35832 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727749AbgC3Th6 (ORCPT ); Mon, 30 Mar 2020 15:37:58 -0400 Received: from [IPv6:2804:431:e7cc:11ff:4f80:3de:e2b2:5c1d] (unknown [IPv6:2804:431:e7cc:11ff:4f80:3de:e2b2:5c1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: koike) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 2E94C293630; Mon, 30 Mar 2020 20:37:53 +0100 (BST) Subject: Re: [PATCH v2 2/3] media: vimc: Add missing {RGB,BGR,GBR}888 media bus codes To: Shuah Khan , =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Hans Verkuil , linux-kernel@vger.kernel.org, lkcamp@lists.libreplanetbr.org References: <20200326214730.2449707-1-nfraprado@protonmail.com> <20200326214730.2449707-3-nfraprado@protonmail.com> <47dec848-dd66-9b5a-d7e6-38f6ea050b2e@linuxfoundation.org> From: Helen Koike Message-ID: Date: Mon, 30 Mar 2020 16:37:49 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <47dec848-dd66-9b5a-d7e6-38f6ea050b2e@linuxfoundation.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/26/20 6:56 PM, Shuah Khan wrote: > On 3/26/20 3:47 PM, Nícolas F. R. A. Prado wrote: >> 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ícolas 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/platform/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[] = { >>         /* RGB formats */ >>       { >> -        .code = { MEDIA_BUS_FMT_BGR888_1X24 }, >> +        .code = { >> +            MEDIA_BUS_FMT_BGR888_1X24, >> +            MEDIA_BUS_FMT_BGR888_3X8 >> +        }, >>           .pixelformat = V4L2_PIX_FMT_BGR24, >>           .bpp = 3, >>           .bayer = false, >>       }, >>       { >> -        .code = { MEDIA_BUS_FMT_RGB888_1X24 }, >> +        .code = { >> +            MEDIA_BUS_FMT_RGB888_1X24, >> +            MEDIA_BUS_FMT_RGB888_2X12_BE, >> +            MEDIA_BUS_FMT_RGB888_2X12_LE, >> +            MEDIA_BUS_FMT_RGB888_3X8, >> +            MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, >> +            MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA, >> +            MEDIA_BUS_FMT_RGB888_1X32_PADHI, >> +            MEDIA_BUS_FMT_GBR888_1X24 >> +        }, >>           .pixelformat = V4L2_PIX_FMT_RGB24, >>           .bpp = 3, >>           .bayer = false, >> diff --git a/drivers/media/platform/vimc/vimc-common.h b/drivers/media/platform/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 {                                    \ >>    * V4L2_PIX_FMT_* fourcc pixelformat and its bytes per pixel (bpp) >>    */ >>   struct vimc_pix_map { >> -    unsigned int code[1]; > >> +    unsigned int code[8]; > Please add a define for this instead of hard coded value. With this change suggested by Shuah: Acked-by: Helen Koike Regards, Helen > > >>       unsigned int bpp; >>       u32 pixelformat; >>       bool bayer; >> >