Skip to contentSkip to conversation

drm/i915/gen9: Set value of Indirect Context Offset based on gen version

PATCH RESEND Applied Michel Thierry 3 participants 4 messages Feb 23, 2016 – Feb 26, 2016 1 message not in the archive

Subsystems (2)

v1 of 3 Applied Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 drm/i915/gen9: Set value of Indirect Context Offset based on gen version

The cache line offset for the Indirect CS context (0x21C8) varies from gen to gen.

v2: Move it into a function (Arun), use MISSING_CASE (Chris)
v3: Rebased (catched by ci bat)

---
 drivers/gpu/drm/i915/intel_lrc.c | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_lrc.c +24 -2
index 2dca5e1..e12fcab 100644
@@ -223,7 +223,8 @@ enum {
 	FAULT_AND_CONTINUE /* Unsupported */
 };
 #define GEN8_CTX_ID_SHIFT 32
-#define CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT  0x17
+#define GEN8_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x17
+#define GEN9_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT	0x26
 
 static int intel_lr_context_pin(struct intel_context *ctx,
 				struct intel_engine_cs *engine);
@@ -2317,6 +2318,27 @@ make_rpcs(struct drm_device *dev)
 	return rpcs;
 }
 
+static u32 intel_lr_indirect_ctx_offset(struct intel_engine_cs *ring)
+{
+	u32 indirect_ctx_offset;
+
+	switch (INTEL_INFO(ring->dev)->gen) {
+	default:
+		MISSING_CASE(INTEL_INFO(ring->dev)->gen);
+		/* fall through */
+	case 9:
+		indirect_ctx_offset =
+			GEN9_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT;
+		break;
+	case 8:
+		indirect_ctx_offset =
+			GEN8_CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT;
+		break;
+	}
+
+	return indirect_ctx_offset;
+}
+
 static int
 populate_lr_context(struct intel_context *ctx, struct drm_i915_gem_object *ctx_obj,
 		    struct intel_engine_cs *ring, struct intel_ringbuffer *ringbuf)
