drm/i915/cnl: Avoid WA_SET_BIT_MASK on write-only CNL_HDC_CHICKEN0.
Subsystems (2)
Rodrigo Vivi
maintainerPATCH 1/1 drm/i915/cnl: Avoid WA_SET_BIT_MASK on write-only CNL_HDC_CHICKEN0.
On CNL, HDC_CHICKEN0 "is write-only from LRI command. However, it is readable for context save."
So we have no ways to check the coherency by reading it back on our tests.
So let's just write that bit directly without saving it to dev_priv->workarounds.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102943
--- drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_engine_cs.c +2 -2
@@ -1251,8 +1251,8 @@ static int cnl_init_workarounds(struct intel_engine_cs *engine) GAMT_CHKN_DISABLE_I2M_CYCLE_ON_WR_PORT));/* WaForceContextSaveRestoreNonCoherent:cnl */ -WA_SET_BIT_MASKED (CNL_HDC_CHICKEN0 , -HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT ); +I915_WRITE (CNL_HDC_CHICKEN0 , +_MASKED_BIT_ENABLE (HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT ));/* WaThrottleEUPerfToAvoidTDBackPressure:cnl(pre-prod) */ if (IS_CNL_REVID (dev_priv,CNL_REVID_B0 ,CNL_REVID_B0 ))
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · Rodrigo Vivi
On CNL,
HDC_CHICKEN0"is write-only from LRI command. However, it is readable for context save."So we have no ways to check the coherency by reading it back on our tests.
So let's just write that bit directly without saving it to
dev_priv->workarounds.
Wait, it's not that simple: CNL_HDC_CHICKEN0 lives in the context image, so you are going to revert the value as soon as you restore the next context (you want to save it in dev_priv->workarounds so that intel_ring_workarounds_emit applies it to every newly created context).
Quoted 15 lines
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102943
Fixes acfb5554c769 ("drm/i915/cnl: WaForceContextSaveRestoreNonCoherent")Cc Mika Kuoppala <[email protected]>Cc Oscar Mateo <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_engine_cs.c +0
-0
drivers/gpu/drm/i915/intel_engine_cs.c static int cnl_init_workarounds(struct intel_engine_cs *engine) · line 1258
Quoted 10 lines
drivers/gpu/drm/i915/intel_engine_cs.c +2
-2@@ -1251,8 +1251,8 @@ static int cnl_init_workarounds(struct intel_engine_cs *engine) GAMT_CHKN_DISABLE_I2M_CYCLE_ON_WR_PORT));/* WaForceContextSaveRestoreNonCoherent:cnl */ -WA_SET_BIT_MASKED (CNL_HDC_CHICKEN0 , -HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT ); +I915_WRITE (CNL_HDC_CHICKEN0 , +_MASKED_BIT_ENABLE (HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT ));/* WaThrottleEUPerfToAvoidTDBackPressure:cnl(pre-prod) */ if (IS_CNL_REVID (dev_priv,CNL_REVID_B0 ,CNL_REVID_B0 ))
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerQuoted 9 lines · Oscar Mateo
Quoted 6 lines · Rodrigo Vivi
On CNL,
HDC_CHICKEN0"is write-only from LRI command. However, it is readable for context save."So we have no ways to check the coherency by reading it back on our tests.
Quoted 7 lines
Quoted 2 lines
So let's just write that bit directly without saving it to
dev_priv->workarounds.Wait, it's not that simple:
CNL_HDC_CHICKEN0lives in the context image, so you are going to revert the value as soon as you restore the next context (you want to save it indev_priv->workaroundsso thatintel_ring_workarounds_emitapplies it to every newly created context).
hm... that makes sense...
I was only with the WA description in my head that states to set only once at boot:
" To avoid a potential hang condition with TLB invalidation driver should enable masked bit 5 of MMIO 0xE5F0 at boot."
But apparently just a bad description in spec, right?!
If this is the case probably dev_priv->workarouds will need another component "permission" to handle write-only registers and avoid reading that on debugfs? Or any thing smarter?
Quoted 11 lines
Quoted 11 lines
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102943
Fixes acfb5554c769 ("drm/i915/cnl: WaForceContextSaveRestoreNonCoherent")Cc Mika Kuoppala <[email protected]>Cc Oscar Mateo <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 14 lines
drivers/gpu/drm/i915/intel_engine_cs.c static int cnl_init_workarounds(struct intel_engine_cs *engine) · line 1256
Quoted 13 lines
drivers/gpu/drm/i915/intel_engine_cs.c +2
-2@@ -1251,8 +1251,8 @@ static int cnl_init_workarounds(struct intel_engine_cs *engine) GAMT_CHKN_DISABLE_I2M_CYCLE_ON_WR_PORT));/* WaForceContextSaveRestoreNonCoherent:cnl */ -WA_SET_BIT_MASKED (CNL_HDC_CHICKEN0 , -HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT ); +I915_WRITE (CNL_HDC_CHICKEN0 , +_MASKED_BIT_ENABLE (HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT ));/* WaThrottleEUPerfToAvoidTDBackPressure:cnl(pre-prod) */ if (IS_CNL_REVID (dev_priv,CNL_REVID_B0 ,CNL_REVID_B0 ))
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 19 lines · Rodrigo Vivi
Quoted 8 lines · Oscar Mateo
Quoted 6 lines · Rodrigo Vivi
On CNL,
HDC_CHICKEN0"is write-only from LRI command. However, it is readable for context save."So we have no ways to check the coherency by reading it back on our tests.
Quoted 6 lines
Quoted 2 lines
So let's just write that bit directly without saving it to
dev_priv->workarounds.Wait, it's not that simple:
CNL_HDC_CHICKEN0lives in the context image, so you are going to revert the value as soon as you restore the next context (you want to save it indev_priv->workaroundsso thatintel_ring_workarounds_emitapplies it to every newly created context).hm... that makes sense...
I was only with the WA description in my head that states to set only once at boot:
Quoted 9 lines
" To avoid a potential hang condition with TLB invalidation driver should enable masked bit 5 of MMIO
0xE5F0at boot."But apparently just a bad description in spec, right?!
If this is the case probably
dev_priv->workaroudswill need another component "permission" to handle write-only registers and avoid reading that on debugfs? Or any thing smarter?
Well, to begin with, the current debugfs interface does not make a lot of sense for things that live inside the context image. That's why Chris sent this patch earlier:
"igt/gem_workarounds: Read the workaround registers from the active context"
But this depends on LRI commands and thus makes it impossible to work with this particular register :/
Maybe create a context, force the HW to switch in & out of it and then a debugfs interface to read the WAs from inside the context image? Another possibility: in CNL+, the good old MI_SET_CONTEXT command is back, so maybe it can be used imaginatively to retrieve the context image :)
In any case, this looks like a lot of work only to debug that one WA is applied correctly...
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102943
Fixes acfb5554c769 ("drm/i915/cnl: WaForceContextSaveRestoreNonCoherent")Cc Mika Kuoppala <[email protected]>Cc Oscar Mateo <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/i915/intel_engine_cs.c +0
-0@@ -1251,8 +1251,8 @@ static int cnl_init_workarounds(struct intel_engine_cs *engine)Quoted 8 lines
drivers/gpu/drm/i915/intel_engine_cs.c static int cnl_init_workarounds(struct intel_engine_cs *engine) · line 1258
Quoted 8 lines
drivers/gpu/drm/i915/intel_engine_cs.c +2
-2GAMT_CHKN_DISABLE_I2M_CYCLE_ON_WR_PORT));/* WaForceContextSaveRestoreNonCoherent:cnl */ -WA_SET_BIT_MASKED (CNL_HDC_CHICKEN0 , -HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT ); +I915_WRITE (CNL_HDC_CHICKEN0 , +_MASKED_BIT_ENABLE (HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT ));/* WaThrottleEUPerfToAvoidTDBackPressure:cnl(pre-prod) */ if (IS_CNL_REVID (dev_priv,CNL_REVID_B0 ,CNL_REVID_B0 ))
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/cnl: Avoid WA_SET_BIT_MASK on write-only CNL_HDC_CHICKEN0.
In reply to Rodrigo Vivi== Series Details ==
== Series Details ==
Series: drm/i915/cnl: Avoid WA_SET_BIT_MASK on write-only CNL_HDC_CHICKEN0.
URL : https://patchwork.freedesktop.org/series/31001/
State : success
== Summary ==
Series 31001v1 drm/i915/cnl: Avoid WA_SET_BIT_MASK on write-only CNL_HDC_CHICKEN0.
https://patchwork.freedesktop.org/api/1.0/series/31001/revisions/1/mbox/
Test drv_module_reload:
Subgroup basic-reload:
dmesg-warn -> PASS (fi-glk-1) fdo#102777 +1fdo#102777 https://bugs.freedesktop.org/show_bug.cgi?id=102777
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:441s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:477s fi-blb-e6850 total:289 pass:224 dwarn:1 dfail:0 fail:0 skip:64 time:421s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:514s fi-bwr-2160 total:289 pass:184 dwarn:0 dfail:0 fail:0 skip:105 time:280s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:506s fi-byt-j1900 total:289 pass:254 dwarn:1 dfail:0 fail:0 skip:34 time:492s fi-cfl-s total:289 pass:223 dwarn:34 dfail:0 fail:0 skip:32 time:548s fi-cnl-y total:289 pass:259 dwarn:0 dfail:0 fail:3 skip:27 time:642s fi-elk-e7500 total:289 pass:230 dwarn:0 dfail:0 fail:0 skip:59 time:418s fi-glk-1 total:289 pass:259 dwarn:1 dfail:0 fail:0 skip:29 time:568s fi-hsw-4770 total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:424s fi-hsw-4770r total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:408s fi-ilk-650 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:430s fi-ivb-3520m total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:487s fi-ivb-3770 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:464s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:469s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:579s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:594s fi-pnv-d510 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:541s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:452s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:748s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:487s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:472s fi-snb-2520m total:289 pass:251 dwarn:0 dfail:0 fail:0 skip:38 time:580s fi-snb-2600 total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:420s
7f93222785e4887c083c85b76fcbb391bb1991d9 drm-tip: 2017y-09m-27d-20h-05m-25s UTC integration manifest 3e83dbea9928 drm/i915/cnl: Avoid WA_SET_BIT_MASK on write-only CNL_HDC_CHICKEN0.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5836/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: failure for drm/i915/cnl: Avoid WA_SET_BIT_MASK on write-only CNL_HDC_CHICKEN0.
In reply to Rodrigo Vivi== Series Details ==
== Series Details ==
Series: drm/i915/cnl: Avoid WA_SET_BIT_MASK on write-only CNL_HDC_CHICKEN0.
URL : https://patchwork.freedesktop.org/series/31001/
State : failure
== Summary ==
Test perf:
Subgroup polling:
pass -> FAIL (shard-hsw) fdo#102252
Test prime_busy:
Subgroup before-render:
pass -> FAIL (shard-hsw)
Test kms_flip:
Subgroup flip-vs-modeset-interruptible:
pass -> DMESG-WARN (shard-hsw) fdo#102557fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#102557 https://bugs.freedesktop.org/show_bug.cgi?id=102557
shard-hsw total:2429 pass:1329 dwarn:5 dfail:0 fail:12 skip:1083 time:9949s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5836/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx