Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2684385yba; Mon, 8 Apr 2019 02:23:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYlI5tYbSw4QIptr1UmO8mKkQ7wrsXIOdP7sYuju72avUKk1LrebFsMQ31hAmpKenF5T4d X-Received: by 2002:a63:3d4c:: with SMTP id k73mr27481086pga.154.1554715438682; Mon, 08 Apr 2019 02:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554715438; cv=none; d=google.com; s=arc-20160816; b=einTf1sJx8aIRsbkGmJz24pYDiHBPOWxMRKFz2D9aixxZ8w09Qiu8MkFbbeXzgDk9I a2jXRulEDxJn5CFGRxmEDnmDkt45wGT1E05n9HJrrGJhNmtkrABC+H9+iv56opf19mtN gdRp9Ynv0UcNZRk2UMVPBe8k2ffhhlJDcME5qaFAcIfu+3hnay4gpRDJLMUWELAJz30M Fa/nIXW9+jTi0mdyQivdxgchr9gkmxOAHMkQDaJf4xuAxWtsDHy/3orQusgWDexCip9j R5sRMjVAmPM6Xp74U8XPyqpZLR0vYwXLoGUeOt3Fk9e5hpZYPG1wrr+P4SOki8dfjAj0 j80w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=D8ceOkLlMV6gBYoKK6ueWjMdKDFsqup4VJ5RDcohJiI=; b=ThtYQ4F4rnN13Tq7ihyeXmST+G7U4IhOLDSIDtZJo/ZtaG825MDMrPC3R8ir6TpWGw I25fTrnmW0Ujdnh8m1ehUC4hGW4PueHkGzZIv3Mzuyt8X71ffiKFGmPvwClQAgQatf8l 6H68088XQ8VqtymhouA+9668c/Ma26Jmw4Heo1LKpKR9odjiR6b6bt7CHSRoRLX19BOo 975dvk9KH5Tg3c1Cy0j0MQhhuGiZefMx0b0ZetuuieEkCzNIaRa7eJlDnPM4563UMPxO p8Z/AoUJJ9OJ6VeT0ExhX/t3Dxpe2m5Yvk8UQev7F22yTtHfHg6kzczPko5Id+FRytO7 wbgw== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j19si22498510pfh.147.2019.04.08.02.23.43; Mon, 08 Apr 2019 02:23:58 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726536AbfDHJVm (ORCPT + 99 others); Mon, 8 Apr 2019 05:21:42 -0400 Received: from mga01.intel.com ([192.55.52.88]:16576 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726133AbfDHJVl (ORCPT ); Mon, 8 Apr 2019 05:21:41 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Apr 2019 02:21:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,324,1549958400"; d="scan'208";a="159681678" Received: from troebing-mobl1.ger.corp.intel.com (HELO kekkonen.fi.intel.com) ([10.249.45.170]) by fmsmga004.fm.intel.com with ESMTP; 08 Apr 2019 02:21:36 -0700 Received: by kekkonen.fi.intel.com (Postfix, from userid 1000) id 3C3D821E50; Mon, 8 Apr 2019 12:21:27 +0300 (EEST) Date: Mon, 8 Apr 2019 12:21:27 +0300 From: Sakari Ailus To: Mickael GUENE Cc: "linux-media@vger.kernel.org" , Hugues FRUCHET , Mauro Carvalho Chehab , Matt Ranostay , Petr Cvek , Akinobu Mita , "linux-kernel@vger.kernel.org" , "David S. Miller" , Ben Kao , Nicolas Ferre , Todor Tomov , Rui Miguel Silva , Greg Kroah-Hartman , Hans Verkuil , Ricardo Ribalda Delgado , Jacopo Mondi , Tianshu Qiu , Bingbu Cao Subject: Re: [PATCH v3 2/2] media:st-mipid02: MIPID02 CSI-2 to PARALLEL bridge driver Message-ID: <20190408092126.xgqhmyos5hkvmisv@kekkonen.localdomain> References: <1552373045-134493-1-git-send-email-mickael.guene@st.com> <1553594620-88280-1-git-send-email-mickael.guene@st.com> <1553594620-88280-3-git-send-email-mickael.guene@st.com> <20190326113308.mp5hqdw3ktbpcawu@paasikivi.fi.intel.com> <20190406110135.7l2m6hkmvwr33d7s@kekkonen.localdomain> <1c7e0b8a-7441-57eb-38c0-e951917637c6@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1c7e0b8a-7441-57eb-38c0-e951917637c6@st.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 08, 2019 at 06:17:18AM +0000, Mickael GUENE wrote: > Hi Sakari, > > On 4/6/19 13:01, Sakari Ailus wrote: > > On Tue, Mar 26, 2019 at 02:36:41PM +0000, Mickael GUENE wrote: > >> Sakari, > >> > >>>> +static int bpp_from_code(__u32 code) > >>>> +{ > >>>> + switch (code) { > >>>> + case MEDIA_BUS_FMT_SBGGR8_1X8: > >>>> + case MEDIA_BUS_FMT_SGBRG8_1X8: > >>>> + case MEDIA_BUS_FMT_SGRBG8_1X8: > >>>> + case MEDIA_BUS_FMT_SRGGB8_1X8: > >>>> + return 8; > >>>> + case MEDIA_BUS_FMT_SBGGR10_1X10: > >>>> + case MEDIA_BUS_FMT_SGBRG10_1X10: > >>>> + case MEDIA_BUS_FMT_SGRBG10_1X10: > >>>> + case MEDIA_BUS_FMT_SRGGB10_1X10: > >>>> + return 10; > >>>> + case MEDIA_BUS_FMT_SBGGR12_1X12: > >>>> + case MEDIA_BUS_FMT_SGBRG12_1X12: > >>>> + case MEDIA_BUS_FMT_SGRBG12_1X12: > >>>> + case MEDIA_BUS_FMT_SRGGB12_1X12: > >>>> + return 12; > >>>> + case MEDIA_BUS_FMT_UYVY8_2X8: > >>> > >>> This is good for the parallel bus, but on CSI-2 side you should have > >>> MEDIA_BUS_FMT_UYVY8_1X16 instead. This isn't technically correct for a > >>> serial bus, but the custom is to use the one sample / pixel formats on the > >>> serial busses. > >>> > >> Should MEDIA_BUS_FMT_BGR888_1X24 be something like > >> MEDIA_BUS_FMT_BGR888_3X8 for parallel output bus ? > > > > Good point. Yes. > > > > Could you add that format to > > Documentation/media/uapi/v4l/subdev-formats.rst, please, in a separate > > patch? > > > I also need to add it to include/uapi/linux/media-bus-format.h I > suppose ? Yes, that's correct. > I was also wondering if I should add MEDIA_BUS_FMT_BGR888_3X8_BE and > MEDIA_BUS_FMT_BGR888_3X8_LE instead ? If it's either, then "BE" but in this case I think it's better be without the explicit endianness as the endianness change results in pixel order change --- the format itself remains valid. I wonder what others think, too. Hans, any opinion? > > So if you are ok with the above I will add MEDIA_BUS_FMT_BGR888_3X8 to > subdev-formats.rs and media-bus-format.h as a first parch of my serie. -- Regards, Sakari Ailus sakari.ailus@linux.intel.com