Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH] drm/vc4: Reset ->{x,y}_scaling[1] when dealing with uniplanar formats
@ 2018-07-24 13:36 Boris Brezillon
  2018-07-24 19:16 ` Eric Anholt
  2018-07-25 19:19 ` Boris Brezillon
  0 siblings, 2 replies; 3+ messages in thread
From: Boris Brezillon @ 2018-07-24 13:36 UTC (permalink / raw)
  To: Eric Anholt
  Cc: David Airlie, Daniel Vetter, dri-devel, Boris Brezillon, stable

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: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
---
 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 &&
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-25 20:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-24 13:36 [PATCH] drm/vc4: Reset ->{x,y}_scaling[1] when dealing with uniplanar formats Boris Brezillon
2018-07-24 19:16 ` Eric Anholt
2018-07-25 19:19 ` Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox