Skip to content

Commit

Permalink
drm: Avoid printing negative values for unsigned variables.
Browse files Browse the repository at this point in the history
It was really strange to see negative vblank seqs on debug
messages. It is rare to have that big number, but when it
happens it is confusing and misleading.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1470243226-2750-1-git-send-email-rodrigo.vivi@intel.com
  • Loading branch information
Rodrigo Vivi authored and Daniel Vetter committed Aug 8, 2016
1 parent 29b4817 commit 1d77685
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/gpu/drm/drm_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ void drm_vblank_off(struct drm_device *dev, unsigned int pipe)
if (e->pipe != pipe)
continue;
DRM_DEBUG("Sending premature vblank event on disable: "
"wanted %d, current %d\n",
"wanted %u, current %u\n",
e->event.sequence, seq);
list_del(&e->base.link);
drm_vblank_put(dev, pipe);
Expand Down Expand Up @@ -1585,7 +1585,7 @@ static int drm_queue_vblank_event(struct drm_device *dev, unsigned int pipe,

seq = drm_vblank_count_and_time(dev, pipe, &now);

DRM_DEBUG("event on vblank count %d, current %d, crtc %u\n",
DRM_DEBUG("event on vblank count %u, current %u, crtc %u\n",
vblwait->request.sequence, seq, pipe);

trace_drm_vblank_event_queued(current->pid, pipe,
Expand Down Expand Up @@ -1693,7 +1693,7 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
return drm_queue_vblank_event(dev, pipe, vblwait, file_priv);
}

DRM_DEBUG("waiting on vblank count %d, crtc %u\n",
DRM_DEBUG("waiting on vblank count %u, crtc %u\n",
vblwait->request.sequence, pipe);
DRM_WAIT_ON(ret, vblank->queue, 3 * HZ,
(((drm_vblank_count(dev, pipe) -
Expand All @@ -1708,7 +1708,7 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
vblwait->reply.tval_sec = now.tv_sec;
vblwait->reply.tval_usec = now.tv_usec;

DRM_DEBUG("returning %d to client\n",
DRM_DEBUG("returning %u to client\n",
vblwait->reply.sequence);
} else {
DRM_DEBUG("vblank wait interrupted by signal\n");
Expand All @@ -1735,7 +1735,7 @@ static void drm_handle_vblank_events(struct drm_device *dev, unsigned int pipe)
if ((seq - e->event.sequence) > (1<<23))
continue;

DRM_DEBUG("vblank event on %d, current %d\n",
DRM_DEBUG("vblank event on %u, current %u\n",
e->event.sequence, seq);

list_del(&e->base.link);
Expand Down

0 comments on commit 1d77685

Please sign in to comment.