Skip to contentSkip to conversation

drm/i915/error: Capture WA ctx batch in error state

PATCH Applied Arun Siluvery 3 participants 4 messages Mar 1, 2016

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

PATCH 1/1 drm/i915/error: Capture WA ctx batch in error state

From Gen8 onwards we apply ctx workarounds using special batch buffers that execute during context save/restore, good to have them in error state.

v2: use wa_ctx->size and print only size values (Mika)
v3: simplify conditions when recording and freeing object (Chris)
v4: resolve checkpatch errors (Tvrtko)

Cc Tvrtko Ursulin <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Mika Kuoppala <[email protected]>

---

It was previously sent as part of a series, now extracted as only this one got reviewed so far.

Revision history https://patchwork.freedesktop.org/patch/75095/

Need to wait for BAT again.

 drivers/gpu/drm/i915/i915_drv.h       |  2 ++
 drivers/gpu/drm/i915/i915_gpu_error.c | 29 +++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +2 -0
index 1048093..09b85b2 100644
@@ -561,6 +561,8 @@ struct drm_i915_error_state {
 			u32 *pages[0];
 		} *ringbuffer, *batchbuffer, *wa_batchbuffer, *ctx, *hws_page;
 
+		struct drm_i915_error_object *wa_ctx;
+
 		struct drm_i915_error_request {
 			long jiffies;
 			u32 seqno;
drivers/gpu/drm/i915/i915_gpu_error.c +29 -0
index 831895b..3b6bfbf 100644
@@ -493,6 +493,28 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
 			}
 		}
 
