From 2b1c6b21b5e6c82ebb55d7fb7df90e60e88cbb14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sat, 10 Sep 2016 14:54:26 +0200 Subject: brcm2708: update linux 4.4 patches to latest version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As usual these patches were extracted and rebased from the raspberry pi repo: https://github.com/raspberrypi/linux/tree/rpi-4.4.y Also adds support for Raspberry Pi Compute Module 3 (untested). Signed-off-by: Álvaro Fernández Rojas --- ...-drm_vblank_put-get-imbalance-in-page-fli.patch | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 target/linux/brcm2708/patches-4.4/0340-drm-vc4-Fix-drm_vblank_put-get-imbalance-in-page-fli.patch (limited to 'target/linux/brcm2708/patches-4.4/0340-drm-vc4-Fix-drm_vblank_put-get-imbalance-in-page-fli.patch') diff --git a/target/linux/brcm2708/patches-4.4/0340-drm-vc4-Fix-drm_vblank_put-get-imbalance-in-page-fli.patch b/target/linux/brcm2708/patches-4.4/0340-drm-vc4-Fix-drm_vblank_put-get-imbalance-in-page-fli.patch new file mode 100644 index 0000000000..616ff43786 --- /dev/null +++ b/target/linux/brcm2708/patches-4.4/0340-drm-vc4-Fix-drm_vblank_put-get-imbalance-in-page-fli.patch @@ -0,0 +1,47 @@ +From bd3aef6d9474fbb9fe063a2f409f920263c28ff1 Mon Sep 17 00:00:00 2001 +From: Mario Kleiner +Date: Fri, 6 May 2016 19:26:06 +0200 +Subject: [PATCH] drm/vc4: Fix drm_vblank_put/get imbalance in page flip path. + +The async page flip path was missing drm_crtc_vblank_get/put +completely. The sync flip path was missing a vblank put, so async +flips only reported proper pageflip completion events by chance, +and vblank irq's never turned off after a first vsync'ed page flip +until system reboot. + +Tested against Raspian kernel 4.4.8 tree on RPi 2B. + +Signed-off-by: Mario Kleiner +Cc: Eric Anholt +Signed-off-by: Eric Anholt +--- + drivers/gpu/drm/vc4/vc4_crtc.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/gpu/drm/vc4/vc4_crtc.c ++++ b/drivers/gpu/drm/vc4/vc4_crtc.c +@@ -506,6 +506,7 @@ static void vc4_crtc_handle_page_flip(st + if (vc4_crtc->event) { + drm_crtc_send_vblank_event(crtc, vc4_crtc->event); + vc4_crtc->event = NULL; ++ drm_crtc_vblank_put(crtc); + } + spin_unlock_irqrestore(&dev->event_lock, flags); + } +@@ -556,6 +557,7 @@ vc4_async_page_flip_complete(struct vc4_ + spin_unlock_irqrestore(&dev->event_lock, flags); + } + ++ drm_crtc_vblank_put(crtc); + drm_framebuffer_unreference(flip_state->fb); + kfree(flip_state); + +@@ -598,6 +600,8 @@ static int vc4_async_page_flip(struct dr + return ret; + } + ++ WARN_ON(drm_crtc_vblank_get(crtc) != 0); ++ + /* Immediately update the plane's legacy fb pointer, so that later + * modeset prep sees the state that will be present when the semaphore + * is released. -- cgit v1.2.3