[PATCH 22/22] drm/i915: Add debug print for flip queue length
ville.syrjala at linux.intel.com
ville.syrjala at linux.intel.com
Mon Nov 12 09:33:00 PST 2012
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Print some information on how many flips are in the queue waiting for
the GPU. There's no limit on the queue length currently.
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
drivers/gpu/drm/i915/i915_drv.h | 1 +
drivers/gpu/drm/i915/intel_atomic.c | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 87f5cba..5c089b2 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -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;
diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
index d3aa566..d7cc978 100644
--- a/drivers/gpu/drm/i915/intel_atomic.c
+++ b/drivers/gpu/drm/i915/intel_atomic.c
@@ -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);
}
}
--
1.7.8.6
More information about the dri-devel
mailing list