+		obj = error->ring[i].wa_ctx;
+		if (obj) {
+			u64 wa_ctx_offset = obj->gtt_offset;
+			u32 *wa_ctx_page = &obj->pages[0][0];
+			struct intel_engine_cs *ring = &dev_priv->ring[RCS];
+			u32 wa_ctx_size = (ring->wa_ctx.indirect_ctx.size +
+					   ring->wa_ctx.per_ctx.size);
+
+			err_printf(m, "%s --- WA ctx batch buffer = 0x%08llx\n",
+				   dev_priv->ring[i].name, wa_ctx_offset);
+			offset = 0;
+			for (elt = 0; elt < wa_ctx_size; elt += 4) {
+				err_printf(m, "[%04x] %08x %08x %08x %08x\n",
+					   offset,
+					   wa_ctx_page[elt + 0],
+					   wa_ctx_page[elt + 1],
+					   wa_ctx_page[elt + 2],
+					   wa_ctx_page[elt + 3]);
+				offset += 16;
+			}
+		}
+
 		if ((obj = error->ring[i].ctx)) {
 			err_printf(m, "%s --- HW Context = 0x%08x\n",
 				   dev_priv->ring[i].name,
@@ -585,6 +607,7 @@ static void i915_error_state_free(struct kref *error_ref)
 		i915_error_object_free(error->ring[i].hws_page);
 		i915_error_object_free(error->ring[i].ctx);
 		kfree(error->ring[i].requests);
+		i915_error_object_free(error->ring[i].wa_ctx);
 	}
 
 	i915_error_object_free(error->semaphore_obj);
@@ -1067,6 +1090,12 @@ static void i915_gem_record_rings(struct drm_device *dev,
 		error->ring[i].hws_page =
 			i915_error_ggtt_object_create(dev_priv, ring->status_page.obj);
 
+		if (ring->wa_ctx.obj) {
+			error->ring[i].wa_ctx =
+				i915_error_ggtt_object_create(dev_priv,
+							      ring->wa_ctx.obj);
+		}
+
 		i915_gem_record_active_context(ring, error, &error->ring[i]);
 
 		count = 0;
Signature · 6 lines
1.9.1

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

✗ Fi.CI.BAT: warning for drm/i915/error: Capture WA ctx batch in error state

== Series Details ==

== Series Details ==

Series: drm/i915/error: Capture WA ctx batch in error state
URL : https://patchwork.freedesktop.org/series/3968/
State : warning

== Summary ==

Series 3968v1 drm/i915/error: Capture WA ctx batch in error state
http://patchwork.freedesktop.org/api/1.0/series/3968/revisions/1/mbox/

Test kms_flip:

        Subgroup basic-flip-vs-dpms:
                dmesg-warn -> PASS       (hsw-brixbox)
                pass       -> DMESG-WARN (ilk-hp8440p) UNSTABLE
        Subgroup basic-flip-vs-wf_vblank:
                fail       -> PASS       (snb-x220t)
Test kms_force_connector_basic:
        Subgroup force-connector-state:
                pass       -> SKIP       (snb-x220t)
        Subgroup prune-stale-modes:
                pass       -> SKIP       (ilk-hp8440p)
Test kms_pipe_crc_basic:
        Subgroup nonblocking-crc-pipe-a:
                pass       -> DMESG-WARN (snb-x220t)
        Subgroup suspend-read-crc-pipe-a:
                incomplete -> PASS       (hsw-gt2)
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                pass       -> DMESG-WARN (snb-dellxps)
                pass       -> DMESG-WARN (byt-nuc)
        Subgroup basic-rte:
                dmesg-warn -> PASS       (snb-dellxps)
bdw-nuci7        total:169  pass:158  dwarn:0   dfail:0   fail:0   skip:11 
bdw-ultra        total:169  pass:155  dwarn:0   dfail:0   fail:0   skip:14 
bsw-nuc-2        total:169  pass:138  dwarn:0   dfail:0   fail:1   skip:30 
byt-nuc          total:169  pass:143  dwarn:1   dfail:0   fail:0   skip:25 
hsw-brixbox      total:169  pass:154  dwarn:0   dfail:0   fail:0   skip:15 
hsw-gt2          total:169  pass:158  dwarn:0   dfail:0   fail:1   skip:10 
ilk-hp8440p      total:169  pass:116  dwarn:1   dfail:0   fail:1   skip:51 
ivb-t430s        total:169  pass:153  dwarn:0   dfail:0   fail:1   skip:15 
skl-i5k-2        total:169  pass:153  dwarn:0   dfail:0   fail:0   skip:16 
skl-i7k-2        total:169  pass:153  dwarn:0   dfail:0   fail:0   skip:16 
snb-dellxps      total:169  pass:144  dwarn:1   dfail:0   fail:1   skip:23 
snb-x220t        total:169  pass:142  dwarn:2   dfail:0   fail:2   skip:23 

Results at /archive/results/CI_IGT_test/Patchwork_1502/

deb861ea08c6d5bbf682fb40ea1f0471a448aafd drm-intel-nightly: 2016y-03m-01d-11h-12m-16s UTC integration manifest ddf7e6bcb4cea48fd93d8ff7246ce573c8872241 drm/i915/error: Capture WA ctx batch in error state

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

#2 lore raw

Re: ✗ Fi.CI.BAT: warning for drm/i915/error: Capture WA ctx batch in error state

Quoted 8 lines · Patchwork

== Series Details ==

Series: drm/i915/error: Capture WA ctx batch in error state
URL : https://patchwork.freedesktop.org/series/3968/
State : warning

== Summary ==

Quoted 7 lines

Series 3968v1 drm/i915/error: Capture WA ctx batch in error state
http://patchwork.freedesktop.org/api/1.0/series/3968/revisions/1/mbox/

Test kms_flip:

         Subgroup basic-flip-vs-dpms:
                 dmesg-warn -> PASS       (hsw-brixbox)
                 pass       -> DMESG-WARN (ilk-hp8440p) UNSTABLE

known issue, https://bugs.freedesktop.org/show_bug.cgi?id=93787

Quoted 10 lines
         Subgroup basic-flip-vs-wf_vblank:
                 fail       -> PASS       (snb-x220t)
Test kms_force_connector_basic:
         Subgroup force-connector-state:
                 pass       -> SKIP       (snb-x220t)
         Subgroup prune-stale-modes:
                 pass       -> SKIP       (ilk-hp8440p)
Test kms_pipe_crc_basic:
         Subgroup nonblocking-crc-pipe-a:
                 pass       -> DMESG-WARN (snb-x220t)

unrelated, created below entry,
https://bugs.freedesktop.org/show_bug.cgi?id=94349

Quoted 6 lines
         Subgroup suspend-read-crc-pipe-a:
                 incomplete -> PASS       (hsw-gt2)
Test pm_rpm:
         Subgroup basic-pci-d3-state:
                 pass       -> DMESG-WARN (snb-dellxps)
                 pass       -> DMESG-WARN (byt-nuc)

unrelated, random failures in both cases on previous runs. WA batch buffers are only applicable from Gen8.

regards
Arun

Quoted 16 lines
         Subgroup basic-rte:
                 dmesg-warn -> PASS       (snb-dellxps)
bdw-nuci7        total:169  pass:158  dwarn:0   dfail:0   fail:0   skip:11
bdw-ultra        total:169  pass:155  dwarn:0   dfail:0   fail:0   skip:14
bsw-nuc-2        total:169  pass:138  dwarn:0   dfail:0   fail:1   skip:30
byt-nuc          total:169  pass:143  dwarn:1   dfail:0   fail:0   skip:25
hsw-brixbox      total:169  pass:154  dwarn:0   dfail:0   fail:0   skip:15
hsw-gt2          total:169  pass:158  dwarn:0   dfail:0   fail:1   skip:10
ilk-hp8440p      total:169  pass:116  dwarn:1   dfail:0   fail:1   skip:51
ivb-t430s        total:169  pass:153  dwarn:0   dfail:0   fail:1   skip:15
skl-i5k-2        total:169  pass:153  dwarn:0   dfail:0   fail:0   skip:16
skl-i7k-2        total:169  pass:153  dwarn:0   dfail:0   fail:0   skip:16
snb-dellxps      total:169  pass:144  dwarn:1   dfail:0   fail:1   skip:23
snb-x220t        total:169  pass:142  dwarn:2   dfail:0   fail:2   skip:23
Quoted 6 lines

Results at /archive/results/CI_IGT_test/Patchwork_1502/

deb861ea08c6d5bbf682fb40ea1f0471a448aafd drm-intel-nightly: 2016y-03m-01d-11h-12m-16s UTC integration manifest ddf7e6bcb4cea48fd93d8ff7246ce573c8872241 drm/i915/error: Capture WA ctx batch in error state

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

#3 lore raw

Re: ✗ Fi.CI.BAT: warning for drm/i915/error: Capture WA ctx batch in error state

Quoted 31 lines · Arun Siluvery
Quoted 8 lines · Patchwork

== Series Details ==

Series: drm/i915/error: Capture WA ctx batch in error state
URL : https://patchwork.freedesktop.org/series/3968/
State : warning

== Summary ==

Quoted 7 lines

Series 3968v1 drm/i915/error: Capture WA ctx batch in error state
http://patchwork.freedesktop.org/api/1.0/series/3968/revisions/1/mbox/

Test kms_flip:

         Subgroup basic-flip-vs-dpms:
                 dmesg-warn -> PASS       (hsw-brixbox)
                 pass       -> DMESG-WARN (ilk-hp8440p) UNSTABLE

known issue, https://bugs.freedesktop.org/show_bug.cgi?id=93787

Quoted 10 lines
         Subgroup basic-flip-vs-wf_vblank:
                 fail       -> PASS       (snb-x220t)
Test kms_force_connector_basic:
         Subgroup force-connector-state:
                 pass       -> SKIP       (snb-x220t)
         Subgroup prune-stale-modes:
                 pass       -> SKIP       (ilk-hp8440p)
Test kms_pipe_crc_basic:
         Subgroup nonblocking-crc-pipe-a:
                 pass       -> DMESG-WARN (snb-x220t)

unrelated, created below entry,
https://bugs.freedesktop.org/show_bug.cgi?id=94349

Quoted 8 lines
Quoted 6 lines
         Subgroup suspend-read-crc-pipe-a:
                 incomplete -> PASS       (hsw-gt2)
Test pm_rpm:
         Subgroup basic-pci-d3-state:
                 pass       -> DMESG-WARN (snb-dellxps)
                 pass       -> DMESG-WARN (byt-nuc)

unrelated, random failures in both cases on previous runs. WA batch buffers are only applicable from Gen8.

Merged, thanks for the patch and review.

Regards,

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