@@ -2389,7 +2411,7 @@ populate_lr_context(struct intel_context *ctx, struct drm_i915_gem_object *ctx_o
 				(wa_ctx->indirect_ctx.size / CACHELINE_DWORDS);
 
 			reg_state[CTX_RCS_INDIRECT_CTX_OFFSET+1] =
-				CTX_RCS_INDIRECT_CTX_OFFSET_DEFAULT << 6;
+				intel_lr_indirect_ctx_offset(ring) << 6;
 
 			reg_state[CTX_BB_PER_CTX_PTR+1] =
 				(ggtt_offset + wa_ctx->per_ctx.offset * sizeof(uint32_t)) |
Signature · 6 lines
2.7.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/gen9: Set value of Indirect Context Offset based on gen version (rev4)

== Series Details ==

== Series Details ==

Series: drm/i915/gen9: Set value of Indirect Context Offset based on gen version (rev4)
URL : https://patchwork.freedesktop.org/series/3629/
State : warning

== Summary ==

Series 3629v4 drm/i915/gen9: Set value of Indirect Context Offset based on gen version
http://patchwork.freedesktop.org/api/1.0/series/3629/revisions/4/mbox/

Test gem_cs_prefetch:

        Subgroup basic-default:
                incomplete -> PASS       (ilk-hp8440p)
Test kms_force_connector_basic:
        Subgroup force-edid:
                skip       -> PASS       (snb-x220t)
        Subgroup force-load-detect:
                dmesg-fail -> FAIL       (snb-x220t)
                dmesg-fail -> FAIL       (snb-dellxps)
                fail       -> DMESG-FAIL (ilk-hp8440p)
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                dmesg-warn -> PASS       (skl-i5k-2) UNSTABLE
                pass       -> DMESG-WARN (ilk-hp8440p)
        Subgroup suspend-read-crc-pipe-c:
                pass       -> DMESG-WARN (skl-i5k-2) UNSTABLE
                pass       -> DMESG-WARN (bsw-nuc-2)
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                pass       -> DMESG-WARN (bsw-nuc-2)
bdw-nuci7        total:165  pass:154  dwarn:0   dfail:0   fail:0   skip:11 
bdw-ultra        total:168  pass:154  dwarn:0   dfail:0   fail:0   skip:14 
bsw-nuc-2        total:168  pass:135  dwarn:2   dfail:0   fail:1   skip:30 
byt-nuc          total:168  pass:142  dwarn:1   dfail:0   fail:0   skip:25 
hsw-gt2          total:168  pass:157  dwarn:0   dfail:1   fail:0   skip:10 
ilk-hp8440p      total:168  pass:117  dwarn:1   dfail:1   fail:0   skip:49 
ivb-t430s        total:168  pass:153  dwarn:0   dfail:0   fail:1   skip:14 
skl-i5k-2        total:168  pass:151  dwarn:1   dfail:0   fail:0   skip:16 
snb-dellxps      total:168  pass:145  dwarn:0   dfail:0   fail:1   skip:22 
snb-x220t        total:168  pass:145  dwarn:0   dfail:0   fail:2   skip:21 

Results at /archive/results/CI_IGT_test/Patchwork_1460/

08fc1b101049694778bff7559e1d05250d2e7072 drm-intel-nightly: 2016y-02m-22d-17h-30m-27s UTC integration manifest 644bbd41dad8857b829a3c627d951873592a7f63 drm/i915/gen9: Set value of Indirect Context Offset based on gen version

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Re: ✗ Fi.CI.BAT: warning for drm/i915/gen9: Set value of Indirect Context Offset based on gen version (rev4)

Quoted 14 lines · Patchwork

== Series Details ==

Series: drm/i915/gen9: Set value of Indirect Context Offset based on gen version (rev4)
URL : https://patchwork.freedesktop.org/series/3629/
State : warning

== Summary ==

Series 3629v4 drm/i915/gen9: Set value of Indirect Context Offset based on gen version
http://patchwork.freedesktop.org/api/1.0/series/3629/revisions/4/mbox/

Test gem_cs_prefetch:

Quoted 9 lines
         Subgroup basic-default:
                 incomplete -> PASS       (ilk-hp8440p)
Test kms_force_connector_basic:
         Subgroup force-edid:
                 skip       -> PASS       (snb-x220t)
         Subgroup force-load-detect:
                 dmesg-fail -> FAIL       (snb-x220t)
                 dmesg-fail -> FAIL       (snb-dellxps)
                 fail       -> DMESG-FAIL (ilk-hp8440p)

Unrelated to this patch, snd and ilk don't have execlists.

Looks like it has been like this for a while: /archive/results/CI_IGT_test/igt@[email protected]

Also, this subtest is quite recent, https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/commit/?id=7670e286f5043d04af0cd1e6df1f092b5bcaf09e

Quoted 4 lines

Test kms_pipe_crc_basic:

         Subgroup suspend-read-crc-pipe-b:
                 dmesg-warn -> PASS       (skl-i5k-2) UNSTABLE
                 pass       -> DMESG-WARN (ilk-hp8440p)

Got this warning in ilk,

[  591.239261] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
Quoted 3 lines
         Subgroup suspend-read-crc-pipe-c:
                 pass       -> DMESG-WARN (skl-i5k-2) UNSTABLE
                 pass       -> DMESG-WARN (bsw-nuc-2)

Same as: https://bugs.freedesktop.org/show_bug.cgi?id=93294 (cpu_hotplug lockdep fail).

Quoted 3 lines

Test pm_rpm:

         Subgroup basic-pci-d3-state:
                 pass       -> DMESG-WARN (bsw-nuc-2)

Already reported in https://bugs.freedesktop.org/show_bug.cgi?id=94163

Quoted 19 lines
bdw-nuci7        total:165  pass:154  dwarn:0   dfail:0   fail:0   skip:11
bdw-ultra        total:168  pass:154  dwarn:0   dfail:0   fail:0   skip:14
bsw-nuc-2        total:168  pass:135  dwarn:2   dfail:0   fail:1   skip:30
byt-nuc          total:168  pass:142  dwarn:1   dfail:0   fail:0   skip:25
hsw-gt2          total:168  pass:157  dwarn:0   dfail:1   fail:0   skip:10
ilk-hp8440p      total:168  pass:117  dwarn:1   dfail:1   fail:0   skip:49
ivb-t430s        total:168  pass:153  dwarn:0   dfail:0   fail:1   skip:14
skl-i5k-2        total:168  pass:151  dwarn:1   dfail:0   fail:0   skip:16
snb-dellxps      total:168  pass:145  dwarn:0   dfail:0   fail:1   skip:22
snb-x220t        total:168  pass:145  dwarn:0   dfail:0   fail:2   skip:21

Results at /archive/results/CI_IGT_test/Patchwork_1460/

08fc1b101049694778bff7559e1d05250d2e7072 drm-intel-nightly:
2016y-02m-22d-17h-30m-27s UTC integration manifest 644bbd41dad8857b829a3c627d951873592a7f63 drm/i915/gen9: Set value of Indirect Context Offset based on gen version

Quoted 6 lines

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

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

#4 lore raw

Re: ✗ Fi.CI.BAT: warning for drm/i915/gen9: Set value of Indirect Context Offset based on gen version (rev4)

Quoted 50 lines · Michel Thierry
Quoted 14 lines · Patchwork

== Series Details ==

Series: drm/i915/gen9: Set value of Indirect Context Offset based on gen version (rev4)
URL : https://patchwork.freedesktop.org/series/3629/
State : warning

== Summary ==

Series 3629v4 drm/i915/gen9: Set value of Indirect Context Offset based on gen version
http://patchwork.freedesktop.org/api/1.0/series/3629/revisions/4/mbox/

Test gem_cs_prefetch:

Quoted 9 lines
         Subgroup basic-default:
                 incomplete -> PASS       (ilk-hp8440p)
Test kms_force_connector_basic:
         Subgroup force-edid:
                 skip       -> PASS       (snb-x220t)
         Subgroup force-load-detect:
                 dmesg-fail -> FAIL       (snb-x220t)
                 dmesg-fail -> FAIL       (snb-dellxps)
                 fail       -> DMESG-FAIL (ilk-hp8440p)

Unrelated to this patch, snd and ilk don't have execlists.

Looks like it has been like this for a while:
/archive/results/CI_IGT_test/igt@[email protected]

Also, this subtest is quite recent,
https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/commit/?id=7670e286f5043d04af0cd1e6df1f092b5bcaf09e

Quoted 4 lines

Test kms_pipe_crc_basic:

         Subgroup suspend-read-crc-pipe-b:
                 dmesg-warn -> PASS       (skl-i5k-2) UNSTABLE
                 pass       -> DMESG-WARN (ilk-hp8440p)

Got this warning in ilk,

[  591.239261] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR*

CPU pipe B FIFO underrun

Quoted 3 lines
         Subgroup suspend-read-crc-pipe-c:
                 pass       -> DMESG-WARN (skl-i5k-2) UNSTABLE
                 pass       -> DMESG-WARN (bsw-nuc-2)
Quoted 37 lines

Same as: https://bugs.freedesktop.org/show_bug.cgi?id=93294 (cpu_hotplug lockdep fail).

Quoted 3 lines

Test pm_rpm:

         Subgroup basic-pci-d3-state:
                 pass       -> DMESG-WARN (bsw-nuc-2)

Already reported in https://bugs.freedesktop.org/show_bug.cgi?id=94163

Quoted 28 lines

bdw-nuci7 total:165 pass:154 dwarn:0 dfail:0 fail:0
skip:11
bdw-ultra total:168 pass:154 dwarn:0 dfail:0 fail:0
skip:14
bsw-nuc-2 total:168 pass:135 dwarn:2 dfail:0 fail:1
skip:30
byt-nuc total:168 pass:142 dwarn:1 dfail:0 fail:0
skip:25
hsw-gt2 total:168 pass:157 dwarn:0 dfail:1 fail:0
skip:10
ilk-hp8440p total:168 pass:117 dwarn:1 dfail:1 fail:0
skip:49
ivb-t430s total:168 pass:153 dwarn:0 dfail:0 fail:1
skip:14
skl-i5k-2 total:168 pass:151 dwarn:1 dfail:0 fail:0
skip:16
snb-dellxps total:168 pass:145 dwarn:0 dfail:0 fail:1
skip:22
snb-x220t total:168 pass:145 dwarn:0 dfail:0 fail:2
skip:21

Results at /archive/results/CI_IGT_test/Patchwork_1460/

08fc1b101049694778bff7559e1d05250d2e7072 drm-intel-nightly:
2016y-02m-22d-17h-30m-27s UTC integration manifest 644bbd41dad8857b829a3c627d951873592a7f63 drm/i915/gen9: Set value of Indirect Context Offset based on gen version

Merged, thanks for the patch! :)

Regards,

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