@@ -892,6 +892,7 @@ typedef struct drm_i915_private {
struct work_struct work;
struct workqueue_struct *wq;
unsigned int next_flip_seq;
+ unsigned int queue_len;
} flip;
} drm_i915_private_t;
@@ -2106,6 +2106,7 @@ static void intel_atomic_postpone_flip(struct drm_device *dev,
intel_flip->busy = ring != NULL;
list_move_tail(&intel_flip->base.list, &dev_priv->flip.list);
+ dev_priv->flip.queue_len++;
if (!ring)
return;
@@ -2186,6 +2187,7 @@ static void intel_atomic_process_flips_work(struct work_struct *work)
if (intel_flip->flip_seq != flip_seq)
break;
list_move_tail(&intel_flip->base.list, &flips);
+ dev_priv->flip.queue_len--;
}
}
@@ -2197,6 +2199,8 @@ static void intel_atomic_process_flips_work(struct work_struct *work)
mutex_lock(&dev->mode_config.mutex);
intel_atomic_schedule_flips(dev_priv, intel_crtc, &flips);
mutex_unlock(&dev->mode_config.mutex);
+
+ DRM_DEBUG_KMS("flip queue length = %u\n", dev_priv->flip.queue_len);
}
}