From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH 2/2] drm: add an fb creation ioctl that takes a pixel format v4 Date: Mon, 14 Nov 2011 13:22:10 -0800 Message-ID: <20111114132210.68b40638@jbarnes-desktop> References: <1321302115-23159-1-git-send-email-jbarnes@virtuousgeek.org> <1321302115-23159-2-git-send-email-jbarnes@virtuousgeek.org> <20111114211644.GH3477@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0816902085==" Return-path: Received: from oproxy7-pub.bluehost.com (oproxy7-pub.bluehost.com [67.222.55.9]) by gabe.freedesktop.org (Postfix) with SMTP id C02D49EB3E for ; Mon, 14 Nov 2011 13:21:36 -0800 (PST) In-Reply-To: <20111114211644.GH3477@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Ville =?ISO-8859-1?B?U3lyauRs5A==?= Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0816902085== Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/IxwDNy=DIIIJ+6a+egHC4/2"; protocol="application/pgp-signature" --Sig_/IxwDNy=DIIIJ+6a+egHC4/2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Mon, 14 Nov 2011 23:16:44 +0200 Ville Syrj=E4l=E4 wrote: > On Mon, Nov 14, 2011 at 12:21:55PM -0800, Jesse Barnes wrote: > > +#define fourcc_code(a,b,c,d) ((u32)(a) | ((u32)(b) << 8) | \ > > + ((u32)(c) << 16) | ((u32)(d) << 24)) > > + > > +/* RGB codes */ > > +#define DRM_FOURCC_RGB332 fourcc_code('R','G','B','1') > > +#define DRM_FOURCC_RGB555 fourcc_code('R','G','B','O') > > +#define DRM_FOURCC_RGB565 fourcc_code('R','G','B','P') > > +#define DRM_FOURCC_RGB24 fourcc_code('R','G','B','3') > > +#define DRM_FOURCC_RGB32 fourcc_code('R','G','B','4') > > + > > +#define DRM_FOURCC_BGR24 fourcc_code('B','G','R','3') > > +#define DRM_FOURCC_BGR32 fourcc_code('B','G','R','4') >=20 > I'm confused by these. The code suggests RGB/BGR24 are in fact 32bpp > formats, so why do we need the RGB/BGR32 variants? If the difference > is in the alpha channel, I'd like to document that fact in the name. >=20 > Could we call them ARGB8888, XRGB8888, XRGB1555 etc.? Yeah, the fourcc naming isn't very good, I'd have no problem changing the names to something more descriptive for 24 and 32. fourcc.org itself seems ambiguous about the 24 bit format.... > Also the channel and byte order should be documented clearly. Supposedly the fourcc code is supposed to provide that? > And one other thing. I probably wouldn't call these fourccs > since they don't actually match the official fourccs. Not that > there is anything sensible defined for RGB formats in the > official list anyway. In fact, I'm not sure what we gain by > cooking our own fourccs when we know most of them won't match > the official list. AFAICS a simple running number would do > just as well as the format identifier. They seem to match what's at fourcc.org, though I don't see the upper byte documented, and also share values with the v4l stuff, which I was assuming had the right fourcc codes. If we don't match, we should strive to. I'm just using what I find at fourcc.org and in the v4l code to check... --=20 Jesse Barnes, Intel Open Source Technology Center --Sig_/IxwDNy=DIIIJ+6a+egHC4/2 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJOwYaCAAoJEIEoDkX4Qk9hBzsP/2qyydcuChdxhBXnop1oFIHG tsEG5u0Bp/YL2QDkJBaNXZu2ig2LS99FX9651D6/ewMqxETCev8Md/er/h94uQQU I/SpV4UE0a28GPzqF1T3RnPDLnMWARecRsLtE1gdrU5Yy1Q9dt4lPEJsAgWi4KrK zq560oa6qDLCxsjwFpR4+pfYsVK1dMFW7NhePao2Zu1gskguRBPyk0d0NUDQwZPc JNEk2LH86A5jkgr62wvlOQw2z5DtlYWntdsHK6zq9wbR8e69cPUQrlQJCeBAe9dX kdWT1hNNRwvhQf3WquFrf6wuTBqLoC63NzVINKwdvXWFpGaIipegWgm4twCWTCpL uq9vPLX9DIFFtR3wCDfsK8bZdHCTpvR4itX/xsO0CXoXWiWAAMIgT+nOGCpO+d+F e7xDNKqXyG3isInZFl0XEWT18QdWbPVcj5ak6KTFxUEHyqtRvvWHRGem5FnjJjog MzHipUGQQ7+z4nEqKY5ZTEsG0sm0bxYKuf+BJp/mpjENfXjJyoSqScYuAr4qTIkA E72XCXbX7Nro6Ln50mLJ4lKs41QLLtyi14GiHJJ/bubYVfy6Lh5EiWFK4keSZWOA xXJoYK63Oo8oI72gFgwt2voO/UY/0QtfpPZAbdephnYQkln+Ea5ntutGv9QStQnZ y5ErCuMIMLqCaFpgXGsE =JI43 -----END PGP SIGNATURE----- --Sig_/IxwDNy=DIIIJ+6a+egHC4/2-- --===============0816902085== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0816902085==--