Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp2414280pja; Thu, 26 Mar 2020 14:58:18 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtuczwm4mCwJd+o+IhwkecY1bIBAqr0QyO+xWv8G1whCaSFmopQD6QnNZcpaYW9ryJckNhU X-Received: by 2002:a4a:9c86:: with SMTP id z6mr7097976ooj.68.1585259898552; Thu, 26 Mar 2020 14:58:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585259898; cv=none; d=google.com; s=arc-20160816; b=O2drREJTah+XIg2o3FQy++ebx4rhiV6YQDqlhhX/VzexC1Q9BfaFQt++newbfmZxyM oruO/sVuMmtTBe7C4ixc7z3488ifPniqXzcurvqrT9F5RpIDNWJHJUzljeefDdlmUuES MuVTSbu0N305wAq5wmVAmKm0FxXZSUbeLg4ULS+gD9+fwUPJAUkSBwHxtwq4dU/fCT/4 Ah1FlKS1ieNM37nXRIz33HOizxXeZyvJkqt9FdMI1CPtUgE0xrntRKBKEpmV3jICUiqo C2zrZDzryC7zy51f7RyJAhjruoqDD364NjWzVmtO9VXeAM6s6+GcZN+wxeCOzHYzKjD7 m8vg== 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:dkim-signature; bh=B4eUj1VJNe32redVDC5bFOpW5fSi/T9854EMg72WAbo=; b=D4h07NMaTlv1TqUmwmyx0MpBGQa+nzWGJMk1vbk0GAXAjg8XC7I70BXLiKpax+15UC QHZ9quoTeQwteqLNmVo4UZS1WppvIyCRcpCAaaie2eaKv/RjarIvQ1ys/ITNyfzFrZfI jicFIrIejUyHK6UFhD7axRWCKD4SAe5mMUKOrOtdCi4aAEsl6sLuRh4ubYFlbB9d0of/ v534MJ442AHMwZQ6wjprV0dFe/ALXmJ1/xz+PiRSL+sk/PIEi2Y0sGq7tahRBYlysiBs LavE6W8YuGjlc2HncKiKDgVkSnVgNTd8KIRROWJmh7vedKAiVVs4xqRfbtZ78XEMk5fJ /uaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="U/8eWq97"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k10si1575311otr.174.2020.03.26.14.58.05; Thu, 26 Mar 2020 14:58:18 -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=@linuxfoundation.org header.s=google header.b="U/8eWq97"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727593AbgCZV4Q (ORCPT + 99 others); Thu, 26 Mar 2020 17:56:16 -0400 Received: from mail-il1-f194.google.com ([209.85.166.194]:42307 "EHLO mail-il1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726260AbgCZV4Q (ORCPT ); Thu, 26 Mar 2020 17:56:16 -0400 Received: by mail-il1-f194.google.com with SMTP id f16so6907611ilj.9 for ; Thu, 26 Mar 2020 14:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=B4eUj1VJNe32redVDC5bFOpW5fSi/T9854EMg72WAbo=; b=U/8eWq97Wny3wgOUhSrhlUv3catkWD+4C3Iy+KOP71/3XGwAQaCuGhPEpOhjv5yj6t xPX40/sj2Ba+7Uru9MCCtQ609V/8BOtT+8iLrKBDWgCu6C6AA/wM1X+MQtYj673IptBA /oePRCdXoVDTaGT4RPd33HLz0agt39cNYKaCc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=B4eUj1VJNe32redVDC5bFOpW5fSi/T9854EMg72WAbo=; b=LKn2ieKfQnpk8Fra/LLpa56riv3yrN/5PlH+bJ3/yonW/V1oatKrzWbq/GWnUDA9QN KgDZfHaGjW8xqikh+svpP5Cm2NtuS3K5BQ5flz6/ZXfk3bNx4e5FI6smeyIoDyuI15ex xawR6ltUAzHXQsmS0+cPuTwc1ZXc1W+4Cboz80PBdcW7Mil8OXY6Jg98lqvfnp+HwHRe PFxfLB1nPet6vu/bwnlPQodsr22Z4LYGXWQlUiGCshJnEm5nKaaak4pl3XKOK2GtQO6q exvfuv16fawYqvIc4vTMp/FHIedzi6hKZQiiBcjrZHDYAqwIcsMXuDw1cIExrqJf75O6 9iqg== X-Gm-Message-State: ANhLgQ0m6tabsVbAT8K3szjRvowbFwtAwpbsUr8qfz8bKfB0nogN+XKa 14jJAWXGmpvcwQyFZ4KEK1hgPQ== X-Received: by 2002:a92:8f91:: with SMTP id r17mr9911502ilk.97.1585259774247; Thu, 26 Mar 2020 14:56:14 -0700 (PDT) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id s25sm1201672ilb.37.2020.03.26.14.56.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Mar 2020 14:56:13 -0700 (PDT) Subject: Re: [PATCH v2 2/3] media: vimc: Add missing {RGB,BGR,GBR}888 media bus codes To: =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , linux-media@vger.kernel.org Cc: Helen Koike , Mauro Carvalho Chehab , Hans Verkuil , linux-kernel@vger.kernel.org, lkcamp@lists.libreplanetbr.org, Shuah Khan References: <20200326214730.2449707-1-nfraprado@protonmail.com> <20200326214730.2449707-3-nfraprado@protonmail.com> From: Shuah Khan Message-ID: <47dec848-dd66-9b5a-d7e6-38f6ea050b2e@linuxfoundation.org> Date: Thu, 26 Mar 2020 15:56:12 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200326214730.2449707-3-nfraprado@protonmail.com> Content-Type: text/plain; charset=utf-8; format=flowed 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 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. > unsigned int bpp; > u32 pixelformat; > bool bayer; >