From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from anholt.net ([50.246.234.109]:52008 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727772AbeKHCjT (ORCPT ); Wed, 7 Nov 2018 21:39:19 -0500 From: Eric Anholt To: Boris Brezillon Cc: stable@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 1/3] drm/vc4: Set PPF scaling when the source image is only vertically scaled In-Reply-To: <20181024170238.4f65f5f2@bbrezillon> References: <20181024100505.22436-1-boris.brezillon@bootlin.com> <20181024170238.4f65f5f2@bbrezillon> Date: Wed, 07 Nov 2018 09:08:02 -0800 Message-ID: <87r2fwyfwt.fsf@anholt.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: stable-owner@vger.kernel.org List-ID: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Boris Brezillon writes: > On Wed, 24 Oct 2018 12:05:03 +0200 > Boris Brezillon wrote: > >> The source image might be only vertically scaled, and in this case >> ->is_unity will be false, but we'd still have to force ->x_scaling[0]=20= =20 >> to VC4_SCALING_PPF for YUV conversion to work properly. >>=20 >> Let's replace the ->is_unity test by->x_scaling[0] =3D=3D VC4_SCALING_NO= NE >> to cope with that. >>=20 >> Fixes: 658d8cbd07da ("drm/vc4: Fix the "no scaling" case on multi-planar= YUV formats") >> Cc: >> Signed-off-by: Boris Brezillon >> --- >> drivers/gpu/drm/vc4/vc4_plane.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >>=20 >> diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_p= lane.c >> index 60d5ad19cedd..32b7b9f47c5d 100644 >> --- a/drivers/gpu/drm/vc4/vc4_plane.c >> +++ b/drivers/gpu/drm/vc4/vc4_plane.c >> @@ -318,7 +318,7 @@ static int vc4_plane_setup_clipping_and_scaling(stru= ct drm_plane_state *state) >> * even on a plane that's otherwise 1:1. Looks like only PPF >> * works in that case, so let's pick that one. >> */ >> - if (vc4_state->is_unity) >> + if (vc4_state->x_scaling[0] =3D=3D VC4_SCALING_NONE) >> vc4_state->x_scaling[0] =3D VC4_SCALING_PPF; > > Actually, I'm not sure about this patch is needed. According to the > spec, we should not enable the scaler on the Y channel when ->is_unity > is true. > I tested it, and it seems to work if we just leave x_scaling[0] to > VC4_SCALING_NONE. Sorry, I've been delaying on this series until I could spend some time looking at the spec. I think you're right, I see no reason to kick us out of is_unity for YUV -- you can have is_unity, Y unscaled, and UV scaled. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlvjG/IACgkQtdYpNtH8 nuiihxAApowuoU22G2SVEQKjUuifhgoBNBeoOnh07R4TjlPvW1Uc+6De23pvz0iQ Vb1rmPkInGqLhX5RPTgIqMxaTYinqM/0jKXNZffvLtvQF4hSn/MHMcAtImkwKBQu Qo6/OfQpB9frD5zCfCyk29w3ZD3xXUgfjZeUV7mzGKsuSP5cA9EjkISGs3hNumef dtRn5RgZUV2woE00DRpf0zNzvTtx+oGFIAj9EO1lnA+8tzOR2VYpi4ZaXWyT3WSR pJrRk3Ou6H5X+f1I6CSOuH0mvis6hcNpzw8oKRQEvrxVvw3DEHJwWvYdbIC2x+rW qtwV8GB/buxYuQLkbzoK/J/2gQlLfUxuJwUXtPXm2soz+sHPlxdTn7pK/VBdtoHU VQoJdobjN54QvYpTxEedJ/0hCDKdM59P7C3b+IG4KaYFxEleEgUviY+7Jzq+Pu5y I9y7Ell3oxDngiQOxam804HxKwBXqo3UrHXbXO8p7vD8ggVwBUaFpTwo3QsYFcg9 ilB034YBPUwrGiLIK0CXCDd07HGUz5tWq8i6ODimMt2nUgZPtiBRdMCzW5Yfrd6+ EfBrFY/jIiatfClWC/ayFyjnTKtSe2U1CvSWbnSCJ5TeFm6/rdWzb2lsEqVQE+P2 gLw2TM1b5yYgl7da2y96jdNzs6uSQE8jWTuIehbBzCgJaRVgiv4= =s1hv -----END PGP SIGNATURE----- --=-=-=--