1 From 2b02a05bdc3a62d36e0d0b015351897109e25991 Mon Sep 17 00:00:00 2001
2 From: Boris Brezillon <boris.brezillon@bootlin.com>
3 Date: Tue, 9 Oct 2018 15:24:46 +0200
4 Subject: drm/vc4: Set ->is_yuv to false when num_planes == 1
6 From: Boris Brezillon <boris.brezillon@bootlin.com>
8 commit 2b02a05bdc3a62d36e0d0b015351897109e25991 upstream.
10 When vc4_plane_state is duplicated ->is_yuv is left assigned to its
11 previous value, and we never set it back to false when switching to
14 Fix that by setting ->is_yuv to false in the 'num_planes == 1' branch
15 of the vc4_plane_setup_clipping_and_scaling() function.
17 Fixes: fc04023fafecf ("drm/vc4: Add support for YUV planes.")
18 Cc: <stable@vger.kernel.org>
19 Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
20 Reviewed-by: Eric Anholt <eric@anholt.net>
21 Link: https://patchwork.freedesktop.org/patch/msgid/20181009132446.21960-1-boris.brezillon@bootlin.com
22 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25 drivers/gpu/drm/vc4/vc4_plane.c | 1 +
26 1 file changed, 1 insertion(+)
28 --- a/drivers/gpu/drm/vc4/vc4_plane.c
29 +++ b/drivers/gpu/drm/vc4/vc4_plane.c
30 @@ -354,6 +354,7 @@ static int vc4_plane_setup_clipping_and_
31 if (vc4_state->is_unity)
32 vc4_state->x_scaling[0] = VC4_SCALING_PPF;
34 + vc4_state->is_yuv = false;
35 vc4_state->x_scaling[1] = VC4_SCALING_NONE;
36 vc4_state->y_scaling[1] = VC4_SCALING_NONE;