summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-06-15 11:13:29 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2015-07-15 17:45:29 +0200
commit070f3f6baef5c749e8b11be0455fc90113dfdde8 (patch)
treeafa77655b8bb0aeda93dfe59ec3115b2bc5c09ba /drivers/gpu
parentLinux 4.1 (diff)
downloadlinux-070f3f6baef5c749e8b11be0455fc90113dfdde8.tar.xz
linux-070f3f6baef5c749e8b11be0455fc90113dfdde8.zip
drm/armada: fix missing overlay wake-up
Nothing was waking up the overlay plane wait queue, so we were fully reliant on the HZ/25 wait timing out to make progress. Fix the lack of wake-up. We were also mis-handling the wait_event_timeout() return value - this returns an unsigned integer of the remaining time, or zero on timeout and the condition evaluated false. Checking this for less than zero is not sane. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/armada/armada_overlay.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_overlay.c
index c5b06fdb459c..0abf785f5d0f 100644
--- a/drivers/gpu/drm/armada/armada_overlay.c
+++ b/drivers/gpu/drm/armada/armada_overlay.c
@@ -85,6 +85,8 @@ static void armada_plane_vbl(struct armada_crtc *dcrtc, void *data)
if (fb)
armada_drm_queue_unref_work(dcrtc->crtc.dev, fb);
+
+ wake_up(&dplane->vbl.wait);
}
static unsigned armada_limit(int start, unsigned size, unsigned max)
@@ -150,11 +152,9 @@ armada_plane_update(struct drm_plane *plane, struct drm_crtc *crtc,
dcrtc->base + LCD_SPU_SRAM_PARA1);
}
- ret = wait_event_timeout(dplane->vbl.wait,
- list_empty(&dplane->vbl.update.node),
- HZ/25);
- if (ret < 0)
- return ret;
+ wait_event_timeout(dplane->vbl.wait,
+ list_empty(&dplane->vbl.update.node),
+ HZ/25);
if (plane->fb != fb) {
struct armada_gem_object *obj = drm_fb_obj(fb);