summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Robinson <pbrobinson@gmail.com>2018-10-17 08:58:33 +0100
committerPeter Robinson <pbrobinson@gmail.com>2018-10-17 08:58:33 +0100
commit447a6b31116c0b72441d6b404ae629e54de65c1e (patch)
treecb1e6a3404901d85a48c3d1f8e43f60da058ab39
parenteebac04dfdcff17c0377ecffe4c8fe69bb5f4530 (diff)
downloadkernel-447a6b31116c0b72441d6b404ae629e54de65c1e.tar.gz
kernel-447a6b31116c0b72441d6b404ae629e54de65c1e.tar.xz
kernel-447a6b31116c0b72441d6b404ae629e54de65c1e.zip
Raspberry Pi graphics fix
-rw-r--r--bcm283x-drm-vc4-set-is_yuv-to-false-when-num_planes-1.patch40
-rw-r--r--kernel.spec3
2 files changed, 43 insertions, 0 deletions
diff --git a/bcm283x-drm-vc4-set-is_yuv-to-false-when-num_planes-1.patch b/bcm283x-drm-vc4-set-is_yuv-to-false-when-num_planes-1.patch
new file mode 100644
index 000000000..5aa9668bc
--- /dev/null
+++ b/bcm283x-drm-vc4-set-is_yuv-to-false-when-num_planes-1.patch
@@ -0,0 +1,40 @@
+From patchwork Tue Oct 9 13:24:46 2018
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: drm/vc4: Set ->is_yuv to false when num_planes == 1
+From: Boris Brezillon <boris.brezillon@bootlin.com>
+X-Patchwork-Id: 255528
+Message-Id: <20181009132446.21960-1-boris.brezillon@bootlin.com>
+To: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
+ dri-devel@lists.freedesktop.org, Eric Anholt <eric@anholt.net>
+Cc: Boris Brezillon <boris.brezillon@bootlin.com>, stable@vger.kernel.org
+Date: Tue, 9 Oct 2018 15:24:46 +0200
+
+When vc4_plane_state is duplicated ->is_yuv is left assigned to its
+previous value, and we never set it back to false when switching to
+a non-YUV format.
+
+Fix that by setting ->is_yuv to false in the 'num_planes == 1' branch
+of the vc4_plane_setup_clipping_and_scaling() function.
+
+Fixes: fc04023fafecf ("drm/vc4: Add support for YUV planes.")
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
+Reviewed-by: Eric Anholt <eric@anholt.net>
+---
+ drivers/gpu/drm/vc4/vc4_plane.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
+index d04b3c3246ba..60d5ad19cedd 100644
+--- a/drivers/gpu/drm/vc4/vc4_plane.c
++++ b/drivers/gpu/drm/vc4/vc4_plane.c
+@@ -321,6 +321,7 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state)
+ if (vc4_state->is_unity)
+ vc4_state->x_scaling[0] = VC4_SCALING_PPF;
+ } else {
++ vc4_state->is_yuv = false;
+ vc4_state->x_scaling[1] = VC4_SCALING_NONE;
+ vc4_state->y_scaling[1] = VC4_SCALING_NONE;
+ }
diff --git a/kernel.spec b/kernel.spec
index ec14e7725..c936a8d87 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -614,6 +614,8 @@ Patch331: bcm2835-cpufreq-add-CPU-frequency-control-driver.patch
Patch332: bcm2835-hwmon-Add-support-for-RPi-voltage-sensor.patch
+Patch334: bcm283x-drm-vc4-set-is_yuv-to-false-when-num_planes-1.patch
+
# Patches enabling device specific brcm firmware nvram
# https://www.spinics.net/lists/linux-wireless/msg178827.html
Patch340: brcmfmac-Remove-firmware-loading-code-duplication.patch
@@ -1933,6 +1935,7 @@ fi
%changelog
* Tue Oct 16 2018 Peter Robinson <pbrobinson@fedoraproject.org>
- Fixes to Rock960 series of devices, improves stability considerably
+- Raspberry Pi graphics fix
* Mon Oct 15 2018 Justin M. Forbes <jforbes@fedoraproject.org> - 4.18.14-300
- Linux v4.18.14