aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2013-06-12 05:35:28 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-06-13 11:42:14 -0400
commite59ec13de40ed1edd19940322ebd009423fd716d (patch)
treea2a1707ea7a5dba1836618d9ff2ed75cd580ba74 /drivers/gpu/drm/i915/i915_drv.h
parente0d8d59b0831523da61739c9d5e3bc3c77d7b5db (diff)
drm/i915: add struct i915_ctx_hang_stats
To count context losses, add struct i915_ctx_hang_stats for both i915_hw_context and drm_i915_file_private. drm_i915_file_private is used when there is no context. v2: renamed and cleaned up the struct (Chris Wilson, Ian Romanick) Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 42ef7cb39e62..124eb1a9e9c3 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -508,6 +508,13 @@ struct i915_hw_ppgtt {
508 void (*cleanup)(struct i915_hw_ppgtt *ppgtt); 508 void (*cleanup)(struct i915_hw_ppgtt *ppgtt);
509}; 509};
510 510
511struct i915_ctx_hang_stats {
512 /* This context had batch pending when hang was declared */
513 unsigned batch_pending;
514
515 /* This context had batch active when hang was declared */
516 unsigned batch_active;
517};
511 518
512/* This must match up with the value previously used for execbuf2.rsvd1. */ 519/* This must match up with the value previously used for execbuf2.rsvd1. */
513#define DEFAULT_CONTEXT_ID 0 520#define DEFAULT_CONTEXT_ID 0
@@ -518,6 +525,7 @@ struct i915_hw_context {
518 struct drm_i915_file_private *file_priv; 525 struct drm_i915_file_private *file_priv;
519 struct intel_ring_buffer *ring; 526 struct intel_ring_buffer *ring;
520 struct drm_i915_gem_object *obj; 527 struct drm_i915_gem_object *obj;
528 struct i915_ctx_hang_stats hang_stats;
521}; 529};
522 530
523enum no_fbc_reason { 531enum no_fbc_reason {
@@ -1377,6 +1385,8 @@ struct drm_i915_file_private {
1377 struct list_head request_list; 1385 struct list_head request_list;
1378 } mm; 1386 } mm;
1379 struct idr context_idr; 1387 struct idr context_idr;
1388
1389 struct i915_ctx_hang_stats hang_stats;
1380}; 1390};
1381 1391
1382#define INTEL_INFO(dev) (((struct drm_i915_private *) (dev)->dev_private)->info) 1392#define INTEL_INFO(dev) (((struct drm_i915_private *) (dev)->dev_private)->info)