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 14:53:21 -0800 Message-ID: <20111114145321.3c091a2f@jbarnes-desktop> References: <1321302115-23159-1-git-send-email-jbarnes@virtuousgeek.org> <1321302115-23159-2-git-send-email-jbarnes@virtuousgeek.org> <20111114212455.GI3477@intel.com> <20111114133557.1b2a353f@jbarnes-desktop> <20111114223747.GJ3477@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0967314508==" Return-path: Received: from oproxy4-pub.bluehost.com (oproxy4-pub.bluehost.com [69.89.21.11]) by gabe.freedesktop.org (Postfix) with SMTP id 339499E9E1 for ; Mon, 14 Nov 2011 14:52:46 -0800 (PST) In-Reply-To: <20111114223747.GJ3477@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 --===============0967314508== Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/xJgFqIrWG6h2VlBbIrx1d3r"; protocol="application/pgp-signature" --Sig_/xJgFqIrWG6h2VlBbIrx1d3r Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, 15 Nov 2011 00:37:47 +0200 Ville Syrj=E4l=E4 wrote: > On Mon, Nov 14, 2011 at 01:35:57PM -0800, Jesse Barnes wrote: > > On Mon, 14 Nov 2011 23:24:55 +0200 > > Ville Syrj=E4l=E4 wrote: > >=20 > > > On Mon, Nov 14, 2011 at 12:21:55PM -0800, Jesse Barnes wrote: > > > > +struct drm_mode_fb_cmd2 { > > > > + __u32 fb_id; > > > > + __u32 width, height; > > > > + __u32 pixel_format; /* fourcc code from videodev2.h */ > > > > + > > > > + /* > > > > + * In case of planar formats, this ioctl allows up to 4 > > > > + * buffer objects with offets and pitches per plane. > > > > + * The pitch and offset order is dictated by the fourcc, > > > > + * e.g. NV12 (http://fourcc.org/yuv.php#NV12) is described as: > > > > + * > > > > + * YUV 4:2:0 image with a plane of 8 bit Y samples > > > > + * followed by an interleaved U/V plane containing > > > > + * 8 bit 2x2 subsampled colour difference samples. > > > > + * > > > > + * So it would consist of Y as offset[0] and UV as > > > > + * offeset[1]. Note that offset[0] will generally > > > > + * be 0. > > > > + */ > > > > + __u32 handles[4]; > > > > + __u32 pitches[4]; /* pitch for each plane */ > > > > + __u32 offsets[4]; /* offset of each plane */ > > > > +}; > > >=20 > > > Hey, what about those interlaced buffers? We talked privately about > > > adding a '__u32 flags' member to both drm_mode_fb_cmd2 and > > > drm_mode_set_plane. > > >=20 > > > We could stick something like these to those flags: > > > fb_cmd2.flags: > > > #define DRM_MODE_FB_INTERLACED 0x1 > > >=20 > > > set_plane.flags: > > > #define DRM_MODE_PRESENT_TOP_FIELD 0x1 > > > #define DRM_MODE_PRESENT_BOTTOM_FIELD 0x2 > >=20 > > Oh sorry I lost track of the internal discussion. > >=20 > > Are those attributes of the fb or of each object? E.g. could you mix > > interlaced and non-interlaced buffers in a planar format? >=20 > I suppose it might be possible that you'd want to treat luma as > interlaced and chroma as progressive under some circumstances. > But I can't see why simply defining another flag for that wouldn't > be enough. >=20 > > Maybe I need to rename this ioctl to addfb_swissarmyknife :) >=20 > Now I'm just waiting for someone to jump in and say that they=20 > want independent buffers for each interlaced field :) >=20 > Me? I'll be happy with just those two flags members... for now at least ;) Ok, added, see the latest patchset. Dave, please pound the gavel on this now and declare it sold before someone asks me to add braille support. :) Thanks, --=20 Jesse Barnes, Intel Open Source Technology Center --Sig_/xJgFqIrWG6h2VlBbIrx1d3r Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJOwZvhAAoJEIEoDkX4Qk9hmT8P/1RKESaWlEIhbYyRWPWpRSLA QUww5lfYtyDOIAc9/FeqpAfn9q+B92hL0Jl9qbf5bK9JtO1f+gDLELtUBM/9UfSV +4PzZ6J85jeUds7wFKEPdx7JocKZ5VdJQlPSkRFT1HfXTQmCRyzg0dT6EgklDrEC 1bRQ8iHTsHqH/lcjDMcblw2YgCeP7b92RowC+FL9HAkcsP6T0Re05WRnTgPzhNPz vUn40zGDc29BykW9aj+6k1DSDd+Mi9cEBrJfjVlgR9qOojtsBfmZPBJmiFKYBDFT oI+Xw22Tyh/rsGPhbWZ7myPei46gPxo9nCyXLqibeCR0kwKv81QC9WznrmjdFlNW wZhfHfRcN7QPe1DW+jl9P1/WgxVfFsxSU54ESEB7ql2aBDl6rvil5/flwwnjR3rP QovM2Oau5MRsNOC+1pz4Lmke/CnhFA7CeZWnDbsSpax42OC6w0+arXi3E5DijCWr ZuOMJt9i5rI0/HE2KG6FKfn60tJNaaYdhM1IS/5ipFlQD0+ev3iCvpsfXLHIlg2c kMgylstGs7sGAqAmYHnp+bMYdojq0u/JTY9Ax0Hti7ONMEuJ35Iln+A+QbJrlwi1 mTkkKVqyMZhTwouLsvo/Y36uVL8ki6NyaMPuOOVhNtJ7pFCS6T9a2G6GU2D74n82 /HcGuOby+K2Z8pU9PpyQ =FXnt -----END PGP SIGNATURE----- --Sig_/xJgFqIrWG6h2VlBbIrx1d3r-- --===============0967314508== 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 --===============0967314508==--