From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomi Valkeinen Subject: Re: [PATCH 7/7] drm/omap: fix YUV422 90/270 rotation with mirroring Date: Wed, 24 May 2017 09:55:02 +0300 Message-ID: References: <1495007804-6133-1-git-send-email-tomi.valkeinen@ti.com> <1495007804-6133-8-git-send-email-tomi.valkeinen@ti.com> <2709048.PrGuQoT2UV@avalon> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0852592879==" Return-path: Received: from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8A9B36E4B9 for ; Wed, 24 May 2017 06:55:07 +0000 (UTC) In-Reply-To: <2709048.PrGuQoT2UV@avalon> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Laurent Pinchart Cc: Jyri Sarha , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0852592879== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IjmjeQLbXE1jwQtNUnpQl61aVweeEPaC5" --IjmjeQLbXE1jwQtNUnpQl61aVweeEPaC5 Content-Type: multipart/mixed; boundary="RJCXLko8Rg0ShkGUhIfOhb2xlMV9UgRWt"; protected-headers="v1" From: Tomi Valkeinen To: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org, Jyri Sarha Message-ID: Subject: Re: [PATCH 7/7] drm/omap: fix YUV422 90/270 rotation with mirroring References: <1495007804-6133-1-git-send-email-tomi.valkeinen@ti.com> <1495007804-6133-8-git-send-email-tomi.valkeinen@ti.com> <2709048.PrGuQoT2UV@avalon> In-Reply-To: <2709048.PrGuQoT2UV@avalon> --RJCXLko8Rg0ShkGUhIfOhb2xlMV9UgRWt Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 24/05/17 09:46, Laurent Pinchart wrote: > Hi Tomi, >=20 > Thank you for the patch. >=20 > On Wednesday 17 May 2017 10:56:44 Tomi Valkeinen wrote: >> When rotating 90/270 + mirroring with YUV422, the end result will have= >> adjacent pixels swapped. The problem is that >> dispc_ovl_set_rotation_attrs() has wrong rotation values for these >> cases. >> >> Signed-off-by: Tomi Valkeinen >> --- >> drivers/gpu/drm/omapdrm/dss/dispc.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c >> b/drivers/gpu/drm/omapdrm/dss/dispc.c index 80c75e5913cb..7261f87b2a5b= >> 100644 >> --- a/drivers/gpu/drm/omapdrm/dss/dispc.c >> +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c >> @@ -1817,13 +1817,13 @@ static void dispc_ovl_set_rotation_attrs(enum >> omap_plane_id plane, u8 rotation, vidrot =3D 2; >> break; >> case DRM_ROTATE_270: >> - vidrot =3D 1; >> + vidrot =3D 3; >> break; >> case DRM_ROTATE_180: >> vidrot =3D 0; >> break; >> case DRM_ROTATE_90: >> - vidrot =3D 3; >> + vidrot =3D 1; >=20 > How about ordering the cases in 0, 90, 180, 270 order ? That would look= =20 > cleaner for both the case label and the vidrot value. I would actually = have=20 > done so in the patch where you replaced OMAP_DSS_ROT_* with DRM_ROTATE_= *. I thought about it, and I kind of agree. But... DSS rotates the other way, so the cases are now in DSS's 0, 90, 180, 270 order. And if I'd change the order, then the vidrot values for non-DRM_REFLECT_X (i.e. the "normal) case would be in strange order. I should probably add comments there that the DSS rotation is the other w= ay. Tomi --RJCXLko8Rg0ShkGUhIfOhb2xlMV9UgRWt-- --IjmjeQLbXE1jwQtNUnpQl61aVweeEPaC5 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 iQIcBAEBCAAGBQJZJS5GAAoJEPo9qoy8lh71uLkQAJOmp7nqnyxrBsoco9PmKMEP 1MhSkfaLo80/BbHiXkWtZCMQ8ESNVyuEUy7qPdTBhEnGFts9gWypAq+14KxZe6TO 4RVjeJq4gZmLeaaklzc9iR4J1Q1h5rAIVkasr+xXbR+MTR6fy+VWhaUwr/lIx4vV e1D2yupBeKaj0Rd7oAIogJpna84rFuBvQeNDo4y0nFeyHSJC37UYHOl3o1G9FFsx nn0Fr30oXkhxH3Vtp1AtOvnRMUb+rqijn1okeeqvWLM+/0aW8LSRpaRPwSwRIrgf nzBM4cqAfhiSNQGTzZgTfhSCMgKWRPsm5c4X4MwIELvLsAh5sup9ec6Q5YZJOnuh 8SLDF4YbDWvKPJmxp80Xwbcf001N9id3HG7ui8yMqQ9T0lFCz2xo2Ux+xnL9xFKX C/x8lE72XxJ3So6EBotjU0ABL9KpumLJNJzyEmWL/zAFINlXiR1bo0WAeLsHJNRj O58YzfrqFHcpT/reMSkos1CFrr2VG/8GXDC3MTa8e1jG0GS2NACJ/Na/sQP5KqTz XLqj+fZc7sDAJiuxWcJEmhejUSlBFCIlhJZjBwKmPtvcAKcV+xoiCDlRwxrvaIwH 3szCeQwECez9+pXpeKgpcpqTqS7ZFglYetilPjxbehDRFo7qWyU0VYUucRgRVxh3 HXyAhdxmOXVw1nn0wI8c =1Qeg -----END PGP SIGNATURE----- --IjmjeQLbXE1jwQtNUnpQl61aVweeEPaC5-- --===============0852592879== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0852592879==--