From: ville.syrjala@linux.intel.com
To: dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: [PATCH 09/13] drm/i915: Add trace points for flip queue length
Date: Fri, 16 Nov 2012 16:22:21 +0200 [thread overview]
Message-ID: <1353075745-30115-10-git-send-email-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <1353075745-30115-1-git-send-email-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/i915_drv.h | 1 +
drivers/gpu/drm/i915/i915_trace.h | 15 +++++++++++++++
drivers/gpu/drm/i915/intel_atomic.c | 9 ++++++++-
3 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 91e2dc6..3a9a8a0 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -929,6 +929,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/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
index 44f8d40..f71e1b3 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -16,6 +16,21 @@
/* object tracking */
+TRACE_EVENT(i915_flip_queue_len,
+ TP_PROTO(unsigned int queue_len),
+ TP_ARGS(queue_len),
+
+ TP_STRUCT__entry(
+ __field(u32, queue_len)
+ ),
+
+ TP_fast_assign(
+ __entry->queue_len = queue_len;
+ ),
+
+ TP_printk("queue_len=%u", __entry->queue_len)
+);
+
TRACE_EVENT(i915_gem_object_pin_count,
TP_PROTO(struct drm_i915_gem_object *obj, u32 pin_count_pre, u32 pin_count_post),
TP_ARGS(obj, pin_count_pre, pin_count_post),
diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
index 6bec72b..f2e6d88 100644
--- a/drivers/gpu/drm/i915/intel_atomic.c
+++ b/drivers/gpu/drm/i915/intel_atomic.c
@@ -2195,9 +2195,12 @@ 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--;
}
}
+ trace_i915_flip_queue_len(dev_priv->flip.queue_len);
+
spin_unlock_irqrestore(&dev_priv->flip.lock, flags);
if (list_empty(&flips))
@@ -2441,8 +2444,12 @@ static void atomic_pipe_commit(struct drm_device *dev,
spin_lock_irqsave(&dev_priv->flip.lock, flags);
- list_for_each_entry_safe(intel_flip, next, &flips, base.list)
+ list_for_each_entry_safe(intel_flip, next, &flips, base.list) {
list_move_tail(&intel_flip->base.list, &dev_priv->flip.list);
+ dev_priv->flip.queue_len++;
+ }
+
+ trace_i915_flip_queue_len(dev_priv->flip.queue_len);
/* if no rings are involved, we can avoid checking seqnos */
if (rings_mask == 0)
--
1.7.8.6
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2012-11-16 14:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-16 14:22 [PATCH 00/13] drm/i915: Non-blocking GPU synchronization for atomic page flips (v2) ville.syrjala
2012-11-16 14:22 ` [PATCH 01/13] drm/i915: Unstatic i915_gem_check_olr() ville.syrjala
2012-11-16 14:22 ` [PATCH 02/13] drm/i915: Refactor atomic flip code ville.syrjala
2012-11-16 14:22 ` [PATCH 03/13] drm/i915: Implement a non-blocking GPU synchronization mechanism for atomic page flips ville.syrjala
2012-11-16 14:22 ` [PATCH 04/13] drm/i915: Release all atomic flips when GPU hangs ville.syrjala
2012-11-16 14:22 ` [PATCH 05/13] drm/i915: Make a copy of the calculated plane regs ville.syrjala
2012-11-16 14:22 ` [PATCH 06/13] drm/i915: Clear pending flips in haswell_crtc_disable() ville.syrjala
2012-11-16 14:22 ` [PATCH 07/13] drm/i915: Drop all flips waiting for the GPU when the CRTC is about to be disabled ville.syrjala
2012-11-16 14:22 ` [PATCH 08/13] drm/i915: Add pin count trace point ville.syrjala
2012-11-16 14:22 ` ville.syrjala [this message]
2012-11-16 14:22 ` [PATCH 10/13] HACK: drm/i915: Make non-blocking GPU synchronization optional ville.syrjala
2012-11-16 14:22 ` [PATCH 11/13] drm/i915: Add some timing debugs to atomic flips ville.syrjala
2012-11-16 14:22 ` [PATCH 12/13] drm/i915: Add post flush DSL readout for surflive debug ville.syrjala
2012-11-16 14:22 ` [PATCH 13/13] drm/i915: Add trace point for atomic flip vblank evade ville.syrjala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1353075745-30115-10-git-send-email-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox