From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH 2/5] drm: add an fb creation ioctl that takes a pixel format Date: Mon, 7 Nov 2011 08:12:45 -0800 Message-ID: <20111107081245.1b9351d5@jbarnes-desktop> References: <1320264203-18715-1-git-send-email-jbarnes@virtuousgeek.org> <1320264203-18715-3-git-send-email-jbarnes@virtuousgeek.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1472363305==" Return-path: Received: from oproxy8-pub.bluehost.com (oproxy8-pub.bluehost.com [69.89.22.20]) by gabe.freedesktop.org (Postfix) with SMTP id BA00E9F752 for ; Mon, 7 Nov 2011 08:12:50 -0800 (PST) In-Reply-To: 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: InKi Dae , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1472363305== Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/F4Wih5lAws3SDu4Vc.sZ0s."; protocol="application/pgp-signature" --Sig_/F4Wih5lAws3SDu4Vc.sZ0s. Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Mon, 7 Nov 2011 23:55:02 +0900 InKi Dae wrote: > > +struct drm_mode_fb_cmd2 { > > + =A0 =A0 =A0 __u32 fb_id; > > + =A0 =A0 =A0 __u32 width, height; > > + =A0 =A0 =A0 __u32 pixel_format; /* fourcc code from videodev2.h */ > > + > > + =A0 =A0 =A0 /* > > + =A0 =A0 =A0 =A0* In case of planar formats, this ioctl allows one > > + =A0 =A0 =A0 =A0* buffer object with offets and pitches per plane. > > + =A0 =A0 =A0 =A0* The pitch and offset order is dictated by the fourcc, > > + =A0 =A0 =A0 =A0* e.g. NV12 (http://fourcc.org/yuv.php#NV12) is descri= bed as: > > + =A0 =A0 =A0 =A0* > > + =A0 =A0 =A0 =A0* =A0 YUV 4:2:0 image with a plane of 8 bit Y samples > > + =A0 =A0 =A0 =A0* =A0 followed by an interleaved U/V plane containing > > + =A0 =A0 =A0 =A0* =A0 8 bit 2x2 subsampled colour difference samples. > > + =A0 =A0 =A0 =A0* > > + =A0 =A0 =A0 =A0* So it would consist of Y as offset[0] and UV as > > + =A0 =A0 =A0 =A0* offeset[1]. =A0Note that offset[0] will generally > > + =A0 =A0 =A0 =A0* be 0. > > + =A0 =A0 =A0 =A0*/ > > + =A0 =A0 =A0 __u32 handle; > > + =A0 =A0 =A0 __u32 pitches[4]; /* pitch for each plane */ > > + =A0 =A0 =A0 __u32 offsets[4]; /* offset of each plane */ > > +}; >=20 > I think that it doesn't pitches[] and offsets[] because we can > calulate pitch and offset per plane in kernel side through pixel > format information from user. (PS. pixel format has unique value) I > think it's good to remove them if unnecessary. there could be my > missing point. so Rob, could you please tell me about why do you need > them.? Daniel seemed to think that some of the formats might have ambiguous pitches or offsets, so being able to specify one for each possible component seems like a good idea. Also, for planar formats packed into a single buffer object handle (through driver specific multiplexing or non-zero offsets), individual pitches and offsets may be required. --=20 Jesse Barnes, Intel Open Source Technology Center --Sig_/F4Wih5lAws3SDu4Vc.sZ0s. Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJOuAN9AAoJEIEoDkX4Qk9hNGsQAKv3BWbds2FLARwEUjfezyUp N7WT1P7tJtXZhx5AEJY0jG5kekfmX9C+MhaWY2FZHlSjLr9wRQkV+4tU845e4vk1 EMnxwwSh1B7HAmiOarJ3JahlJ1ZeP5lM7IBi6DGFhw87zzoo2TZbRgtAv9PhEQR6 CP3l7jkvj0rRm82NzHKSDprtTIiWgMBhND4lmEC4cwsObr/Kw13tBRPOd4bMij01 61Whc+5KL37giwoA2ozkw9UZOwRODBuOdejpVqg5M/ig0ohXmDCzlwisGSctUniR p61eUPk8TW6f9Q0tgtmjtOPbNKZjIqqI8nE/DuWkkL0uALTSvx8gbMeAoyXno3Xa 3+w1vAFlCcIHkJLZqP7XB+EiIojRbKVAhJruv8ouq+SYQAkpVL7KZyYIhvfvCuW6 G/kos1Co/FnEe02d8AgXGTC7WpysUWiKkQO5fxF4SMFuZQRuxQiB22F6iH10E5p8 Dv8eJaly8C5IGwcxxf8lR6+aXNwoYO8nHoO24FJKyR/0jZ01UetskCboVH33cbnd dtiSB/yqQNPCqG9Vhm2Tbe9GKKqFPWTcsWUmGI1VND0WxbBjiMaaySBYb/+fWoVJ wVJJRjhkSjoY2inzGFg/ETUxbGIIfFzzp11OSdNkltsPEIdfCUUkgATXneND2gkM ND3lB+yf46fH0O6Yy3UK =NvkI -----END PGP SIGNATURE----- --Sig_/F4Wih5lAws3SDu4Vc.sZ0s.-- --===============1472363305== 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 --===============1472363305==--