Skip to content

Commit

Permalink
drm/i915: Put "cooked" vlank counters in frame CRC lines
Browse files Browse the repository at this point in the history
Use drm_accurate_vblank_count so we have the full 32 bit to represent
the frame counter and userspace has a simpler way of knowing when the
counter wraps around.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170110134305.26326-3-tomeu.vizoso@collabora.com
  • Loading branch information
Tomeu Vizoso authored and Daniel Vetter committed Jan 10, 2017
1 parent 8c6b709 commit 246ee52
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/i915_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1557,7 +1557,6 @@ static void display_pipe_crc_irq_handler(struct drm_i915_private *dev_priv,
struct drm_driver *driver = dev_priv->drm.driver;
uint32_t crcs[5];
int head, tail;
u32 frame;

spin_lock(&pipe_crc->lock);
if (pipe_crc->source) {
Expand Down Expand Up @@ -1612,8 +1611,9 @@ static void display_pipe_crc_irq_handler(struct drm_i915_private *dev_priv,
crcs[2] = crc2;
crcs[3] = crc3;
crcs[4] = crc4;
frame = driver->get_vblank_counter(&dev_priv->drm, pipe);
drm_crtc_add_crc_entry(&crtc->base, true, frame, crcs);
drm_crtc_add_crc_entry(&crtc->base, true,
drm_accurate_vblank_count(&crtc->base),
crcs);
}
}
#else
Expand Down

0 comments on commit 246ee52

Please sign in to comment.