From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.bootlin.com ([62.4.15.54]:46375 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729354AbeGYUch (ORCPT ); Wed, 25 Jul 2018 16:32:37 -0400 Date: Wed, 25 Jul 2018 21:19:23 +0200 From: Boris Brezillon To: Eric Anholt Cc: David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, stable@vger.kernel.org Subject: Re: [PATCH] drm/vc4: Reset ->{x,y}_scaling[1] when dealing with uniplanar formats Message-ID: <20180725211923.12ab899d@bbrezillon> In-Reply-To: <20180724133601.32114-1-boris.brezillon@bootlin.com> References: <20180724133601.32114-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 Tue, 24 Jul 2018 15:36:01 +0200 Boris Brezillon wrote: > This is needed to ensure ->is_unity is correct when the plane was > previously configured to output a multi-planar format with scaling > enabled, and is then being reconfigured to output a uniplanar format. > > Fixes: fc04023fafec ("drm/vc4: Add support for YUV planes.") > Cc: > Signed-off-by: Boris Brezillon Applied to drm-misc-fixes. > --- > drivers/gpu/drm/vc4/vc4_plane.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c > index 9d7a36f148cf..cfb50fedfa2b 100644 > --- a/drivers/gpu/drm/vc4/vc4_plane.c > +++ b/drivers/gpu/drm/vc4/vc4_plane.c > @@ -320,6 +320,9 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) > vc4_state->x_scaling[0] = VC4_SCALING_TPZ; > if (vc4_state->y_scaling[0] == VC4_SCALING_NONE) > vc4_state->y_scaling[0] = VC4_SCALING_TPZ; > + } else { > + vc4_state->x_scaling[1] = VC4_SCALING_NONE; > + vc4_state->y_scaling[1] = VC4_SCALING_NONE; > } > > vc4_state->is_unity = (vc4_state->x_scaling[0] == VC4_SCALING_NONE &&