Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp782696img; Thu, 21 Mar 2019 08:50:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyhRz7EuClgDMv/cSMDNWvGCUhWYddhJ22oq082DWlLWV9g8WG1qvFZEjaVzRgJe1kth1le X-Received: by 2002:a63:1d03:: with SMTP id d3mr3981719pgd.42.1553183409448; Thu, 21 Mar 2019 08:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553183409; cv=none; d=google.com; s=arc-20160816; b=xI4eXqlPwQ3HXEQ8mi+j/hURcc8qoXy05jsW2Kqo44gDh4drLv10hJNXsz1bT6sSep CbBU+Uj0vtxd1+CMhdZbSX1CPWUSBU0iN7LEuoge2uQG7ZeJes+rRNFMm/xQ4y5qkhlT FfjgT4KMdxzvm8R6M2gbqoUfJPmkQhlw5EpBshZ9gMyyQfQfupQQk4qoqiwBgPjofoaQ MUlElYCzpCIw+Z/NUCF9byP0yU2dkTGYX1FDJie5oIg+SnwQnLILDgl7gpM4qyHTHR0D HruoA1ZsGRu08/ibZEk2rkHdFIJ4KeLTK9Kt1juWpdERI8ibjvg4jkSMVM0DOTNBUgG5 v9mw== 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=MRCkQks9AjsDC2tkuhsqQZhlXQv4sFamPt6x0KNnbBc=; b=BfqcN79Y1sbqDuQxDjxjjkyQ01p5Uu9YXzReZGXjUNvApQ1JUE2DbGO/SOVWk4y+bJ d0JdR7DHs4uR3ym8n+ujyLAETmlg7QYVDZCc1JCT37f7UB76AQbQIM4ZT7LpZ321TYZ6 TFcIE3T4nPFZXRUGUjlDxal9z6CoYB8rCJfvcmJOl+aXc2kVHFIHd+W8u+DopS13J/qj r+ILDJbyvZCT4bfIqj6ljmK+ewmeTCYv46z5ghjzC+NY02ZxZz2jErBqSn67PE4Po/X8 41/aW+t4iu0Jmk6TcHENSsfmz0T1+imPogpt4WPgCWJugZ0Kw8Ua99dLXzZm7sO7ui6d D4BQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s11si4490736plp.326.2019.03.21.08.49.54; Thu, 21 Mar 2019 08:50:09 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728551AbfCUPru (ORCPT + 99 others); Thu, 21 Mar 2019 11:47:50 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:58719 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728071AbfCUPrt (ORCPT ); Thu, 21 Mar 2019 11:47:49 -0400 X-Originating-IP: 185.94.189.187 Received: from localhost (unknown [185.94.189.187]) (Authenticated sender: maxime.ripard@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id C724920011; Thu, 21 Mar 2019 15:47:45 +0000 (UTC) Date: Thu, 21 Mar 2019 16:47:45 +0100 From: Maxime Ripard To: Brian Starkey Cc: Nicolas Dufresne , Daniel Vetter , David Airlie , Maarten Lankhorst , Sean Paul , Mauro Carvalho Chehab , Sakari Ailus , Hans Verkuil , Laurent Pinchart , Thomas Petazzoni , Paul Kocialkowski , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "linux-media@vger.kernel.org" , nd Subject: Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support Message-ID: <20190321154745.4o7setv3bucphrsv@flea> References: <20190320181553.radwlhapzn464dlh@DESKTOP-E1NTVVP.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="i4gw25fdztzcmio7" Content-Disposition: inline In-Reply-To: <20190320181553.radwlhapzn464dlh@DESKTOP-E1NTVVP.localdomain> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --i4gw25fdztzcmio7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Mar 20, 2019 at 06:15:54PM +0000, Brian Starkey wrote: > On Tue, Mar 19, 2019 at 07:29:18PM -0400, Nicolas Dufresne wrote: > > All RGB mapping should be surrounded by ifdef, because many (not all) > > DRM formats represent the order of component when placed in a CPU > > register, unlike V4L2 which uses memory order. I've pick this one > > randomly, but this one on most system, little endian, will match > > V4L2_PIX_FMT_XBGR32. This type of complex mapping can be found in > > multiple places, notably in GStreamer: > > > > https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/blob/master/sys/kms/gstkmsutils.c#L45 > > I do sort-of wonder if it's worth trying to switch to common fourccs > between DRM and V4L2 (and whatever else there is). > > The V4L2 formats list is quite incomplete and a little quirky in > places (V4L2_PIX_FORMAT_XBGR32 and V4L2_PIX_FORMAT_XRGB32 naming > inconsistency being one. 'X' isn't even next to 'B' in XBGR32). > > At least for newly-added formats, not using a common definition > doesn't make a lot of sense to me. Longer term, I also don't really > see any downsides to unification. Eventually, I agree that that his where we should be heading. Moving the existing formats support to a common place will help with that. Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --i4gw25fdztzcmio7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXJOyIQAKCRDj7w1vZxhR xfQNAP43UEujnLuknDuJ54/viHqBDU6/qBqdYGvG1QWwWP0FNQEAg0XP/rCIE20U i+UysiRZ/+7aHE999qgXHkgD4o4pFAE= =lNMS -----END PGP SIGNATURE----- --i4gw25fdztzcmio7--