summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-06-20 21:07:46 -0700
committerKeith Packard <keithp@keithp.com>2008-06-20 21:07:46 -0700
commit71b1623e22c54d42837840a1d0479127a5049caf (patch)
tree91a24cd98b690db1a03b7fa27698de505bb76051 /shared-core
parent2bd9799e4cf0d778e46453422157143e36274062 (diff)
[intel-gem] Add intel-specific /proc entries to help monitor gem operation
This adds gem_active, gem_flushing, gem_inactive, gem_request and gem_seqno entries to monitor gem operation and help debug issues.
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/i915_drv.h13
-rw-r--r--shared-core/i915_irq.c1
2 files changed, 14 insertions, 0 deletions
diff --git a/shared-core/i915_drv.h b/shared-core/i915_drv.h
index 94e80cda..87776504 100644
--- a/shared-core/i915_drv.h
+++ b/shared-core/i915_drv.h
@@ -290,6 +290,16 @@ typedef struct drm_i915_private {
uint32_t next_gem_seqno;
/**
+ * Waiting sequence number, if any
+ */
+ uint32_t waiting_gem_seqno;
+
+ /**
+ * Last seq seen at irq time
+ */
+ uint32_t irq_gem_seqno;
+
+ /**
* Flag if the X Server, and thus DRM, is not currently in
* control of the device.
*
@@ -499,11 +509,14 @@ int i915_gem_entervt_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
int i915_gem_leavevt_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
+int i915_gem_proc_init(struct drm_minor *minor);
+void i915_gem_proc_cleanup(struct drm_minor *minor);
int i915_gem_init_object(struct drm_gem_object *obj);
void i915_gem_free_object(struct drm_gem_object *obj);
int i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment);
void i915_gem_object_unpin(struct drm_gem_object *obj);
void i915_gem_lastclose(struct drm_device *dev);
+uint32_t i915_get_gem_seqno(struct drm_device *dev);
void i915_gem_retire_requests(struct drm_device *dev);
void i915_gem_retire_work_handler(struct work_struct *work);
#endif
diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c
index 9ba5b00a..767181c2 100644
--- a/shared-core/i915_irq.c
+++ b/shared-core/i915_irq.c
@@ -489,6 +489,7 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
dev_priv->sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv);
if (iir & I915_USER_INTERRUPT) {
+ dev_priv->mm.irq_gem_seqno = i915_get_gem_seqno(dev);
DRM_WAKEUP(&dev_priv->irq_queue);
#ifdef I915_HAVE_FENCE
i915_fence_handler(dev);