drm/i915/gen12: Add recommended hardware tuning value
Subsystems (2)
PATCH 1/4 drm/i915/gen12: Add recommended hardware tuning value
From: Caz Yokoyama <[email protected]>
Follow Bspec 31870 to set recommended tuning values for certain GT register. These values aren't workarounds per-se, but it's best to handle them in the same general area of the driver, especially since there may be real workarounds that update other bits of the same registers.
At the moment the only value we need to worry about is the TDS_TIMER setting in FF_MODE2. This setting was previously described as "Wa_1604555607" on some platforms, but the spec tells us that we should continue to program this on all current gen12 platforms, even those that do not have that WA.
Bspec: 31870
--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 48 ++++++++++++++++----- 1 file changed, 37 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/gt/intel_workarounds.c +37 -11
@@ -646,9 +646,38 @@ static void icl_ctx_workarounds_init(struct intel_engine_cs *engine,wa_masked_en (wal,GEN9_ROW_CHICKEN4 ,GEN11_DIS_PICK_2ND_EU ); } +/* +* These settings aren't actually workarounds, but general tuning settings that +* need to be programmed on several platforms. +*/ +static void gen12_ctx_gt_tuning_init (struct intel_engine_cs *engine, +struct i915_wa_list *wal) +{ +/* +* Although some platforms refer to it as Wa_1604555607, we need to +* program it even on those that don't explicitly list that +* workaround. +* +* Note that the implementation of this workaround is further modified +* according to the FF_MODE2 guidance given by Wa_1608008084:gen12. +* +* FF_MODE2 register will return the wrong value when read. The default +* value for this register is zero for all fields and there are no bit +* masks. So instead of doing a RMW we should just write TDS timer +* value. For the same reason read verification is ignored. +*/ +wa_add (wal, +FF_MODE2 , +FF_MODE2_TDS_TIMER_MASK , +FF_MODE2_TDS_TIMER_128 , +0 ); +} +static void gen12_ctx_workarounds_init (struct intel_engine_cs *engine,struct i915_wa_list *wal) { +gen12_ctx_gt_tuning_init (engine, wal); +/* * Wa_1409142259:tgl * Wa_1409347922:tgl
@@ -675,19 +704,15 @@ static void tgl_ctx_workarounds_init(struct intel_engine_cs *engine,gen12_ctx_workarounds_init (engine, wal);/* -* Wa_1604555607:tgl,rkl +* Wa_16011163337 * -* Note that the implementation of this workaround is further modified -* according to the FF_MODE2 guidance given by Wa_1608008084:gen12. -* FF_MODE2 register will return the wrong value when read. The default -* value for this register is zero for all fields and there are no bit -* masks. So instead of doing a RMW we should just write the GS Timer -* and TDS timer values for Wa_1604555607 and Wa_16011163337. +* Like in gen12_ctx_gt_tuning_init(), read verification is ignored due +* to Wa_1608008084. */ wa_add (wal,FF_MODE2 , -FF_MODE2_GS_TIMER_MASK |FF_MODE2_TDS_TIMER_MASK , -FF_MODE2_GS_TIMER_224 |FF_MODE2_TDS_TIMER_128 , +FF_MODE2_GS_TIMER_MASK , +FF_MODE2_GS_TIMER_224 ,0 ); }
@@ -707,12 +732,13 @@ static void dg1_ctx_workarounds_init(struct intel_engine_cs *engine,/* * Wa_16011163337 * -* Like in tgl_ctx_workarounds_init(), read verification is ignored due +* Like in gen12_ctx_gt_tuning_init(), read verification is ignored due * to Wa_1608008084. */ wa_add (wal,FF_MODE2 , -FF_MODE2_GS_TIMER_MASK ,FF_MODE2_GS_TIMER_224 ,0 ); +FF_MODE2_GS_TIMER_MASK , +FF_MODE2_GS_TIMER_224 ,0 ); } static void
Signature · 6 lines
2.30.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/4 drm/i915/icl: add Wa_22010271021 for all gen11
From: Caz Yokoyama <[email protected]>
Wa_22010271021 does not apply only to EHL, but to all gen11 platforms.
Bspec: 33450, 52887
--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/gt/intel_workarounds.c +4 -5
@@ -1820,11 +1820,10 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal)GEN7_FF_THREAD_MODE , GEN12_FF_TESSELATION_DOP_GATE_DISABLE); -/* Wa_22010271021:ehl */ -if (IS_JSL_EHL (i915)) -wa_masked_en (wal, -GEN9_CS_DEBUG_MODE1 , -FF_DOP_CLOCK_GATE_DISABLE ); +/* Wa_22010271021:gen11 */ +wa_masked_en (wal, +GEN9_CS_DEBUG_MODE1 , +FF_DOP_CLOCK_GATE_DISABLE ); }if (IS_GEN_RANGE (i915,9 ,12 )) {
Signature · 6 lines
2.30.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/4] drm/i915/icl: add Wa_22010271021 for all gen11
Quoted 3 lines · Lucas De Marchi
From: Caz Yokoyama <[email protected]>
Wa_22010271021does not apply only to EHL, but to all gen11 platforms.
It also applies to a bunch of gen12 platforms; we already apply the same workaround in an earlier block of the same function too to handle all of them. It's fine to keep the gen11 and gen12 copies separate and prevent even more complicated if/else chains in this function that's already overly-complicated, but you should probably just drop the ":gen11" suffix on the code comment and you may want to tweak the commit message here to indicate that we already have this handled properly for all the gen12 platforms.
Aside from that,
Quoted 34 lines
Bspec: 33450, 52887
Cc Clinton Taylor <[email protected]>Cc Matt Roper <[email protected]>Signed-off-by Caz Yokoyama <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/gt/intel_workarounds.c +4
-5@@ -1820,11 +1820,10 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal)GEN7_FF_THREAD_MODE , GEN12_FF_TESSELATION_DOP_GATE_DISABLE); -/* Wa_22010271021:ehl */ -if (IS_JSL_EHL (i915)) -wa_masked_en (wal, -GEN9_CS_DEBUG_MODE1 , -FF_DOP_CLOCK_GATE_DISABLE ); +/* Wa_22010271021:gen11 */ +wa_masked_en (wal, +GEN9_CS_DEBUG_MODE1 , +FF_DOP_CLOCK_GATE_DISABLE ); }if (IS_GEN_RANGE (i915,9 ,12 )) {Signature · 1 line
2.30.1
Signature · 9 lines
Matt Roper Graphics Software Engineer VTT-OSGC Platform Enablement Intel Corporation (916) 356-2795 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/4 drm/i915: Wa_14010826681 does the same as Wa_22010271021
In reply to Lucas De MarchiFrom: Caz Yokoyama <[email protected]>
Add a comment marking Wa_14010826681 as the same as Wa_22010271021 for easy verification.
Bspec: 54508, 52890
--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/intel_workarounds.c +2 -1
@@ -1682,7 +1682,8 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal)/* * Wa_1606700617:tgl,dg1 -* Wa_22010271021:tgl,rkl,dg1, adl-s +* Wa_22010271021:tgl,rkl,dg1,adl-s +* Wa_14010826681:tgl,dg1 */ wa_masked_en(wal, GEN9_CS_DEBUG_MODE1,
Signature · 6 lines
2.30.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/4] drm/i915: Wa_14010826681 does the same as Wa_22010271021
Quoted 11 lines · Lucas De Marchi
From: Caz Yokoyama <[email protected]>
Add a comment marking
Wa_14010826681as the same asWa_22010271021for easy verification.Bspec: 54508, 52890
Cc Clinton Taylor <[email protected]>Cc Matt Roper <[email protected]>Signed-off-by Caz Yokoyama <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>
Quoted 21 lines
--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/gt/intel_workarounds.c +2
-1@@ -1682,7 +1682,8 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal)/* * Wa_1606700617:tgl,dg1 -* Wa_22010271021:tgl,rkl,dg1, adl-s +* Wa_22010271021:tgl,rkl,dg1,adl-s +* Wa_14010826681:tgl,dg1 */ wa_masked_en(wal, GEN9_CS_DEBUG_MODE1,Signature · 1 line
2.30.1
Signature · 9 lines
Matt Roper Graphics Software Engineer VTT-OSGC Platform Enablement Intel Corporation (916) 356-2795 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/4 drm/i915/dg1: WA GPU hang at RCC
In reply to Lucas De MarchiFrom: Zhen Han <[email protected]>
GPU hangs at RCC. According to Wa_14012131227 we shouldn't have a hang due to RHWO, but that is what we are observing, even without media compressible render target. Feedback from HW engineers is to leave RHWO disabled.
--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/gpu/drm/i915/gt/intel_workarounds.c +11 -0
@@ -739,6 +739,17 @@ static void dg1_ctx_workarounds_init(struct intel_engine_cs *engine,FF_MODE2 ,FF_MODE2_GS_TIMER_MASK , FF_MODE2_GS_TIMER_224, 0); + +/* +* Wa_14012131227 +* +* Although the WA is described as causing corruption when using media +* compressible render target, leaving RHWO enabled is also causing +* gpu hang when using multiple concurrent render and media workloads. +* Disable it completely for now. +*/ +wa_masked_en (wal,GEN7_COMMON_SLICE_CHICKEN1 , +GEN9_RHWO_OPTIMIZATION_DISABLE ); } static void
Signature · 6 lines
2.30.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 4/4] drm/i915/dg1: WA GPU hang at RCC
Yes, that's the case.
It has RCC related silicon issues in gen12-lp.
Followings are two consecutive GPU hangs we found in SG1 and DG1 linux which have no media compressible render target.
1. HSD-1508524297<https://hsdes.intel.com/appstore/article/> [SG1][DG1] GPU hang in PIPECONTROL in running 120 ways of Android container with running pocket story HD apk. --> The solution is disable RHWO optimization in default.
2. hsd-1508734716<https://hsdes.intel.com/appstore/article/> [DG1][Linux] GPU hang in PIPECONTROL(IPEHR:0x7a000004) with (PSS, RCPFE, RCC, WMFE) not done in running Monkey test --> The solution is keeping RHWO optimization in when Render Target Resolve type is PARTIAL or FULL. The change will be in mesa code.
SV and RCC design team have further study and give the root cause explain the bug-eco HSD of 1508744258 - Hang due to deadlock created by RHWO scenario with RHWO optimization enabled<https://hsdes.intel.com/appstore/article/>.
BTW, recently, Windows team found similar GPU hangs in custom's TGL platform and need "disable RHWO" as the WA solution. So it's a general issues in Gen12 (TGL and DG1).
* 14012336472 - [HP-TDC_IEC/HarryPotter]SIO1880260 Simple Solitaire UI show garbage when playing the game by finger.<https://hsdes.intel.com/appstore/article/>
* 18014955083 - [TGL] Sporadic pixel shader hang when alpha blending is enabled <https://hsdes.intel.com/appstore/article/> (SV sighting)
Thanks
Han Zhen
-----Original Message-----
From: De Marchi, Lucas <[email protected]>
Sent: Wednesday, March 3, 2021 9:07 AM
To: [email protected]
Cc: Han, Zhen <[email protected]>; Liu, Jianjun <[email protected]>; Liu, Chuansheng <[email protected]>; Sripada, Radhakrishna <[email protected]>
Subject: [PATCH 4/4] drm/i915/dg1: WA GPU hang at RCC
From: Zhen Han <[email protected]<mailto:[email protected]>>
GPU hangs at RCC. According to Wa_14012131227 we shouldn't have a hang due to RHWO, but that is what we are observing, even without media compressible render target. Feedback from HW engineers is to leave RHWO disabled.
--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/gpu/drm/i915/gt/intel_workarounds.c +11 -0
@@ -739,6 +739,17 @@ static void dg1_ctx_workarounds_init(struct intel_engine_cs *engine,FF_MODE2 ,FF_MODE2_GS_TIMER_MASK , FF_MODE2_GS_TIMER_224, 0); + +/* +* Wa_14012131227 +* +* Although the WA is described as causing corruption when using media +* compressible render target, leaving RHWO enabled is also causing +* gpu hang when using multiple concurrent render and media workloads. +* Disable it completely for now. +*/ +wa_masked_en (wal,GEN7_COMMON_SLICE_CHICKEN1 , +GEN9_RHWO_OPTIMIZATION_DISABLE ); } static void
--
2.30.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 4/4] drm/i915/dg1: WA GPU hang at RCC
In reply to Lucas De MarchiQuoted 6 lines · Lucas De Marchi
From: Zhen Han <[email protected]>
GPU hangs at RCC. According to
Wa_14012131227we shouldn't have a hang due to RHWO, but that is what we are observing, even without media compressible render target. Feedback from HW engineers is to leave RHWO disabled.
"14012131227" isn't the correct workaround number; that's a platform-specific identifier. This should be referred to by its lineage number 22011054531 which is common across all affected platforms. From a quick scan, it looks like this isn't just a DG1 workaround, but also applies to at least TGL and ADL-S as well (and is pending for RKL).
I'm not sure we actually need this workaround in the kernel though. We're already whitelisting this register for userspace to allow UMD's to apply workarounds to it directly (and UMD's are already doing their own programming of the register for Wa_1808121037). So it may be best to leave the handling of this additional bit to them as well, especially if the desired handling doesn't quite match the officially documented workaround text.
Matt
Quoted 39 lines
Cc Jianjun Liu <[email protected]>Cc Chuansheng Liu <[email protected]>Cc Radhakrishna Sripada <[email protected]>Signed-off-by Zhen Han <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/gpu/drm/i915/gt/intel_workarounds.c +11
-0@@ -739,6 +739,17 @@ static void dg1_ctx_workarounds_init(struct intel_engine_cs *engine,FF_MODE2 ,FF_MODE2_GS_TIMER_MASK , FF_MODE2_GS_TIMER_224, 0); + +/* +* Wa_14012131227 +* +* Although the WA is described as causing corruption when using media +* compressible render target, leaving RHWO enabled is also causing +* gpu hang when using multiple concurrent render and media workloads. +* Disable it completely for now. +*/ +wa_masked_en (wal,GEN7_COMMON_SLICE_CHICKEN1 , +GEN9_RHWO_OPTIMIZATION_DISABLE ); } static voidSignature · 6 lines
2.30.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 9 lines
Matt Roper Graphics Software Engineer VTT-OSGC Platform Enablement Intel Corporation (916) 356-2795 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 4/4] drm/i915/dg1: WA GPU hang at RCC
Dear Matt,
Yes, it needs the WA in TGL. Not sure the ADL-S and RKL.
The issue is different from 1808121037.
Previously, it was not found which exact usage condition needs to disable RHWO in studying the Alibaba issue in SG1, so make this change in kernel. Should we move the " disable RHWO " to mesa default setting path?
Thanks
Han Zhen
-----Original Message-----
From: Roper, Matthew D <[email protected]>
Sent: Wednesday, March 3, 2021 11:37 AM
To: De Marchi, Lucas <[email protected]>
Cc: [email protected]; Liu, Jianjun <[email protected]>; Han, Zhen <[email protected]>
Subject: Re: [Intel-gfx] [PATCH 4/4] drm/i915/dg1: WA GPU hang at RCC
Quoted 6 lines · Lucas De Marchi
From: Zhen Han <[email protected]>
GPU hangs at RCC. According to
Wa_14012131227we shouldn't have a hang due to RHWO, but that is what we are observing, even without media compressible render target. Feedback from HW engineers is to leave RHWO disabled.
"14012131227" isn't the correct workaround number; that's a platform-specific identifier. This should be referred to by its lineage number 22011054531 which is common across all affected platforms. From a quick scan, it looks like this isn't just a DG1 workaround, but also applies to at least TGL and ADL-S as well (and is pending for RKL).
I'm not sure we actually need this workaround in the kernel though.
We're already whitelisting this register for userspace to allow UMD's to apply workarounds to it directly (and UMD's are already doing their own programming of the register for Wa_1808121037). So it may be best to leave the handling of this additional bit to them as well, especially if the desired handling doesn't quite match the officially documented workaround text.
Matt
Quoted 36 lines
Cc Jianjun Liu <[email protected]>Cc Chuansheng Liu <[email protected]>Cc Radhakrishna Sripada <[email protected]>Signed-off-by Zhen Han <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/gpu/drm/i915/gt/intel_workarounds.c +11
-1@@ -739,6 +739,17 @@ static void dg1_ctx_workarounds_init(struct intel_engine_cs *engine,FF_MODE2 ,FF_MODE2_GS_TIMER_MASK , FF_MODE2_GS_TIMER_224, 0); + +/* +* Wa_14012131227 +* +* Although the WA is described as causing corruption when using media +* compressible render target, leaving RHWO enabled is also causing +* gpu hang when using multiple concurrent render and media workloads. +* Disable it completely for now. +*/ +wa_masked_en (wal,GEN7_COMMON_SLICE_CHICKEN1 , +GEN9_RHWO_OPTIMIZATION_DISABLE ); } static void --2.30.1
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 14 lines · Lucas De Marchi
From: Caz Yokoyama <[email protected]>
Follow Bspec 31870 to set recommended tuning values for certain GT register. These values aren't workarounds per-se, but it's best to handle them in the same general area of the driver, especially since there may be real workarounds that update other bits of the same registers.
At the moment the only value we need to worry about is the
TDS_TIMERsetting inFF_MODE2. This setting was previously described as "Wa_1604555607" on some platforms, but the spec tells us that we should continue to program this on all current gen12 platforms, even those that do not have that WA.
Quoted 6 lines
Bspec: 31870
Cc Clinton Taylor <[email protected]>Cc Matt Roper <[email protected]>Signed-off-by Caz Yokoyama <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>
A couple minor nitpicks about the comments, but you can tweak those while applying.
There appear to be some other registers recommended on the same bspec tuning page that we don't seem to be handling yet. Will those be coming as additional patches?
Quoted 15 lines
--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 48 ++++++++++++++++----- 1 file changed, 37 insertions(+), 11 deletions(-)drivers/gpu/drm/i915/gt/intel_workarounds.c +3
-0@@ -646,9 +646,38 @@ static void icl_ctx_workarounds_init(struct intel_engine_cs *engine,wa_masked_en (wal,GEN9_ROW_CHICKEN4 ,GEN11_DIS_PICK_2ND_EU ); } +/* +* These settings aren't actually workarounds, but general tuning settings that +* need to be programmed on several platforms.
drivers/gpu/drm/i915/gt/intel_workarounds.c static void icl_ctx_workarounds_init(struct intel_engine_cs *engine, · line 661
Quoted 10 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +10
-0+*/ +static void gen12_ctx_gt_tuning_init (struct intel_engine_cs *engine, +struct i915_wa_list *wal) +{ +/* +* Although some platforms refer to it as Wa_1604555607, we need to +* program it even on those that don't explicitly list that +* workaround. +* +* Note that the implementation of this workaround is further modified
Since we just got done saying that this technically isn't a workaround, even though some of the older platforms still list it that way, I'd re-word the comment here. Maybe "Note that the programming of this register is further modified..." would be more appropriate.
drivers/gpu/drm/i915/gt/intel_workarounds.c static void icl_ctx_workarounds_init(struct intel_engine_cs *engine, · line 663
Quoted 2 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +2
-0+* according to the FF_MODE2 guidance given by Wa_1608008084:gen12. +*
Minor nitpick; the new paragraph start here makes it sound like we've moved on to describing something else, rather than explaining what Wa_1608008084:gen12 asks us to do. I'd remove the blank line here and start the next sentence with "Wa_1608008084 tells us..." to link the statements together.
Matt
Quoted 64 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +22
-11+* FF_MODE2 register will return the wrong value when read. The default +* value for this register is zero for all fields and there are no bit +* masks. So instead of doing a RMW we should just write TDS timer +* value. For the same reason read verification is ignored. +*/ +wa_add (wal, +FF_MODE2 , +FF_MODE2_TDS_TIMER_MASK , +FF_MODE2_TDS_TIMER_128 , +0 ); +} +static void gen12_ctx_workarounds_init (struct intel_engine_cs *engine,struct i915_wa_list *wal) { +gen12_ctx_gt_tuning_init (engine, wal); +/* * Wa_1409142259:tgl * Wa_1409347922:tgl @@ -675,19 +704,15 @@ static void tgl_ctx_workarounds_init(struct intel_engine_cs *engine,gen12_ctx_workarounds_init (engine, wal);/* -* Wa_1604555607:tgl,rkl +* Wa_16011163337 * -* Note that the implementation of this workaround is further modified -* according to the FF_MODE2 guidance given by Wa_1608008084:gen12. -* FF_MODE2 register will return the wrong value when read. The default -* value for this register is zero for all fields and there are no bit -* masks. So instead of doing a RMW we should just write the GS Timer -* and TDS timer values for Wa_1604555607 and Wa_16011163337. +* Like in gen12_ctx_gt_tuning_init(), read verification is ignored due +* to Wa_1608008084. */ wa_add (wal,FF_MODE2 , -FF_MODE2_GS_TIMER_MASK |FF_MODE2_TDS_TIMER_MASK , -FF_MODE2_GS_TIMER_224 |FF_MODE2_TDS_TIMER_128 , +FF_MODE2_GS_TIMER_MASK , +FF_MODE2_GS_TIMER_224 ,0 ); }@@ -707,12 +732,13 @@ static void dg1_ctx_workarounds_init(struct intel_engine_cs *engine,/* * Wa_16011163337 * -* Like in tgl_ctx_workarounds_init(), read verification is ignored due +* Like in gen12_ctx_gt_tuning_init(), read verification is ignored due * to Wa_1608008084. */ wa_add (wal,FF_MODE2 , -FF_MODE2_GS_TIMER_MASK ,FF_MODE2_GS_TIMER_224 ,0 ); +FF_MODE2_GS_TIMER_MASK , +FF_MODE2_GS_TIMER_224 ,0 ); } static voidSignature · 1 line
2.30.1
Signature · 9 lines
Matt Roper Graphics Software Engineer VTT-OSGC Platform Enablement Intel Corporation (916) 356-2795 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 22 lines · Matt Roper
Quoted 14 lines · Lucas De Marchi
From: Caz Yokoyama <[email protected]>
Follow Bspec 31870 to set recommended tuning values for certain GT register. These values aren't workarounds per-se, but it's best to handle them in the same general area of the driver, especially since there may be real workarounds that update other bits of the same registers.
At the moment the only value we need to worry about is the
TDS_TIMERsetting inFF_MODE2. This setting was previously described as "Wa_1604555607" on some platforms, but the spec tells us that we should continue to program this on all current gen12 platforms, even those that do not have that WA.Quoted 6 lines
Bspec: 31870
Cc Clinton Taylor <[email protected]>Cc Matt Roper <[email protected]>Signed-off-by Caz Yokoyama <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>
Quoted 8 lines
A couple minor nitpicks about the comments, but you can tweak those while applying.
Reviewed-by Matt Roper <[email protected]>There appear to be some other registers recommended on the same bspec tuning page that we don't seem to be handling yet. Will those be coming as additional patches?
I don't have those ready, but that is the intention, yes. Here I basically wanted to get the basic changes in place to make those possible, while moving the one we already have in the driver there.
Quoted 32 lines
Quoted 16 lines
--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 48 ++++++++++++++++----- 1 file changed, 37 insertions(+), 11 deletions(-)drivers/gpu/drm/i915/gt/intel_workarounds.c +3
-0@@ -646,9 +646,38 @@ static void icl_ctx_workarounds_init(struct intel_engine_cs *engine,wa_masked_en (wal,GEN9_ROW_CHICKEN4 ,GEN11_DIS_PICK_2ND_EU ); } +/* +* These settings aren't actually workarounds, but general tuning settings that +* need to be programmed on several platforms. drivers/gpu/drm/i915/gt/intel_workarounds.c static void icl_ctx_workarounds_init(struct intel_engine_cs *engine, · line 661
Quoted 10 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +10
-0+*/ +static void gen12_ctx_gt_tuning_init (struct intel_engine_cs *engine, +struct i915_wa_list *wal) +{ +/* +* Although some platforms refer to it as Wa_1604555607, we need to +* program it even on those that don't explicitly list that +* workaround. +* +* Note that the implementation of this workaround is further modified Since we just got done saying that this technically isn't a workaround, even though some of the older platforms still list it that way, I'd re-word the comment here. Maybe "Note that the programming of this register is further modified..." would be more appropriate.
Quoted 8 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c static void icl_ctx_workarounds_init(struct intel_engine_cs *engine, · line 663
Quoted 2 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +2
-0+* according to the FF_MODE2 guidance given by Wa_1608008084:gen12. +* Minor nitpick; the new paragraph start here makes it sound like we've moved on to describing something else, rather than explaining what Wa_1608008084:gen12 asks us to do. I'd remove the blank line here and start the next sentence with "
Wa_1608008084tells us..." to link the statements together.
thanks. I changed those and will resubmit.
Lucas De Marchi
Quoted 64 lines
Matt
Quoted 60 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +22
-11+* FF_MODE2 register will return the wrong value when read. The default +* value for this register is zero for all fields and there are no bit +* masks. So instead of doing a RMW we should just write TDS timer +* value. For the same reason read verification is ignored. +*/ +wa_add (wal, +FF_MODE2 , +FF_MODE2_TDS_TIMER_MASK , +FF_MODE2_TDS_TIMER_128 , +0 ); +} +static void gen12_ctx_workarounds_init (struct intel_engine_cs *engine,struct i915_wa_list *wal) { +gen12_ctx_gt_tuning_init (engine, wal); +/* * Wa_1409142259:tgl * Wa_1409347922:tgl @@ -675,19 +704,15 @@ static void tgl_ctx_workarounds_init(struct intel_engine_cs *engine,gen12_ctx_workarounds_init (engine, wal);/* -* Wa_1604555607:tgl,rkl +* Wa_16011163337 * -* Note that the implementation of this workaround is further modified -* according to the FF_MODE2 guidance given by Wa_1608008084:gen12. -* FF_MODE2 register will return the wrong value when read. The default -* value for this register is zero for all fields and there are no bit -* masks. So instead of doing a RMW we should just write the GS Timer -* and TDS timer values for Wa_1604555607 and Wa_16011163337. +* Like in gen12_ctx_gt_tuning_init(), read verification is ignored due +* to Wa_1608008084. */ wa_add (wal,FF_MODE2 , -FF_MODE2_GS_TIMER_MASK |FF_MODE2_TDS_TIMER_MASK , -FF_MODE2_GS_TIMER_224 |FF_MODE2_TDS_TIMER_128 , +FF_MODE2_GS_TIMER_MASK , +FF_MODE2_GS_TIMER_224 ,0 ); }@@ -707,12 +732,13 @@ static void dg1_ctx_workarounds_init(struct intel_engine_cs *engine,/* * Wa_16011163337 * -* Like in tgl_ctx_workarounds_init(), read verification is ignored due +* Like in gen12_ctx_gt_tuning_init(), read verification is ignored due * to Wa_1608008084. */ wa_add (wal,FF_MODE2 , -FF_MODE2_GS_TIMER_MASK ,FF_MODE2_GS_TIMER_224 ,0 ); +FF_MODE2_GS_TIMER_MASK , +FF_MODE2_GS_TIMER_224 ,0 ); }
Quoted 11 lines
Quoted 4 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +0
-1static void --2.30.1
Signature · 5 lines
Matt Roper Graphics Software Engineer VTT-OSGC Platform Enablement Intel Corporation (916) 356-2795
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/4] drm/i915/gen12: Add recommended hardware tuning value (rev2)
In reply to Lucas De Marchi== Series Details ==
== Series Details ==
Series: series starting with [1/4] drm/i915/gen12: Add recommended hardware tuning value (rev2)
URL : https://patchwork.freedesktop.org/series/87560/
State : failure
== Summary ==
Applying: drm/i915/gen12: Add recommended hardware tuning value
Applying: drm/i915/icl: add Wa_22010271021 for all gen11
Applying: drm/i915: Wa_14010826681 does the same as Wa_22010271021
Applying: drm/i915/dg1: WA GPU hang at RCC
error: patch failed: drivers/gpu/drm/i915/gt/intel_workarounds.c:739
error: drivers/gpu/drm/i915/gt/intel_workarounds.c: patch does not apply
error: Did you hand edit your patch?
It does not apply to blobs recorded in its index.
hint: Use 'git am --show-current-patch=diff' to see the failed patch Using index info to reconstruct a base tree...
Patch failed at 0004 drm/i915/dg1: WA GPU hang at RCC
When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx