Skip to contentSkip to conversation

drm/i915: Move hangcheck code out from i915_irq.c

PATCH In review Mika Kuoppala 3 participants 6 messages Nov 1, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/i915: Move hangcheck code out from i915_irq.c

Create new file for hangcheck specific code, intel_engine_hangcheck.c, and move all the related code in it.

No functional changes.

Cc Chris Wilson <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Tvrtko Ursulin <[email protected]>
---
 drivers/gpu/drm/i915/Makefile                 |   1 +
 drivers/gpu/drm/i915/i915_drv.c               |   1 +
 drivers/gpu/drm/i915/i915_drv.h               |   1 +
 drivers/gpu/drm/i915/i915_irq.c               | 417 ------------------------
 drivers/gpu/drm/i915/intel_engine_cs.c        |   5 -
 drivers/gpu/drm/i915/intel_engine_hangcheck.c | 450 ++++++++++++++++++++++++++
 6 files changed, 453 insertions(+), 422 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_engine_hangcheck.c
drivers/gpu/drm/i915/Makefile +1 -0
index 240ce9a..e772664 100644
@@ -47,6 +47,7 @@ i915-y += i915_cmd_parser.o \
 	  i915_trace_points.o \
 	  intel_breadcrumbs.o \
 	  intel_engine_cs.o \
+	  intel_engine_hangcheck.o \
 	  intel_lrc.o \
 	  intel_mocs.o \
 	  intel_ringbuffer.o \
drivers/gpu/drm/i915/i915_drv.c +1 -0
index 48f4d21..9e5a547 100644
@@ -830,6 +830,7 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv,
 	intel_init_dpio(dev_priv);
 	intel_power_domains_init(dev_priv);
 	intel_irq_init(dev_priv);
+	intel_hangcheck_init(dev_priv);
 	intel_init_display_hooks(dev_priv);
 	intel_init_clock_gating_hooks(dev_priv);
 	intel_init_audio_hooks(dev_priv);
drivers/gpu/drm/i915/i915_drv.h +1 -0
index b8e72cd..6c0b0a6 100644
@@ -3002,6 +3002,7 @@ extern bool intel_has_gpu_reset(struct drm_i915_private *dev_priv);
 extern void i915_reset(struct drm_i915_private *dev_priv);
 extern int intel_guc_reset(struct drm_i915_private *dev_priv);
 extern void intel_engine_init_hangcheck(struct intel_engine_cs *engine);
+extern void intel_hangcheck_init(struct drm_i915_private *dev_priv);
 extern unsigned long i915_chipset_val(struct drm_i915_private *dev_priv);
 extern unsigned long i915_mch_val(struct drm_i915_private *dev_priv);
 extern unsigned long i915_gfx_val(struct drm_i915_private *dev_priv);
drivers/gpu/drm/i915/i915_irq.c +0 -417

429 lines not on this page · raw message

drivers/gpu/drm/i915/intel_engine_cs.c +0 -5
index 94de3d6..841f8d1 100644
@@ -220,11 +220,6 @@ void intel_engine_init_global_seqno(struct intel_engine_cs *engine, u32 seqno)
 	intel_engine_wakeup(engine);
 }
 
