From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support Date: Thu, 21 Mar 2019 16:47:45 +0100 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" Return-path: Content-Disposition: inline In-Reply-To: <20190320181553.radwlhapzn464dlh@DESKTOP-E1NTVVP.localdomain> Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: dri-devel@lists.freedesktop.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--