Skip to content

Commit

Permalink
drm/armada: fix missing overlay wake-up
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King committed Jul 15, 2015
1 parent b953c0d commit 070f3f6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/gpu/drm/armada/armada_overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 070f3f6

Please sign in to comment.