-void intel_engine_init_hangcheck(struct intel_engine_cs *engine)
-{
-	memset(&engine->hangcheck, 0, sizeof(engine->hangcheck));
-}
-
 static void intel_engine_init_timeline(struct intel_engine_cs *engine)
 {
 	engine->timeline = &engine->i915->gt.global_timeline.engine[engine->id];
drivers/gpu/drm/i915/intel_engine_hangcheck.c new file +450 -0

450 lines not on this page · raw message

Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 2/2 drm/i915: Move error state capture code out from i915_irq.c

We have a place already for error handling and error state capture, i915_gpu_error.c. Move code to more appropriate file.

No functional changes.

Cc Chris Wilson <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Tvrtko Ursulin <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.h       |   4 +-
 drivers/gpu/drm/i915/i915_gpu_error.c | 157 +++++++++++++++++++++++++++++++++-
 drivers/gpu/drm/i915/i915_irq.c       | 151 --------------------------------
 3 files changed, 155 insertions(+), 157 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -3
index 6c0b0a6..88301fa 100644
@@ -3686,9 +3686,7 @@ static inline void i915_error_state_buf_release(
 {
 	kfree(eb->buf);
 }
-void i915_capture_error_state(struct drm_i915_private *dev_priv,
-			      u32 engine_mask,
-			      const char *error_msg);
+
 void i915_error_state_get(struct drm_device *dev,
 			  struct i915_error_state_file_priv *error_priv);
 void i915_error_state_put(struct i915_error_state_file_priv *error_priv);
drivers/gpu/drm/i915/i915_gpu_error.c +154 -3

172 lines not on this page · raw message

drivers/gpu/drm/i915/i915_irq.c +0 -151

163 lines not on this page · raw message

Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

Re: [PATCH 2/2] drm/i915: Move error state capture code out from i915_irq.c

Quoted 3 lines · Mika Kuoppala

We have a place already for error handling and error state capture, i915_gpu_error.c. Move code to more appropriate file.

i915_gpu_error.c is conditionally compiled iff we want error capture. We need reset handling irrespective of error capture. I don't think you want that as your final destination.
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
In reply to Mika Kuoppala
Quoted 24 lines · Mika Kuoppala

Create new file for hangcheck specific code, intel_engine_hangcheck.c, and move all the related code in it.

No functional changes.

Cc Chris Wilson <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Tvrtko Ursulin <[email protected]>
---
 drivers/gpu/drm/i915/Makefile                 |   1 +
 drivers/gpu/drm/i915/i915_drv.c               |   1 +
 drivers/gpu/drm/i915/i915_drv.h               |   1 +
 drivers/gpu/drm/i915/i915_irq.c               | 417 ------------------------
 drivers/gpu/drm/i915/intel_engine_cs.c        |   5 -
 drivers/gpu/drm/i915/intel_engine_hangcheck.c | 450 ++++++++++++++++++++++++++
 6 files changed, 453 insertions(+), 422 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_engine_hangcheck.c
drivers/gpu/drm/i915/Makefile +0 -0
index 240ce9a..e772664 100644

drivers/gpu/drm/i915/Makefile i915-y += i915_cmd_parser.o \ · line 50

Quoted 4 lines
drivers/gpu/drm/i915/Makefile +1 -0
@@ -47,6 +47,7 @@ i915-y += i915_cmd_parser.o \
 	  i915_trace_points.o \
 	  intel_breadcrumbs.o \
 	  intel_engine_cs.o \
+	  intel_engine_hangcheck.o \

Hmm. intel_engine_hangcheck. Please do include a signpost as to why this makes more sense than intel_hangcheck.c
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw
Quoted 20 lines · Chris Wilson
Quoted 19 lines · Mika Kuoppala

Create new file for hangcheck specific code, intel_engine_hangcheck.c, and move all the related code in it.

No functional changes.

Cc Chris Wilson <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Tvrtko Ursulin <[email protected]>
---
 drivers/gpu/drm/i915/Makefile                 |   1 +
 drivers/gpu/drm/i915/i915_drv.c               |   1 +
 drivers/gpu/drm/i915/i915_drv.h               |   1 +
 drivers/gpu/drm/i915/i915_irq.c               | 417 ------------------------
 drivers/gpu/drm/i915/intel_engine_cs.c        |   5 -
 drivers/gpu/drm/i915/intel_engine_hangcheck.c | 450 ++++++++++++++++++++++++++
 6 files changed, 453 insertions(+), 422 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_engine_hangcheck.c
Quoted 12 lines

drivers/gpu/drm/i915/Makefile i915-y += i915_cmd_parser.o \ · line 50

Quoted 9 lines
drivers/gpu/drm/i915/Makefile +1 -0
index 240ce9a..e772664 100644
@@ -47,6 +47,7 @@ i915-y += i915_cmd_parser.o \
 	  i915_trace_points.o \
 	  intel_breadcrumbs.o \
 	  intel_engine_cs.o \
+	  intel_engine_hangcheck.o \

Hmm. intel_engine_hangcheck. Please do include a signpost as to why this makes more sense than intel_hangcheck.c

intel_hangcheck.c makes more sense. New version soon. -Mika

Quoted 4 lines

-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Move hangcheck code out from i915_irq.c

In reply to Mika Kuoppala
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/i915: Move hangcheck code out from i915_irq.c
URL : https://patchwork.freedesktop.org/series/14682/
State : warning

== Summary ==

Series 14682v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/14682/revisions/1/mbox/

Test gem_exec_suspend:

        Subgroup basic-s3:
                pass       -> DMESG-WARN (fi-ilk-650)
Test kms_busy:
        Subgroup basic-flip-default-b:
                pass       -> DMESG-WARN (fi-ilk-650)
Test kms_pipe_crc_basic:
        Subgroup bad-nb-words-3:
                dmesg-warn -> PASS       (fi-ilk-650)
        Subgroup bad-source:
                dmesg-warn -> PASS       (fi-ilk-650)
        Subgroup hang-read-crc-pipe-a:
                dmesg-warn -> PASS       (fi-ilk-650)
        Subgroup nonblocking-crc-pipe-a:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup nonblocking-crc-pipe-a-frame-sequence:
                dmesg-warn -> PASS       (fi-ilk-650)
        Subgroup read-crc-pipe-a-frame-sequence:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup suspend-read-crc-pipe-b:
                pass       -> DMESG-WARN (fi-ilk-650)
fi-bdw-5557u     total:241  pass:226  dwarn:0   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:241  pass:201  dwarn:0   dfail:0   fail:0   skip:40 
fi-bxt-t5700     total:241  pass:213  dwarn:0   dfail:0   fail:0   skip:28 
fi-byt-j1900     total:241  pass:213  dwarn:0   dfail:0   fail:0   skip:28 
fi-byt-n2820     total:241  pass:209  dwarn:0   dfail:0   fail:0   skip:32 
fi-hsw-4770      total:241  pass:221  dwarn:0   dfail:0   fail:0   skip:20 
fi-hsw-4770r     total:241  pass:220  dwarn:0   dfail:0   fail:0   skip:21 
fi-ilk-650       total:241  pass:181  dwarn:6   dfail:0   fail:0   skip:54 
fi-ivb-3520m     total:241  pass:218  dwarn:0   dfail:0   fail:0   skip:23 
fi-ivb-3770      total:241  pass:218  dwarn:0   dfail:0   fail:0   skip:23 
fi-kbl-7200u     total:241  pass:219  dwarn:0   dfail:0   fail:0   skip:22 
fi-skl-6260u     total:241  pass:227  dwarn:0   dfail:0   fail:0   skip:14 
fi-skl-6700hq    total:241  pass:220  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6700k     total:241  pass:219  dwarn:1   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:241  pass:227  dwarn:0   dfail:0   fail:0   skip:14 
fi-snb-2520m     total:241  pass:208  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600      total:241  pass:207  dwarn:0   dfail:0   fail:0   skip:34 

c5ad9c11e819eebcad5b9be5aa5e991e89b26965 drm-intel-nightly: 2016y-11m-01d-16h-36m-25s UTC integration manifest bd76e9b drm/i915: Move error state capture code out from i915_irq.c
f722ee3 drm/i915: Move hangcheck code out from i915_irq.c

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_2879/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx