From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH 2/2] drm: add an fb creation ioctl that takes a pixel format v4 Date: Mon, 14 Nov 2011 23:24:55 +0200 Message-ID: <20111114212455.GI3477@intel.com> References: <1321302115-23159-1-git-send-email-jbarnes@virtuousgeek.org> <1321302115-23159-2-git-send-email-jbarnes@virtuousgeek.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D08EA0957 for ; Mon, 14 Nov 2011 13:22:39 -0800 (PST) Content-Disposition: inline In-Reply-To: <1321302115-23159-2-git-send-email-jbarnes@virtuousgeek.org> 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: Jesse Barnes Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org 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 */ > +}; 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. We could stick something like these to those flags: fb_cmd2.flags: #define DRM_MODE_FB_INTERLACED 0x1 set_plane.flags: #define DRM_MODE_PRESENT_TOP_FIELD 0x1 #define DRM_MODE_PRESENT_BOTTOM_FIELD 0x2 -- = Ville Syrj=E4l=E4 Intel OTC