drm/i915: Generalise common GPU engine reset request/unrequest code
Subsystems (2)
PATCH 1/1 drm/i915: Generalise common GPU engine reset request/unrequest code
From: Tomas Elf <[email protected]>
GPU engine reset handshaking is something that is applicable to both full GPU reset and engine reset, which is something that is part of the upcoming TDR per-engine hang recovery patches. Break out the common engine reset request/unrequest code (originally written by Mika Kuoppala) for reuse later in the TDR enablement patch series.
v2: correct indentation and drop unused returned value (Mika)
v3: We have forcewake during reset so use *_FW reg access (Mika)
--- drivers/gpu/drm/i915/intel_uncore.c | 48 ++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/intel_uncore.c +32 -16
@@ -1531,13 +1531,40 @@ static int gen6_do_reset(struct drm_device *dev)return ret; } -static int wait_for_register (struct drm_i915_private *dev_priv, +static int wait_for_register_fw (struct drm_i915_private *dev_priv,i915_reg_t reg,const u32 mask,const u32 value,const unsigned long timeout_ms) { -return wait_for ((I915_READ (reg) & mask) == value, timeout_ms); +return wait_for ((I915_READ_FW (reg) & mask) == value, timeout_ms); +} + +static int gen8_request_engine_reset (struct intel_engine_cs *engine) +{ +int ret; +struct drm_i915_private *dev_priv = engine->dev->dev_private; + +I915_WRITE_FW (RING_RESET_CTL (engine->mmio_base), +_MASKED_BIT_ENABLE (RESET_CTL_REQUEST_RESET )); + + ret =wait_for_register_fw (dev_priv, +RING_RESET_CTL (engine->mmio_base), +RESET_CTL_READY_TO_RESET , +RESET_CTL_READY_TO_RESET , +700 ); +if (ret) +DRM_ERROR ("%s: reset request timeout\n" , engine->name); + +return ret; +} + +static void gen8_unrequest_engine_reset (struct intel_engine_cs *engine) +{ +struct drm_i915_private *dev_priv = engine->dev->dev_private; + +I915_WRITE_FW (RING_RESET_CTL (engine->mmio_base), +_MASKED_BIT_DISABLE (RESET_CTL_REQUEST_RESET )); }static int gen8_do_reset (struct drm_device *dev)
@@ -1546,26 +1573,15 @@ static int gen8_do_reset(struct drm_device *dev)struct intel_engine_cs *engine;int i; -for_each_ring (engine, dev_priv, i) { -I915_WRITE (RING_RESET_CTL (engine->mmio_base), -_MASKED_BIT_ENABLE (RESET_CTL_REQUEST_RESET )); - -if (wait_for_register (dev_priv, -RING_RESET_CTL (engine->mmio_base), -RESET_CTL_READY_TO_RESET , -RESET_CTL_READY_TO_RESET , -700 )) { -DRM_ERROR ("%s: reset request timeout\n" , engine->name); +for_each_ring (engine, dev_priv, i) +if (gen8_request_engine_reset (engine)) goto not_ready; - } - }return gen6_do_reset (dev); not_ready:for_each_ring (engine, dev_priv, i) -I915_WRITE (RING_RESET_CTL (engine->mmio_base), -_MASKED_BIT_DISABLE (RESET_CTL_REQUEST_RESET )); +gen8_unrequest_engine_reset (engine);return -EIO ; }
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for drm/i915: Generalise common GPU engine reset request/unrequest code
== Series Details ==
== Series Details ==
Series: drm/i915: Generalise common GPU engine reset request/unrequest code
URL : https://patchwork.freedesktop.org/series/4021/
State : warning
== Summary ==
Series 4021v1 drm/i915: Generalise common GPU engine reset request/unrequest code
http://patchwork.freedesktop.org/api/1.0/series/4021/revisions/1/mbox/
Test kms_flip:
Subgroup basic-flip-vs-modeset:
pass -> DMESG-WARN (ilk-hp8440p) UNSTABLE
Subgroup basic-plain-flip:
pass -> DMESG-WARN (hsw-brixbox)
Test kms_pipe_crc_basic:
Subgroup nonblocking-crc-pipe-b-frame-sequence:
dmesg-warn -> PASS (hsw-brixbox)
Subgroup suspend-read-crc-pipe-a:
incomplete -> PASS (hsw-gt2)
Subgroup suspend-read-crc-pipe-c:
dmesg-warn -> PASS (bsw-nuc-2)
Test pm_rpm:
Subgroup basic-rte:
pass -> DMESG-WARN (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:144 dwarn:0 dfail:0 fail:0 skip:25 hsw-brixbox total:169 pass:153 dwarn:1 dfail:0 fail:0 skip:15 hsw-gt2 total:169 pass:159 dwarn:0 dfail:0 fail:0 skip:10 ilk-hp8440p total:169 pass:118 dwarn:1 dfail:0 fail:0 skip:50 ivb-t430s total:169 pass:153 dwarn:0 dfail:0 fail:0 skip:16 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:2 dfail:0 fail:0 skip:23 snb-x220t total:169 pass:145 dwarn:1 dfail:0 fail:1 skip:22
Results at /archive/results/CI_IGT_test/Patchwork_1516/
db506392f6706faffdc965c53c4cdea58cc16a02 drm-intel-nightly: 2016y-03m-02d-13h-47m-11s UTC integration manifest f7757b31906cfe9dbe0dea7ef96d8269ec57ceb4 drm/i915: Generalise common GPU engine reset request/unrequest code
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ Fi.CI.BAT: warning for drm/i915: Generalise common GPU engine reset request/unrequest code
Quoted 6 lines · Patchwork
== Series Details ==
Series: drm/i915: Generalise common GPU engine reset request/unrequest code
URL : https://patchwork.freedesktop.org/series/4021/
State : warning
Quoted 8 lines
== Summary ==
Series 4021v1 drm/i915: Generalise common GPU engine reset request/unrequest code
http://patchwork.freedesktop.org/api/1.0/series/4021/revisions/1/mbox/Test
kms_flip:Subgroup basic-flip-vs-modeset: pass -> DMESG-WARN (ilk-hp8440p) UNSTABLE
known issue, https://bugs.freedesktop.org/show_bug.cgi?id=93787
Quoted 2 lines
Subgroup basic-plain-flip:
pass -> DMESG-WARN (hsw-brixbox)Unclaimed register detected before writing to register 0x45110, previous runs are ok, should I create a bug?
Quoted 10 lines
Test
kms_pipe_crc_basic:Subgroup nonblocking-crc-pipe-b-frame-sequence: dmesg-warn -> PASS (hsw-brixbox) Subgroup suspend-read-crc-pipe-a: incomplete -> PASS (hsw-gt2) Subgroup suspend-read-crc-pipe-c: dmesg-warn -> PASS (bsw-nuc-2) Test pm_rpm: Subgroup basic-rte: pass -> DMESG-WARN (snb-dellxps)
unrelated and known issue,
https://bugs.freedesktop.org/show_bug.cgi?id=94349
regards
Arun
Quoted 16 lines
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:144 dwarn:0 dfail:0 fail:0 skip:25 hsw-brixbox total:169 pass:153 dwarn:1 dfail:0 fail:0 skip:15 hsw-gt2 total:169 pass:159 dwarn:0 dfail:0 fail:0 skip:10 ilk-hp8440p total:169 pass:118 dwarn:1 dfail:0 fail:0 skip:50 ivb-t430s total:169 pass:153 dwarn:0 dfail:0 fail:0 skip:16 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:2 dfail:0 fail:0 skip:23 snb-x220t total:169 pass:145 dwarn:1 dfail:0 fail:1 skip:22Results at /archive/results/CI_IGT_test/Patchwork_1516/
Quoted 8 lines
db506392f6706faffdc965c53c4cdea58cc16a02drm-intel-nightly: 2016y-03m-02d-13h-47m-11s UTC integration manifestf7757b31906cfe9dbe0dea7ef96d8269ec57ceb4drm/i915: Generalise common GPU engine reset request/unrequest code_______________________________________________
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
Re: ✗ Fi.CI.BAT: warning for drm/i915: Generalise common GPU engine reset request/unrequest code
Quoted 15 lines · Arun Siluvery
Quoted 6 lines · Patchwork
== Series Details ==
Series: drm/i915: Generalise common GPU engine reset request/unrequest code
URL : https://patchwork.freedesktop.org/series/4021/
State : warningQuoted 8 lines
== Summary ==
Series 4021v1 drm/i915: Generalise common GPU engine reset request/unrequest code
http://patchwork.freedesktop.org/api/1.0/series/4021/revisions/1/mbox/Test
kms_flip:Subgroup basic-flip-vs-modeset: pass -> DMESG-WARN (ilk-hp8440p) UNSTABLE
Quoted 7 lines
known issue, https://bugs.freedesktop.org/show_bug.cgi?id=93787
Quoted 2 lines
Subgroup basic-plain-flip: pass -> DMESG-WARN (hsw-brixbox)Unclaimed register detected before writing to register
0x45110, previous runs are ok, should I create a bug?
https://bugs.freedesktop.org/show_bug.cgi?id=94384
Quoted 10 lines
Quoted 10 lines
Test
kms_pipe_crc_basic:Subgroup nonblocking-crc-pipe-b-frame-sequence: dmesg-warn -> PASS (hsw-brixbox) Subgroup suspend-read-crc-pipe-a: incomplete -> PASS (hsw-gt2) Subgroup suspend-read-crc-pipe-c: dmesg-warn -> PASS (bsw-nuc-2) Test pm_rpm: Subgroup basic-rte: pass -> DMESG-WARN (snb-dellxps)
Quoted 30 lines
unrelated and known issue,
https://bugs.freedesktop.org/show_bug.cgi?id=94349regards
ArunQuoted 24 lines
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:144 dwarn:0 dfail:0 fail:0 skip:25 hsw-brixbox total:169 pass:153 dwarn:1 dfail:0 fail:0 skip:15 hsw-gt2 total:169 pass:159 dwarn:0 dfail:0 fail:0 skip:10 ilk-hp8440p total:169 pass:118 dwarn:1 dfail:0 fail:0 skip:50 ivb-t430s total:169 pass:153 dwarn:0 dfail:0 fail:0 skip:16 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:2 dfail:0 fail:0 skip:23 snb-x220t total:169 pass:145 dwarn:1 dfail:0 fail:1 skip:22Results at /archive/results/CI_IGT_test/Patchwork_1516/
db506392f6706faffdc965c53c4cdea58cc16a02drm-intel-nightly: 2016y-03m-02d-13h-47m-11s UTC integration manifestf7757b31906cfe9dbe0dea7ef96d8269ec57ceb4drm/i915: Generalise common GPU engine reset request/unrequest code_______________________________________________
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