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: Tue, 3 May 2016 09:08:06 +0300 Message-ID: <57284046.1070809@ti.com> References: <1461702945-14185-1-git-send-email-laurent.pinchart@ideasonboard.com> <1461702945-14185-3-git-send-email-laurent.pinchart@ideasonboard.com> <57277593.10303@ti.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0058873329==" Return-path: Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by gabe.freedesktop.org (Postfix) with ESMTPS id 36C5A6E153 for ; Tue, 3 May 2016 06:08:13 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Rob Clark Cc: Laurent Pinchart , "dri-devel@lists.freedesktop.org" List-Id: dri-devel@lists.freedesktop.org --===============0058873329== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ItT618es2fFLldte5OE4qlobAchfd8hr2" --ItT618es2fFLldte5OE4qlobAchfd8hr2 Content-Type: multipart/mixed; boundary="xlCLAOkIE7Ds4sEqWsUfBvTVmQ0vRA8nL" From: Tomi Valkeinen To: Rob Clark Cc: Laurent Pinchart , "dri-devel@lists.freedesktop.org" Message-ID: <57284046.1070809@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> <57277593.10303@ti.com> In-Reply-To: --xlCLAOkIE7Ds4sEqWsUfBvTVmQ0vRA8nL Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/05/16 00:01, Rob Clark wrote: > On Mon, May 2, 2016 at 11:43 AM, Tomi Valkeinen = wrote: >> 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 bi= ts >> 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' en= ds >> 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= =2E >> 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. >=20 > fwiw, I guess a lot of data from that table could these days be > replaced w/ some of the drm format helpers > (drm_format_num_planes()/drm_format_plane_cpp()/drm_format_{horz,vert}_= chroma_subsampling()/etc) Indeed, I think we can remove all but the DRM -> DSS format mapping. Btw, what is "cpp" short from? Tomi --xlCLAOkIE7Ds4sEqWsUfBvTVmQ0vRA8nL-- --ItT618es2fFLldte5OE4qlobAchfd8hr2 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 iQIcBAEBCAAGBQJXKEBGAAoJEPo9qoy8lh711GYP/2FOTOf40KdvfwkV+k8FUnsK 791XTrAH7SoH/2d0IJ+fndBnHfiYYrNXVRAED91QhU5dwaJdi+T9e01inoVYlVON zW+F2dRJpLOOZLFXfb5vabEfudW3ywXcjvHe6w3pYkRShtFQ5kt7SD2bBD1smPjH vHW4TRmvscDQvSbhe8in915Kba/2jIKr1tPP8GG4F+Erx92OG2L44MZQL722MqpY nl3mUQOyFRrHmQgCUGD5+cFCaJtJmGFmJ1IQ1fQt94sZa00XNehV91xSjmFfEl1X Xq6rNdfv1hbXIDgJhbpftEskMWQCZkPoAb9jxf6Xvj52wIVssGqcnjfAjyG1e+7N RywQdwk20u3t0BwabGIAILLUwLWDSkb8SreKb9DhSsQRju7rnIiGecFhGWIsLJDI MNfnmBl/TY7E7M2/V58PlRs7gZEKF+CHUGrEaX8g7jJ8UOkKo+afzhxvhJQ2Hw1H NSlElzAKfy9Iz8345FQiVE+No9Tp2nQHCtPXaFuA2Hgdmr0xfSfQnxTbkpYKHMiK p1BZOZwyzQRU/wxW6rh/W0il4gj9/zi9DnkK5+1VW8DSGK/46LAQ46L2i1u7R+/s zeSG2zaubDK5A5oMsyjV74lmM/M+VA7TZScsmFU1OOPSpNo2O/XuvrAkThiX5cwm /9cxgJyovAn9z++Bgm3G =Fg+d -----END PGP SIGNATURE----- --ItT618es2fFLldte5OE4qlobAchfd8hr2-- --===============0058873329== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0058873329==--