From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomi Valkeinen Subject: Re: [PATCH 02/23] drm: omapdrm: fb: Don't store format BPP for each plane Date: Mon, 2 May 2016 18:43:15 +0300 Message-ID: <57277593.10303@ti.com> References: <1461702945-14185-1-git-send-email-laurent.pinchart@ideasonboard.com> <1461702945-14185-3-git-send-email-laurent.pinchart@ideasonboard.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0211547859==" Return-path: Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1C0B16E605 for ; Mon, 2 May 2016 15:43:22 +0000 (UTC) In-Reply-To: <1461702945-14185-3-git-send-email-laurent.pinchart@ideasonboard.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Laurent Pinchart , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0211547859== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4nbwWr1rq5iVRP4auxaAoMcc1mFpPtwhX" --4nbwWr1rq5iVRP4auxaAoMcc1mFpPtwhX Content-Type: multipart/mixed; boundary="OPEh4AfVMjP4MdSc5JujsN2BKtLOaSev5" From: Tomi Valkeinen To: Laurent Pinchart , dri-devel@lists.freedesktop.org Cc: Rob Clark Message-ID: <57277593.10303@ti.com> Subject: Re: [PATCH 02/23] drm: omapdrm: fb: Don't store format BPP for each plane References: <1461702945-14185-1-git-send-email-laurent.pinchart@ideasonboard.com> <1461702945-14185-3-git-send-email-laurent.pinchart@ideasonboard.com> In-Reply-To: <1461702945-14185-3-git-send-email-laurent.pinchart@ideasonboard.com> --OPEh4AfVMjP4MdSc5JujsN2BKtLOaSev5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Laurent, On 26/04/16 23:35, Laurent Pinchart wrote: > The number of bits per pixel is identical for all planes, don't store > multiple copies. That's not true, as with NV12, Y has 8 bits per pixel and UV has 16 bits per pixel. But as the subsampling is precalculated into the stride_bpp (is it bytes or bits? bpp always confuses me =3D), the 'stride_bpp' ends up being same for both planes. To be honest, I'd rather go into more complex struct than simpler one. The current one is already confusing, I think, and your version is too. The main issue is that the sub_x is encoded into the stride_bpp. In kmsxx I used this format: { PixelFormat::NV12, { 2, { { 8, 1, 1, }, { 8, 2, 2 } }, } }, The first number is the number of planes, and for each plane, bitspp, xsub and ysub. It's more verbose, but (I think) easier to understand. Tomi --OPEh4AfVMjP4MdSc5JujsN2BKtLOaSev5-- --4nbwWr1rq5iVRP4auxaAoMcc1mFpPtwhX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXJ3WTAAoJEPo9qoy8lh71GDYP/00Sjf7cKcfJ6MEased3ysxa l6rDlPeva6hVYrxV6kXwWBrJv71vMulQrSc/aM/8eaoqSLKPLTpzjb1wBKYp8wQZ n0l7s3w0yaGjy/aLFu9oW92nWeFpSCKHEDEIrzl94/Q9CSTsDXZfJRi6mZ0Uvroq nhRaWE4qx3B4dMDVxVZqdZw8s0uE6iNj5SpE8U4GH+6bGHhzWKG5V1B5VTw658WU mBpoJtM/B5WP2717uWyPIv3RJ2tWY3SXmfCrGjXfnx7/EF/rOsdedxiKsT5dkZzl D0/KEP7OHBY1wmzJuwNCEsVLMIkjuExsLkBoDvNBQbJSXNtmMxaOD236I+TbGQQG /V5RbDTaClK8pcWeNFQei5b85qP13mFCoi4VO/IJ3/nbt7YLXRYBjjSB+egkTh57 IJzmHKphWvO4HF0s7cV2uOcnc7+9TFnZysvYWU/G84wqXx+AkCNHFwQjWfzZ4c+F 98weIKjoOPLpb1LeJ4gzhIPFfmvxw/6DZGWnNOJc6SjRoLqPUdTjLrCIHP/9AISo j9ZwzySnWoMOaWFBloFibouQc2cNjZaCtlZHQkY82Qo+BGx4qQ7V0JcVa/gNSQND LuVHPx63Y6VY3IBfI47GOd8gMFndR8l96Fx3OLhW/XPiWFTtwyiUSKM4dxcz9IJv hdG7QEeYKOOjes1ZrzyA =GSGf -----END PGP SIGNATURE----- --4nbwWr1rq5iVRP4auxaAoMcc1mFpPtwhX-- --===============0211547859== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0211547859==--