From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.bootlin.com ([62.4.15.54]:47777 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726538AbeJXXbR (ORCPT ); Wed, 24 Oct 2018 19:31:17 -0400 Date: Wed, 24 Oct 2018 17:02:38 +0200 From: Boris Brezillon To: Eric Anholt 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 Message-ID: <20181024170238.4f65f5f2@bbrezillon> In-Reply-To: <20181024100505.22436-1-boris.brezillon@bootlin.com> References: <20181024100505.22436-1-boris.brezillon@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: 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] > to VC4_SCALING_PPF for YUV conversion to work properly. > > Let's replace the ->is_unity test by->x_scaling[0] == VC4_SCALING_NONE > to cope with that. > > 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(-) > > diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.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(struct 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] == VC4_SCALING_NONE) > vc4_state->x_scaling[0] = 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. Eric, do you remember why you did that?