diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-25 10:11:24 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-03-05 15:30:24 -0500 |
commit | ab0e7ff9f2d0bfe139a2ed5bb6a36f8cbd4e0886 (patch) | |
tree | 66a0a24af927cffbb34a25d0c0190d1a4507cecc /drivers/gpu/drm/i915/i915_drv.h | |
parent | 8d9fc7fd2de6edc3b9c3f828a701bfa6891987e7 (diff) |
drm/i915: Record pid/comm of hanging task
After finding the guilty batch and request, we can use it to find the
process that submitted the batch and then add the culprit into the error
state.
This is a slightly different approach from Ben's in that instead of
adding the extra information into the struct i915_hw_context, we use the
information already captured in struct drm_file which is then referenced
from the request.
v2: Also capture the workaround buffer for gen2, so that we can compare
its contents against the intended batch for the active request.
v3: Rebase (Mika)
v4: Check for null context (Chris)
checkpatch warnings fixed
Link: http://lists.freedesktop.org/archives/intel-gfx/2013-August/032280.html
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (v2)
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> (v4)
Acked-by: Ben Widawsky <ben@bwidawsk.net>
Cc: 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.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index fe4427be2e03..826fcaef25c1 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -360,7 +360,7 @@ struct drm_i915_error_state { | |||
360 | int page_count; | 360 | int page_count; |
361 | u32 gtt_offset; | 361 | u32 gtt_offset; |
362 | u32 *pages[0]; | 362 | u32 *pages[0]; |
363 | } *ringbuffer, *batchbuffer, *ctx, *hws_page; | 363 | } *ringbuffer, *batchbuffer, *wa_batchbuffer, *ctx, *hws_page; |
364 | 364 | ||
365 | struct drm_i915_error_request { | 365 | struct drm_i915_error_request { |
366 | long jiffies; | 366 | long jiffies; |
@@ -375,6 +375,9 @@ struct drm_i915_error_state { | |||
375 | u32 pp_dir_base; | 375 | u32 pp_dir_base; |
376 | }; | 376 | }; |
377 | } vm_info; | 377 | } vm_info; |
378 | |||
379 | pid_t pid; | ||
380 | char comm[TASK_COMM_LEN]; | ||
378 | } ring[I915_NUM_RINGS]; | 381 | } ring[I915_NUM_RINGS]; |
379 | struct drm_i915_error_buffer { | 382 | struct drm_i915_error_buffer { |
380 | u32 size; | 383 | u32 size; |
@@ -1797,6 +1800,7 @@ struct drm_i915_gem_request { | |||
1797 | 1800 | ||
1798 | struct drm_i915_file_private { | 1801 | struct drm_i915_file_private { |
1799 | struct drm_i915_private *dev_priv; | 1802 | struct drm_i915_private *dev_priv; |
1803 | struct drm_file *file; | ||
1800 | 1804 | ||
1801 | struct { | 1805 | struct { |
1802 | spinlock_t lock; | 1806 | spinlock_t lock; |