drm: Restore DRM_DEBUG_VBLANK() calls master
authorFrançois Tigeot <ftigeot@wolfpond.org>
Thu, 30 Jun 2016 05:38:34 +0000 (07:38 +0200)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Thu, 30 Jun 2016 05:39:08 +0000 (07:39 +0200)
sys/dev/drm/drm_irq.c

index b9c94b6..18483f6 100644 (file)
@@ -147,11 +147,11 @@ static void drm_update_vblank_count(struct drm_device *dev, unsigned int pipe)
        if (cur_vblank < vblank->last) {
                diff += dev->max_vblank_count + 1;
 
-               DRM_DEBUG("last_vblank[%u]=0x%x, cur_vblank=0x%x => diff=0x%x\n",
+               DRM_DEBUG_VBLANK("last_vblank[%u]=0x%x, cur_vblank=0x%x => diff=0x%x\n",
                          pipe, vblank->last, cur_vblank, diff);
        }
 
-       DRM_DEBUG("updating vblank count on crtc %u, missed %d\n",
+       DRM_DEBUG_VBLANK("updating vblank count on crtc %u, missed %d\n",
                  pipe, diff);
 
        if (diff == 0)
@@ -277,7 +277,7 @@ static void vblank_disable_fn(unsigned long arg)
 
        spin_lock_irqsave(&dev->vbl_lock, irqflags);
        if (atomic_read(&vblank->refcount) == 0 && vblank->enabled) {
-               DRM_DEBUG("disabling vblank on crtc %u\n", pipe);
+               DRM_DEBUG_VBLANK("disabling vblank on crtc %u\n", pipe);
                vblank_disable_and_save(dev, pipe);
        }
        spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
@@ -710,7 +710,7 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
         * Happens during initial modesetting of a crtc.
         */
        if (framedur_ns == 0) {
-               DRM_DEBUG("crtc %u: Noop due to uninitialized mode.\n", pipe);
+               DRM_DEBUG_VBLANK("crtc %u: Noop due to uninitialized mode.\n", pipe);
                return -EAGAIN;
        }
 
@@ -731,7 +731,7 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
 
                /* Return as no-op if scanout query unsupported or failed. */
                if (!(vbl_status & DRM_SCANOUTPOS_VALID)) {
-                       DRM_DEBUG("crtc %u : scanoutpos query failed [%d].\n",
+                       DRM_DEBUG_VBLANK("crtc %u : scanoutpos query failed [%d].\n",
                                  pipe, vbl_status);
                        return -EIO;
                }
@@ -746,7 +746,7 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
 
        /* Noisy system timing? */
        if (i == DRM_TIMESTAMP_MAXRETRIES) {
-               DRM_DEBUG("crtc %u: Noisy timestamp %d us > %d us [%d reps].\n",
+               DRM_DEBUG_VBLANK("crtc %u: Noisy timestamp %d us > %d us [%d reps].\n",
                          pipe, duration_ns/1000, *max_error/1000, i);
        }
 
@@ -780,7 +780,7 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
                etime = ktime_sub_ns(etime, delta_ns);
        *vblank_time = ktime_to_timeval(etime);
 
-       DRM_DEBUG("crtc %u : v %d p(%d,%d)@ %ld.%ld -> %ld.%ld [e %d us, %d rep]\n",
+       DRM_DEBUG_VBLANK("crtc %u : v %d p(%d,%d)@ %ld.%ld -> %ld.%ld [e %d us, %d rep]\n",
                  pipe, (int)vbl_status, hpos, vpos,
                  (long)tv_etime.tv_sec, (long)tv_etime.tv_usec,
                  (long)vblank_time->tv_sec, (long)vblank_time->tv_usec,
@@ -1021,7 +1021,7 @@ static int drm_vblank_enable(struct drm_device *dev, unsigned int pipe)
                 * prevent double-accounting of same vblank interval.
                 */
                ret = dev->driver->enable_vblank(dev, pipe);
-               DRM_DEBUG("enabling vblank on crtc %u, ret: %d\n", pipe, ret);
+               DRM_DEBUG_VBLANK("enabling vblank on crtc %u, ret: %d\n", pipe, ret);
                if (ret)
                        atomic_dec(&vblank->refcount);
                else {
@@ -1237,7 +1237,7 @@ void drm_vblank_off(struct drm_device *dev, unsigned int pipe)
        list_for_each_entry_safe(e, t, &dev->vblank_event_list, base.link) {
                if (e->pipe != pipe)
                        continue;
-               DRM_DEBUG("Sending premature vblank event on disable: \
+               DRM_DEBUG_VBLANK("Sending premature vblank event on disable: \
                          wanted %d, current %d\n",
                          e->event.sequence, seq);
                list_del(&e->base.link);
@@ -1559,7 +1559,7 @@ static int drm_queue_vblank_event(struct drm_device *dev, unsigned int pipe,
                vblwait->reply.sequence = vblwait->request.sequence;
        }
 
-       DRM_DEBUG("event on vblank count %d, current %d, crtc %u\n",
+       DRM_DEBUG_VBLANK("event on vblank count %d, current %d, crtc %u\n",
                  vblwait->request.sequence, seq, pipe);
 
        trace_drm_vblank_event_queued(current->pid, pipe,
@@ -1639,7 +1639,7 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
 
        ret = drm_vblank_get(dev, pipe);
        if (ret) {
-               DRM_DEBUG("failed to acquire vblank counter, %d\n", ret);
+               DRM_DEBUG_VBLANK("failed to acquire vblank counter, %d\n", ret);
                return ret;
        }
        seq = drm_vblank_count(dev, pipe);
@@ -1667,7 +1667,7 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
                vblwait->request.sequence = seq + 1;
        }
 
-       DRM_DEBUG("waiting on vblank count %d, crtc %u\n",
+       DRM_DEBUG_VBLANK("waiting on vblank count %d, crtc %u\n",
                  vblwait->request.sequence, pipe);
        vblank->last_wait = vblwait->request.sequence;
        DRM_WAIT_ON(ret, vblank->queue, 3 * HZ,
@@ -1683,10 +1683,10 @@ 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_VBLANK("returning %d to client\n",
                          vblwait->reply.sequence);
        } else {
-               DRM_DEBUG("vblank wait interrupted by signal\n");
+               DRM_DEBUG_VBLANK("vblank wait interrupted by signal\n");
        }
 
 done:
@@ -1710,7 +1710,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("vblank event on %d, current %d\n",
                          e->event.sequence, seq);
 
                list_del(&e->base.link);
@@ -1784,7 +1784,7 @@ bool drm_handle_vblank(struct drm_device *dev, unsigned int pipe)
        if (abs64(diff_ns) > DRM_REDUNDANT_VBLIRQ_THRESH_NS)
                store_vblank(dev, pipe, 1, &tvblank);
        else
-               DRM_DEBUG("crtc %u: Redundant vblirq ignored. diff_ns = %d\n",
+               DRM_DEBUG_VBLANK("crtc %u: Redundant vblirq ignored. diff_ns = %d\n",
                          pipe, (int) diff_ns);
 
        lockmgr(&dev->vblank_time_lock, LK_RELEASE);