* [PATCH] drm: Avoid printing negative values for unsigned variables.
@ 2016-08-03 16:53 Rodrigo Vivi
2016-08-03 19:04 ` [Intel-gfx] " Ville Syrjälä
0 siblings, 1 reply; 3+ messages in thread
From: Rodrigo Vivi @ 2016-08-03 16:53 UTC (permalink / raw)
To: intel-gfx; +Cc: dri-devel, Rodrigo Vivi
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>
---
drivers/gpu/drm/drm_irq.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 77f357b..01a5079 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -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);
@@ -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,
@@ -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) -
@@ -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");
@@ -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);
--
2.5.5
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Intel-gfx] [PATCH] drm: Avoid printing negative values for unsigned variables.
2016-08-03 16:53 [PATCH] drm: Avoid printing negative values for unsigned variables Rodrigo Vivi
@ 2016-08-03 19:04 ` Ville Syrjälä
2016-08-04 8:12 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Ville Syrjälä @ 2016-08-03 19:04 UTC (permalink / raw)
To: Rodrigo Vivi; +Cc: intel-gfx, dri-devel
On Wed, Aug 03, 2016 at 09:53:46AM -0700, Rodrigo Vivi wrote:
> 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>
> ---
> drivers/gpu/drm/drm_irq.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> index 77f357b..01a5079 100644
> --- a/drivers/gpu/drm/drm_irq.c
> +++ b/drivers/gpu/drm/drm_irq.c
> @@ -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);
> @@ -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,
> @@ -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) -
> @@ -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");
> @@ -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);
> --
> 2.5.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm: Avoid printing negative values for unsigned variables.
2016-08-03 19:04 ` [Intel-gfx] " Ville Syrjälä
@ 2016-08-04 8:12 ` Daniel Vetter
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2016-08-04 8:12 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx, dri-devel, Rodrigo Vivi
On Wed, Aug 03, 2016 at 10:04:36PM +0300, Ville Syrjälä wrote:
> On Wed, Aug 03, 2016 at 09:53:46AM -0700, Rodrigo Vivi wrote:
> > 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>
Put into my -misc queue, will push out once -rc1 hits.
-Daniel
>
> > ---
> > drivers/gpu/drm/drm_irq.c | 10 +++++-----
> > 1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> > index 77f357b..01a5079 100644
> > --- a/drivers/gpu/drm/drm_irq.c
> > +++ b/drivers/gpu/drm/drm_irq.c
> > @@ -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);
> > @@ -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,
> > @@ -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) -
> > @@ -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");
> > @@ -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);
> > --
> > 2.5.5
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Ville Syrjälä
> Intel OTC
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-04 8:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-03 16:53 [PATCH] drm: Avoid printing negative values for unsigned variables Rodrigo Vivi
2016-08-03 19:04 ` [Intel-gfx] " Ville Syrjälä
2016-08-04 8:12 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox