Skip to content

Commit

Permalink
drm/vc4: Fix sending of page flip completion events in FKMS mode.
Browse files Browse the repository at this point in the history
In the rewrite of vc4_crtc.c for fkms, I dropped the part of the
CRTC's atomic flush handler that moved the completion event from the
proposed atomic state change to the CRTC's current state.  That meant
that when full screen pageflipping happened (glxgears -fullscreen in
X, compton, por weston), the app would end up blocked firever waiting
to draw its next frame.

Signed-off-by: Eric Anholt <eric@anholt.net>
  • Loading branch information
anholt authored and popcornmix committed Feb 9, 2018
1 parent 9ac4821 commit 6b8f11c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions drivers/gpu/drm/vc4/vc4_firmware_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,21 @@ static int vc4_crtc_atomic_check(struct drm_crtc *crtc,
static void vc4_crtc_atomic_flush(struct drm_crtc *crtc,
struct drm_crtc_state *old_state)
{
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
struct drm_device *dev = crtc->dev;

if (crtc->state->event) {
unsigned long flags;

crtc->state->event->pipe = drm_crtc_index(crtc);

WARN_ON(drm_crtc_vblank_get(crtc) != 0);

spin_lock_irqsave(&dev->event_lock, flags);
vc4_crtc->event = crtc->state->event;
crtc->state->event = NULL;
spin_unlock_irqrestore(&dev->event_lock, flags);
}
}

static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc)
Expand Down

0 comments on commit 6b8f11c

Please sign in to comment.