aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.4/0519-drm-vc4-Enable-Disable-vblanks-properly-in-crtc-en-d.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2016-12-02 11:50:26 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2016-12-04 12:32:04 +0100
commit011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e (patch)
treebe53d4f11f7625508ee3aea9889e854ab5b5f263 /target/linux/brcm2708/patches-4.4/0519-drm-vc4-Enable-Disable-vblanks-properly-in-crtc-en-d.patch
parent4257f6548b9480cdb436115b63d5c134c5e91303 (diff)
downloadupstream-011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e.tar.gz
upstream-011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e.tar.bz2
upstream-011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e.zip
brcm2708: update linux 4.4 patches to latest version
As usual these patches were extracted and rebased from the raspberry pi repo: https://github.com/raspberrypi/linux/tree/rpi-4.4.y Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0519-drm-vc4-Enable-Disable-vblanks-properly-in-crtc-en-d.patch')
-rw-r--r--target/linux/brcm2708/patches-4.4/0519-drm-vc4-Enable-Disable-vblanks-properly-in-crtc-en-d.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0519-drm-vc4-Enable-Disable-vblanks-properly-in-crtc-en-d.patch b/target/linux/brcm2708/patches-4.4/0519-drm-vc4-Enable-Disable-vblanks-properly-in-crtc-en-d.patch
new file mode 100644
index 0000000000..4039a369fa
--- /dev/null
+++ b/target/linux/brcm2708/patches-4.4/0519-drm-vc4-Enable-Disable-vblanks-properly-in-crtc-en-d.patch
@@ -0,0 +1,38 @@
+From c4bd9665b145cacfdf9cbd5f3d83ed0961080236 Mon Sep 17 00:00:00 2001
+From: Mario Kleiner <mario.kleiner.de@gmail.com>
+Date: Tue, 19 Jul 2016 20:59:01 +0200
+Subject: [PATCH] drm/vc4: Enable/Disable vblanks properly in crtc en/disable.
+
+Add missing drm_crtc_vblank_on/off() calls so vblank irq
+handling/updating/timestamping never runs with a crtc shut down
+or during its shutdown/startup, as that causes large jumps in
+vblank count and trouble for compositors.
+
+Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
+Signed-off-by: Eric Anholt <eric@anholt.net>
+---
+ drivers/gpu/drm/vc4/vc4_crtc.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/gpu/drm/vc4/vc4_crtc.c
++++ b/drivers/gpu/drm/vc4/vc4_crtc.c
+@@ -468,6 +468,9 @@ static void vc4_crtc_disable(struct drm_
+ int ret;
+ require_hvs_enabled(dev);
+
++ /* Disable vblank irq handling before crtc is disabled. */
++ drm_crtc_vblank_off(crtc);
++
+ if (VC4_DSI_USE_FIRMWARE_SETUP &&
+ (CRTC_READ(PV_V_CONTROL) & PV_VCONTROL_DSI)) {
+ /* Skip disabling the PV/HVS for the channel if it was
+@@ -531,6 +534,9 @@ static void vc4_crtc_enable(struct drm_c
+ /* Turn on the pixel valve, which will emit the vstart signal. */
+ CRTC_WRITE(PV_V_CONTROL,
+ CRTC_READ(PV_V_CONTROL) | PV_VCONTROL_VIDEN);
++
++ /* Enable vblank irq handling after crtc is started. */
++ drm_crtc_vblank_on(crtc);
+ }
+
+ static bool vc4_crtc_mode_fixup(struct drm_crtc *crtc,