public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096
@ 2023-09-20  4:05 Shekhar Chauhan
  2023-09-20  6:42 ` kernel test robot
  2023-09-20 13:42 ` Gustavo Sousa
  0 siblings, 2 replies; 12+ messages in thread
From: Shekhar Chauhan @ 2023-09-20  4:05 UTC (permalink / raw)
  To: intel-gfx

Drop UGM per set fragment threshold to 3

BSpec: 54833
Signed-off-by: Shekhar Chauhan <shekhar.chauhan@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gt_regs.h     | 1 +
 drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
index a00ff51c681d..f8ab99affa15 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
@@ -1227,6 +1227,7 @@
 #define EU_PERF_CNTL3				PERF_REG(0xe758)
 
 #define LSC_CHICKEN_BIT_0			MCR_REG(0xe7c8)
+#define   UGM_FRAGMENT_THRESHOLD_TO_3		REG_BIT(58)
 #define   DISABLE_D8_D16_COASLESCE		REG_BIT(30)
 #define   FORCE_1_SUB_MESSAGE_PER_FRAGMENT	REG_BIT(15)
 #define LSC_CHICKEN_BIT_0_UDW			MCR_REG(0xe7c8 + 4)
diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index 660d4f358eab..3f3977014ee7 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -2914,6 +2914,9 @@ general_render_compute_wa_init(struct intel_engine_cs *engine, struct i915_wa_li
 		 * Wa_22015475538:dg2
 		 */
 		wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, DIS_CHAIN_2XSIMD8);
+
+		/* Wa_18028616096:dg2 */
+		wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0, UGM_FRAGMENT_THRESHOLD_TO_3);
 	}
 
 	if (IS_DG2_G11(i915)) {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096
  2023-09-20  4:05 Shekhar Chauhan
@ 2023-09-20  6:42 ` kernel test robot
  2023-09-20 13:42 ` Gustavo Sousa
  1 sibling, 0 replies; 12+ messages in thread
From: kernel test robot @ 2023-09-20  6:42 UTC (permalink / raw)
  To: Shekhar Chauhan, intel-gfx; +Cc: oe-kbuild-all

Hi Shekhar,

kernel test robot noticed the following build errors:

[auto build test ERROR on drm-tip/drm-tip]

url:    https://github.com/intel-lab-lkp/linux/commits/Shekhar-Chauhan/drm-i915-Add-Wa_18028616096/20230920-121417
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link:    https://lore.kernel.org/r/20230920040547.181861-1-shekhar.chauhan%40intel.com
patch subject: [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096
config: x86_64-randconfig-003-20230920 (https://download.01.org/0day-ci/archive/20230920/202309201405.PF0VVCts-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230920/202309201405.PF0VVCts-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309201405.PF0VVCts-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/linux/container_of.h:5,
                    from include/linux/plist.h:76,
                    from include/linux/pm_qos.h:15,
                    from drivers/gpu/drm/i915/i915_drv.h:35,
                    from drivers/gpu/drm/i915/gt/intel_workarounds.c:6:
   drivers/gpu/drm/i915/gt/intel_workarounds.c: In function 'general_render_compute_wa_init':
>> include/linux/build_bug.h:16:51: error: negative width in bit-field '<anonymous>'
      16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
         |                                                   ^
   drivers/gpu/drm/i915/i915_reg_defs.h:22:16: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
      22 |                BUILD_BUG_ON_ZERO(__is_constexpr(__n) &&         \
         |                ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/gt/intel_gt_regs.h:1232:49: note: in expansion of macro 'REG_BIT'
    1232 | #define   UGM_FRAGMENT_THRESHOLD_TO_3           REG_BIT(58)
         |                                                 ^~~~~~~
   drivers/gpu/drm/i915/gt/intel_workarounds.c:2919:57: note: in expansion of macro 'UGM_FRAGMENT_THRESHOLD_TO_3'
    2919 |                 wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0, UGM_FRAGMENT_THRESHOLD_TO_3);
         |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +16 include/linux/build_bug.h

bc6245e5efd70c Ian Abbott       2017-07-10   6  
bc6245e5efd70c Ian Abbott       2017-07-10   7  #ifdef __CHECKER__
bc6245e5efd70c Ian Abbott       2017-07-10   8  #define BUILD_BUG_ON_ZERO(e) (0)
bc6245e5efd70c Ian Abbott       2017-07-10   9  #else /* __CHECKER__ */
bc6245e5efd70c Ian Abbott       2017-07-10  10  /*
bc6245e5efd70c Ian Abbott       2017-07-10  11   * Force a compilation error if condition is true, but also produce a
8788994376d84d Rikard Falkeborn 2019-12-04  12   * result (of value 0 and type int), so the expression can be used
bc6245e5efd70c Ian Abbott       2017-07-10  13   * e.g. in a structure initializer (or where-ever else comma expressions
bc6245e5efd70c Ian Abbott       2017-07-10  14   * aren't permitted).
bc6245e5efd70c Ian Abbott       2017-07-10  15   */
8788994376d84d Rikard Falkeborn 2019-12-04 @16  #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
527edbc18a70e7 Masahiro Yamada  2019-01-03  17  #endif /* __CHECKER__ */
527edbc18a70e7 Masahiro Yamada  2019-01-03  18  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096
  2023-09-20  4:05 Shekhar Chauhan
  2023-09-20  6:42 ` kernel test robot
@ 2023-09-20 13:42 ` Gustavo Sousa
  1 sibling, 0 replies; 12+ messages in thread
From: Gustavo Sousa @ 2023-09-20 13:42 UTC (permalink / raw)
  To: Shekhar Chauhan, intel-gfx

Quoting Shekhar Chauhan (2023-09-20 01:05:47-03:00)
>Drop UGM per set fragment threshold to 3
>
>BSpec: 54833
>Signed-off-by: Shekhar Chauhan <shekhar.chauhan@intel.com>
>---
> drivers/gpu/drm/i915/gt/intel_gt_regs.h     | 1 +
> drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++
> 2 files changed, 4 insertions(+)
>
>diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
>index a00ff51c681d..f8ab99affa15 100644
>--- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h
>+++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
>@@ -1227,6 +1227,7 @@
> #define EU_PERF_CNTL3                                PERF_REG(0xe758)
> 
> #define LSC_CHICKEN_BIT_0                        MCR_REG(0xe7c8)
>+#define   UGM_FRAGMENT_THRESHOLD_TO_3                REG_BIT(58)

You probably want to define this as:

  #define   UGM_FRAGMENT_THRESHOLD_TO_3                REG_BIT(58 - 32)

, and after the definition of LSC_CHICKEN_BIT_0_UDW.

See more below...

> #define   DISABLE_D8_D16_COASLESCE                REG_BIT(30)
> #define   FORCE_1_SUB_MESSAGE_PER_FRAGMENT        REG_BIT(15)
> #define LSC_CHICKEN_BIT_0_UDW                        MCR_REG(0xe7c8 + 4)
>diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
>index 660d4f358eab..3f3977014ee7 100644
>--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
>+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
>@@ -2914,6 +2914,9 @@ general_render_compute_wa_init(struct intel_engine_cs *engine, struct i915_wa_li
>                  * Wa_22015475538:dg2
>                  */
>                 wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, DIS_CHAIN_2XSIMD8);
>+
>+                /* Wa_18028616096:dg2 */
>+                wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0, UGM_FRAGMENT_THRESHOLD_TO_3);

...and here, use LSC_CHICKEN_BIT_0_UDW as target.

--
Gustavo Sousa

>         }
> 
>         if (IS_DG2_G11(i915)) {
>-- 
>2.34.1
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096
@ 2023-09-21  4:27 Shekhar Chauhan
  2023-09-21  4:41 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: Add Wa_18028616096 (rev2) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Shekhar Chauhan @ 2023-09-21  4:27 UTC (permalink / raw)
  To: intel-gfx

Drop UGM per set fragment threshold to 3

BSpec: 54833
Signed-off-by: Shekhar Chauhan <shekhar.chauhan@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gt_regs.h     | 1 +
 drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
index a00ff51c681d..326224abe395 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
@@ -1230,6 +1230,7 @@
 #define   DISABLE_D8_D16_COASLESCE		REG_BIT(30)
 #define   FORCE_1_SUB_MESSAGE_PER_FRAGMENT	REG_BIT(15)
 #define LSC_CHICKEN_BIT_0_UDW			MCR_REG(0xe7c8 + 4)
+#define   UGM_FRAGMENT_THRESHOLD_TO_3		MCR_REG(58 - 32)
 #define   DIS_CHAIN_2XSIMD8			REG_BIT(55 - 32)
 #define   FORCE_SLM_FENCE_SCOPE_TO_TILE		REG_BIT(42 - 32)
 #define   FORCE_UGM_FENCE_SCOPE_TO_TILE		REG_BIT(41 - 32)
diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index 660d4f358eab..992041e3776c 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -2914,6 +2914,9 @@ general_render_compute_wa_init(struct intel_engine_cs *engine, struct i915_wa_li
 		 * Wa_22015475538:dg2
 		 */
 		wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, DIS_CHAIN_2XSIMD8);
+
+		/* Wa_18028616096:dg2 */
+		wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, UGM_FRAGMENT_THRESHOLD_TO_3);
 	}
 
 	if (IS_DG2_G11(i915)) {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: Add Wa_18028616096 (rev2)
  2023-09-21  4:27 [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096 Shekhar Chauhan
@ 2023-09-21  4:41 ` Patchwork
  2023-09-21  7:17 ` [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096 kernel test robot
  2023-09-21  8:20 ` kernel test robot
  2 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2023-09-21  4:41 UTC (permalink / raw)
  To: Shekhar Chauhan; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Add Wa_18028616096 (rev2)
URL   : https://patchwork.freedesktop.org/series/123951/
State : failure

== Summary ==

Error: make failed
  CALL    scripts/checksyscalls.sh
  DESCEND objtool
  INSTALL libsubcmd_headers
  CC [M]  drivers/gpu/drm/i915/gt/intel_workarounds.o
In file included from ./drivers/gpu/drm/i915/intel_uncore.h:34,
                 from ./drivers/gpu/drm/i915/gt/intel_engine_types.h:26,
                 from ./drivers/gpu/drm/i915/gt/intel_context_types.h:18,
                 from ./drivers/gpu/drm/i915/gem/i915_gem_context_types.h:20,
                 from ./drivers/gpu/drm/i915/i915_drv.h:42,
                 from drivers/gpu/drm/i915/gt/intel_workarounds.c:6:
drivers/gpu/drm/i915/gt/intel_workarounds.c: In function ‘general_render_compute_wa_init’:
./drivers/gpu/drm/i915/i915_reg_defs.h:273:25: error: incompatible type for argument 3 of ‘wa_mcr_write_or’
  273 | #define MCR_REG(offset) ((const i915_mcr_reg_t){ .reg = (offset) })
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                         |
      |                         i915_mcr_reg_t {aka const struct <anonymous>}
drivers/gpu/drm/i915/gt/intel_gt_regs.h:1235:40: note: in expansion of macro ‘MCR_REG’
 1235 | #define   UGM_FRAGMENT_THRESHOLD_TO_3  MCR_REG(58 - 32)
      |                                        ^~~~~~~
drivers/gpu/drm/i915/gt/intel_workarounds.c:2919:47: note: in expansion of macro ‘UGM_FRAGMENT_THRESHOLD_TO_3’
 2919 |   wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, UGM_FRAGMENT_THRESHOLD_TO_3);
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gt/intel_workarounds.c:272:67: note: expected ‘u32’ {aka ‘unsigned int’} but argument is of type ‘i915_mcr_reg_t’ {aka ‘const struct <anonymous>’}
  272 | wa_mcr_write_or(struct i915_wa_list *wal, i915_mcr_reg_t reg, u32 set)
      |                                                               ~~~~^~~
make[6]: *** [scripts/Makefile.build:243: drivers/gpu/drm/i915/gt/intel_workarounds.o] Error 1
make[5]: *** [scripts/Makefile.build:480: drivers/gpu/drm/i915] Error 2
make[4]: *** [scripts/Makefile.build:480: drivers/gpu/drm] Error 2
make[3]: *** [scripts/Makefile.build:480: drivers/gpu] Error 2
make[2]: *** [scripts/Makefile.build:480: drivers] Error 2
make[1]: *** [/home/kbuild2/kernel/Makefile:1913: .] Error 2
make: *** [Makefile:234: __sub-make] Error 2
Build failed, no error log produced



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096
  2023-09-21  4:27 [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096 Shekhar Chauhan
  2023-09-21  4:41 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: Add Wa_18028616096 (rev2) Patchwork
@ 2023-09-21  7:17 ` kernel test robot
  2023-09-21  8:20 ` kernel test robot
  2 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2023-09-21  7:17 UTC (permalink / raw)
  To: Shekhar Chauhan, intel-gfx; +Cc: oe-kbuild-all

Hi Shekhar,

kernel test robot noticed the following build errors:

[auto build test ERROR on drm-tip/drm-tip]

url:    https://github.com/intel-lab-lkp/linux/commits/Shekhar-Chauhan/drm-i915-Add-Wa_18028616096/20230921-122837
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link:    https://lore.kernel.org/r/20230921042727.362710-1-shekhar.chauhan%40intel.com
patch subject: [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096
config: i386-randconfig-014-20230921 (https://download.01.org/0day-ci/archive/20230921/202309211509.sE4onxLs-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230921/202309211509.sE4onxLs-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309211509.sE4onxLs-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/gpu/drm/i915/intel_uncore.h:34,
                    from drivers/gpu/drm/i915/gt/intel_engine_types.h:26,
                    from drivers/gpu/drm/i915/gt/intel_context_types.h:18,
                    from drivers/gpu/drm/i915/gem/i915_gem_context_types.h:20,
                    from drivers/gpu/drm/i915/i915_drv.h:42,
                    from drivers/gpu/drm/i915/gt/intel_workarounds.c:6:
   drivers/gpu/drm/i915/gt/intel_workarounds.c: In function 'general_render_compute_wa_init':
>> drivers/gpu/drm/i915/i915_reg_defs.h:273:25: error: incompatible type for argument 3 of 'wa_mcr_write_or'
     273 | #define MCR_REG(offset) ((const i915_mcr_reg_t){ .reg = (offset) })
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                         |
         |                         i915_mcr_reg_t
   drivers/gpu/drm/i915/gt/intel_gt_regs.h:1235:49: note: in expansion of macro 'MCR_REG'
    1235 | #define   UGM_FRAGMENT_THRESHOLD_TO_3           MCR_REG(58 - 32)
         |                                                 ^~~~~~~
   drivers/gpu/drm/i915/gt/intel_workarounds.c:2919:61: note: in expansion of macro 'UGM_FRAGMENT_THRESHOLD_TO_3'
    2919 |                 wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, UGM_FRAGMENT_THRESHOLD_TO_3);
         |                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/gt/intel_workarounds.c:272:67: note: expected 'u32' {aka 'unsigned int'} but argument is of type 'i915_mcr_reg_t'
     272 | wa_mcr_write_or(struct i915_wa_list *wal, i915_mcr_reg_t reg, u32 set)
         |                                                               ~~~~^~~


vim +/wa_mcr_write_or +273 drivers/gpu/drm/i915/i915_reg_defs.h

2b25a93bf07c6b Matt Roper      2022-01-10  272  
c6a53c90e3be8b Lucas De Marchi 2023-02-24 @273  #define MCR_REG(offset)	((const i915_mcr_reg_t){ .reg = (offset) })
c6a53c90e3be8b Lucas De Marchi 2023-02-24  274  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096
  2023-09-21  4:27 [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096 Shekhar Chauhan
  2023-09-21  4:41 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: Add Wa_18028616096 (rev2) Patchwork
  2023-09-21  7:17 ` [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096 kernel test robot
@ 2023-09-21  8:20 ` kernel test robot
  2 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2023-09-21  8:20 UTC (permalink / raw)
  To: Shekhar Chauhan, intel-gfx; +Cc: llvm, oe-kbuild-all

Hi Shekhar,

kernel test robot noticed the following build errors:

[auto build test ERROR on drm-tip/drm-tip]

url:    https://github.com/intel-lab-lkp/linux/commits/Shekhar-Chauhan/drm-i915-Add-Wa_18028616096/20230921-122837
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link:    https://lore.kernel.org/r/20230921042727.362710-1-shekhar.chauhan%40intel.com
patch subject: [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20230921/202309211602.VPUFAm7i-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230921/202309211602.VPUFAm7i-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309211602.VPUFAm7i-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/i915/gt/intel_workarounds.c:2919:47: error: passing 'const i915_mcr_reg_t' to parameter of incompatible type 'u32' (aka 'unsigned int')
                   wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, UGM_FRAGMENT_THRESHOLD_TO_3);
                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/gt/intel_gt_regs.h:1235:40: note: expanded from macro 'UGM_FRAGMENT_THRESHOLD_TO_3'
   #define   UGM_FRAGMENT_THRESHOLD_TO_3           MCR_REG(58 - 32)
                                                   ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/i915_reg_defs.h:273:25: note: expanded from macro 'MCR_REG'
   #define MCR_REG(offset) ((const i915_mcr_reg_t){ .reg = (offset) })
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/gt/intel_workarounds.c:272:67: note: passing argument to parameter 'set' here
   wa_mcr_write_or(struct i915_wa_list *wal, i915_mcr_reg_t reg, u32 set)
                                                                     ^
   1 error generated.


vim +2919 drivers/gpu/drm/i915/gt/intel_workarounds.c

  2828	
  2829	/*
  2830	 * The workarounds in this function apply to shared registers in
  2831	 * the general render reset domain that aren't tied to a
  2832	 * specific engine.  Since all render+compute engines get reset
  2833	 * together, and the contents of these registers are lost during
  2834	 * the shared render domain reset, we'll define such workarounds
  2835	 * here and then add them to just a single RCS or CCS engine's
  2836	 * workaround list (whichever engine has the XXXX flag).
  2837	 */
  2838	static void
  2839	general_render_compute_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal)
  2840	{
  2841		struct drm_i915_private *i915 = engine->i915;
  2842		struct intel_gt *gt = engine->gt;
  2843	
  2844		add_render_compute_tuning_settings(gt, wal);
  2845	
  2846		if (GRAPHICS_VER(i915) >= 11) {
  2847			/* This is not a Wa (although referred to as
  2848			 * WaSetInidrectStateOverride in places), this allows
  2849			 * applications that reference sampler states through
  2850			 * the BindlessSamplerStateBaseAddress to have their
  2851			 * border color relative to DynamicStateBaseAddress
  2852			 * rather than BindlessSamplerStateBaseAddress.
  2853			 *
  2854			 * Otherwise SAMPLER_STATE border colors have to be
  2855			 * copied in multiple heaps (DynamicStateBaseAddress &
  2856			 * BindlessSamplerStateBaseAddress)
  2857			 *
  2858			 * BSpec: 46052
  2859			 */
  2860			wa_mcr_masked_en(wal,
  2861					 GEN10_SAMPLER_MODE,
  2862					 GEN11_INDIRECT_STATE_BASE_ADDR_OVERRIDE);
  2863		}
  2864	
  2865		if (IS_GFX_GT_IP_STEP(gt, IP_VER(12, 70), STEP_B0, STEP_FOREVER) ||
  2866		    IS_GFX_GT_IP_STEP(gt, IP_VER(12, 71), STEP_B0, STEP_FOREVER))
  2867			/* Wa_14017856879 */
  2868			wa_mcr_masked_en(wal, GEN9_ROW_CHICKEN3, MTL_DISABLE_FIX_FOR_EOT_FLUSH);
  2869	
  2870		if (IS_GFX_GT_IP_STEP(gt, IP_VER(12, 70), STEP_A0, STEP_B0) ||
  2871		    IS_GFX_GT_IP_STEP(gt, IP_VER(12, 71), STEP_A0, STEP_B0))
  2872			/*
  2873			 * Wa_14017066071
  2874			 * Wa_14017654203
  2875			 */
  2876			wa_mcr_masked_en(wal, GEN10_SAMPLER_MODE,
  2877					 MTL_DISABLE_SAMPLER_SC_OOO);
  2878	
  2879		if (IS_GFX_GT_IP_STEP(gt, IP_VER(12, 71), STEP_A0, STEP_B0))
  2880			/* Wa_22015279794 */
  2881			wa_mcr_masked_en(wal, GEN10_CACHE_MODE_SS,
  2882					 DISABLE_PREFETCH_INTO_IC);
  2883	
  2884		if (IS_GFX_GT_IP_STEP(gt, IP_VER(12, 70), STEP_A0, STEP_B0) ||
  2885		    IS_GFX_GT_IP_STEP(gt, IP_VER(12, 71), STEP_A0, STEP_B0) ||
  2886		    IS_DG2(i915)) {
  2887			/* Wa_22013037850 */
  2888			wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW,
  2889					DISABLE_128B_EVICTION_COMMAND_UDW);
  2890	
  2891			/* Wa_18017747507 */
  2892			wa_masked_en(wal, VFG_PREEMPTION_CHICKEN, POLYGON_TRIFAN_LINELOOP_DISABLE);
  2893		}
  2894	
  2895		if (IS_GFX_GT_IP_STEP(gt, IP_VER(12, 70), STEP_A0, STEP_B0) ||
  2896		    IS_GFX_GT_IP_STEP(gt, IP_VER(12, 71), STEP_A0, STEP_B0) ||
  2897		    IS_PONTEVECCHIO(i915) ||
  2898		    IS_DG2(i915)) {
  2899			/* Wa_22014226127 */
  2900			wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0, DISABLE_D8_D16_COASLESCE);
  2901		}
  2902	
  2903		if (IS_PONTEVECCHIO(i915) || IS_DG2(i915)) {
  2904			/* Wa_14015227452:dg2,pvc */
  2905			wa_mcr_masked_en(wal, GEN9_ROW_CHICKEN4, XEHP_DIS_BBL_SYSPIPE);
  2906	
  2907			/* Wa_16015675438:dg2,pvc */
  2908			wa_masked_en(wal, FF_SLICE_CS_CHICKEN2, GEN12_PERF_FIX_BALANCING_CFE_DISABLE);
  2909		}
  2910	
  2911		if (IS_DG2(i915)) {
  2912			/*
  2913			 * Wa_16011620976:dg2_g11
  2914			 * Wa_22015475538:dg2
  2915			 */
  2916			wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, DIS_CHAIN_2XSIMD8);
  2917	
  2918			/* Wa_18028616096:dg2 */
> 2919			wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, UGM_FRAGMENT_THRESHOLD_TO_3);
  2920		}
  2921	
  2922		if (IS_DG2_G11(i915)) {
  2923			/*
  2924			 * Wa_22012826095:dg2
  2925			 * Wa_22013059131:dg2
  2926			 */
  2927			wa_mcr_write_clr_set(wal, LSC_CHICKEN_BIT_0_UDW,
  2928					     MAXREQS_PER_BANK,
  2929					     REG_FIELD_PREP(MAXREQS_PER_BANK, 2));
  2930	
  2931			/* Wa_22013059131:dg2 */
  2932			wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0,
  2933					FORCE_1_SUB_MESSAGE_PER_FRAGMENT);
  2934	
  2935			/*
  2936			 * Wa_22012654132
  2937			 *
  2938			 * Note that register 0xE420 is write-only and cannot be read
  2939			 * back for verification on DG2 (due to Wa_14012342262), so
  2940			 * we need to explicitly skip the readback.
  2941			 */
  2942			wa_mcr_add(wal, GEN10_CACHE_MODE_SS, 0,
  2943				   _MASKED_BIT_ENABLE(ENABLE_PREFETCH_INTO_IC),
  2944				   0 /* write-only, so skip validation */,
  2945				   true);
  2946		}
  2947	
  2948		if (IS_XEHPSDV(i915)) {
  2949			/* Wa_1409954639 */
  2950			wa_mcr_masked_en(wal,
  2951					 GEN8_ROW_CHICKEN,
  2952					 SYSTOLIC_DOP_CLOCK_GATING_DIS);
  2953	
  2954			/* Wa_1607196519 */
  2955			wa_mcr_masked_en(wal,
  2956					 GEN9_ROW_CHICKEN4,
  2957					 GEN12_DISABLE_GRF_CLEAR);
  2958	
  2959			/* Wa_14010449647:xehpsdv */
  2960			wa_mcr_masked_en(wal, GEN8_HALF_SLICE_CHICKEN1,
  2961					 GEN7_PSD_SINGLE_PORT_DISPATCH_ENABLE);
  2962		}
  2963	}
  2964	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096
@ 2023-09-21 14:30 Shekhar Chauhan
  2023-09-21 21:01 ` Gustavo Sousa
  0 siblings, 1 reply; 12+ messages in thread
From: Shekhar Chauhan @ 2023-09-21 14:30 UTC (permalink / raw)
  To: intel-gfx

Drop UGM per set fragment threshold to 3

BSpec: 54833
Signed-off-by: Shekhar Chauhan <shekhar.chauhan@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gt_regs.h     | 1 +
 drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
index a00ff51c681d..431c575c532b 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
@@ -1230,6 +1230,7 @@
 #define   DISABLE_D8_D16_COASLESCE		REG_BIT(30)
 #define   FORCE_1_SUB_MESSAGE_PER_FRAGMENT	REG_BIT(15)
 #define LSC_CHICKEN_BIT_0_UDW			MCR_REG(0xe7c8 + 4)
+#define   UGM_FRAGMENT_THRESHOLD_TO_3		REG_BIT(58 - 32)
 #define   DIS_CHAIN_2XSIMD8			REG_BIT(55 - 32)
 #define   FORCE_SLM_FENCE_SCOPE_TO_TILE		REG_BIT(42 - 32)
 #define   FORCE_UGM_FENCE_SCOPE_TO_TILE		REG_BIT(41 - 32)
diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index 660d4f358eab..992041e3776c 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -2914,6 +2914,9 @@ general_render_compute_wa_init(struct intel_engine_cs *engine, struct i915_wa_li
 		 * Wa_22015475538:dg2
 		 */
 		wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, DIS_CHAIN_2XSIMD8);
+
+		/* Wa_18028616096:dg2 */
+		wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, UGM_FRAGMENT_THRESHOLD_TO_3);
 	}
 
 	if (IS_DG2_G11(i915)) {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096
  2023-09-21 14:30 Shekhar Chauhan
@ 2023-09-21 21:01 ` Gustavo Sousa
  2023-09-22  4:04   ` Chauhan, Shekhar
  0 siblings, 1 reply; 12+ messages in thread
From: Gustavo Sousa @ 2023-09-21 21:01 UTC (permalink / raw)
  To: Shekhar Chauhan, intel-gfx

Quoting Shekhar Chauhan (2023-09-21 11:30:28-03:00)
>Drop UGM per set fragment threshold to 3
>
>BSpec: 54833
>Signed-off-by: Shekhar Chauhan <shekhar.chauhan@intel.com>
>---
> drivers/gpu/drm/i915/gt/intel_gt_regs.h     | 1 +
> drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++
> 2 files changed, 4 insertions(+)
>
>diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
>index a00ff51c681d..431c575c532b 100644
>--- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h
>+++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
>@@ -1230,6 +1230,7 @@
> #define   DISABLE_D8_D16_COASLESCE                REG_BIT(30)
> #define   FORCE_1_SUB_MESSAGE_PER_FRAGMENT        REG_BIT(15)
> #define LSC_CHICKEN_BIT_0_UDW                        MCR_REG(0xe7c8 + 4)
>+#define   UGM_FRAGMENT_THRESHOLD_TO_3                REG_BIT(58 - 32)
> #define   DIS_CHAIN_2XSIMD8                        REG_BIT(55 - 32)
> #define   FORCE_SLM_FENCE_SCOPE_TO_TILE                REG_BIT(42 - 32)
> #define   FORCE_UGM_FENCE_SCOPE_TO_TILE                REG_BIT(41 - 32)
>diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
>index 660d4f358eab..992041e3776c 100644
>--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
>+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
>@@ -2914,6 +2914,9 @@ general_render_compute_wa_init(struct intel_engine_cs *engine, struct i915_wa_li
>                  * Wa_22015475538:dg2
>                  */
>                 wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, DIS_CHAIN_2XSIMD8);
>+
>+                /* Wa_18028616096:dg2 */

This is not a blocker, but I would prefer to remove the ":dg2" suffix.

There was an effort to remove them from our driver[1], but it kinda of
stalled. I myself agree that we would be better off without them.

[1] https://lore.kernel.org/all/20221222082557.1364711-1-lucas.demarchi@intel.com

>+                wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, UGM_FRAGMENT_THRESHOLD_TO_3);

This workaround applies to (i) DG2 G10 from stepping C0 to forever and
(ii) any stepping of DG2 G12. Here you are applying this workaround to
any variant of DG2.

It should be moved out of this "if" statement and rather be guarded by
something like:

	if ((IS_DG2_G10(i915) && IS_GRAPHICS_STEP(i915, STEP_C0, STEP_FOREVER)) ||
	    IS_DG2_G12(i915))

Note that we are there is still a pending decision for G11, so we may
need to update this in the future.

--
Gustavo Sousa

>         }
> 
>         if (IS_DG2_G11(i915)) {
>-- 
>2.34.1
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096
@ 2023-09-22  3:50 Shekhar Chauhan
  0 siblings, 0 replies; 12+ messages in thread
From: Shekhar Chauhan @ 2023-09-22  3:50 UTC (permalink / raw)
  To: intel-gfx; +Cc: matthew.d.roper

Drop UGM per set fragment threshold to 3

BSpec: 54833
Signed-off-by: Shekhar Chauhan <shekhar.chauhan@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gt_regs.h     | 1 +
 drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
index a00ff51c681d..431c575c532b 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
@@ -1230,6 +1230,7 @@
 #define   DISABLE_D8_D16_COASLESCE		REG_BIT(30)
 #define   FORCE_1_SUB_MESSAGE_PER_FRAGMENT	REG_BIT(15)
 #define LSC_CHICKEN_BIT_0_UDW			MCR_REG(0xe7c8 + 4)
+#define   UGM_FRAGMENT_THRESHOLD_TO_3		REG_BIT(58 - 32)
 #define   DIS_CHAIN_2XSIMD8			REG_BIT(55 - 32)
 #define   FORCE_SLM_FENCE_SCOPE_TO_TILE		REG_BIT(42 - 32)
 #define   FORCE_UGM_FENCE_SCOPE_TO_TILE		REG_BIT(41 - 32)
diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index 660d4f358eab..317d5d8d320e 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -2914,6 +2914,9 @@ general_render_compute_wa_init(struct intel_engine_cs *engine, struct i915_wa_li
 		 * Wa_22015475538:dg2
 		 */
 		wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, DIS_CHAIN_2XSIMD8);
+
+		/* Wa_18028616096 */
+		wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, UGM_FRAGMENT_THRESHOLD_TO_3);
 	}
 
 	if (IS_DG2_G11(i915)) {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096
  2023-09-21 21:01 ` Gustavo Sousa
@ 2023-09-22  4:04   ` Chauhan, Shekhar
  2023-09-22 12:17     ` Gustavo Sousa
  0 siblings, 1 reply; 12+ messages in thread
From: Chauhan, Shekhar @ 2023-09-22  4:04 UTC (permalink / raw)
  To: Gustavo Sousa, intel-gfx, matthew.d.roper

[-- Attachment #1: Type: text/plain, Size: 3078 bytes --]

Quoting Gustavo Sousa:

On 9/22/2023 02:31, Gustavo Sousa wrote:
> Quoting Shekhar Chauhan (2023-09-21 11:30:28-03:00)
>> Drop UGM per set fragment threshold to 3
>>
>> BSpec: 54833
>> Signed-off-by: Shekhar Chauhan<shekhar.chauhan@intel.com>
>> ---
>> drivers/gpu/drm/i915/gt/intel_gt_regs.h     | 1 +
>> drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++
>> 2 files changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
>> index a00ff51c681d..431c575c532b 100644
>> --- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h
>> +++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
>> @@ -1230,6 +1230,7 @@
>> #define   DISABLE_D8_D16_COASLESCE                REG_BIT(30)
>> #define   FORCE_1_SUB_MESSAGE_PER_FRAGMENT        REG_BIT(15)
>> #define LSC_CHICKEN_BIT_0_UDW                        MCR_REG(0xe7c8 + 4)
>> +#define   UGM_FRAGMENT_THRESHOLD_TO_3                REG_BIT(58 - 32)
>> #define   DIS_CHAIN_2XSIMD8                        REG_BIT(55 - 32)
>> #define   FORCE_SLM_FENCE_SCOPE_TO_TILE                REG_BIT(42 - 32)
>> #define   FORCE_UGM_FENCE_SCOPE_TO_TILE                REG_BIT(41 - 32)
>> diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
>> index 660d4f358eab..992041e3776c 100644
>> --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
>> +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
>> @@ -2914,6 +2914,9 @@ general_render_compute_wa_init(struct intel_engine_cs *engine, struct i915_wa_li
>>                   * Wa_22015475538:dg2
>>                   */
>>                  wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, DIS_CHAIN_2XSIMD8);
>> +
>> +                /* Wa_18028616096:dg2 */
> This is not a blocker, but I would prefer to remove the ":dg2" suffix.
>
> There was an effort to remove them from our driver[1], but it kinda of
> stalled. I myself agree that we would be better off without them.
>
> [1]https://lore.kernel.org/all/20221222082557.1364711-1-lucas.demarchi@intel.com
Ack'ed in the new version.
>
>> +                wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, UGM_FRAGMENT_THRESHOLD_TO_3);
> This workaround applies to (i) DG2 G10 from stepping C0 to forever and
> (ii) any stepping of DG2 G12. Here you are applying this workaround to
> any variant of DG2.
>
> It should be moved out of this "if" statement and rather be guarded by
> something like:
>
> 	if ((IS_DG2_G10(i915) && IS_GRAPHICS_STEP(i915, STEP_C0, STEP_FOREVER)) ||
> 	    IS_DG2_G12(i915))
>
> Note that we are there is still a pending decision for G11, so we may
> need to update this in the future.

I believe we're only supporting production steppings for DG2, 
henceforth, not really interacting with the "older" steppings.

Please have a look:

https://lore.kernel.org/intel-gfx/20230816214201.534095-7-matthew.d.roper@intel.com/

Although, I could be wrong, if I am, I'll send in another version, 
modifying the patch as you've suggested.

> --
> Gustavo Sousa
>
>>          }
>>
>>          if (IS_DG2_G11(i915)) {
>> -- 
>> 2.34.1
>>
-- 
-shekhar

[-- Attachment #2: Type: text/html, Size: 40158 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096
  2023-09-22  4:04   ` Chauhan, Shekhar
@ 2023-09-22 12:17     ` Gustavo Sousa
  0 siblings, 0 replies; 12+ messages in thread
From: Gustavo Sousa @ 2023-09-22 12:17 UTC (permalink / raw)
  To: Chauhan, Shekhar, intel-gfx, matthew.d.roper

Quoting Chauhan, Shekhar (2023-09-22 01:04:36-03:00)
>Quoting Gustavo Sousa:
>
>On 9/22/2023 02:31, Gustavo Sousa wrote:
>> Quoting Shekhar Chauhan (2023-09-21 11:30:28-03:00)
>>> Drop UGM per set fragment threshold to 3
>>>
>>> BSpec: 54833
>>> Signed-off-by: Shekhar Chauhan<shekhar.chauhan@intel.com>
>>> ---
>>> drivers/gpu/drm/i915/gt/intel_gt_regs.h     | 1 +
>>> drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +++
>>> 2 files changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
>>> index a00ff51c681d..431c575c532b 100644
>>> --- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h
>>> +++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
>>> @@ -1230,6 +1230,7 @@
>>> #define   DISABLE_D8_D16_COASLESCE                REG_BIT(30)
>>> #define   FORCE_1_SUB_MESSAGE_PER_FRAGMENT        REG_BIT(15)
>>> #define LSC_CHICKEN_BIT_0_UDW                        MCR_REG(0xe7c8 + 4)
>>> +#define   UGM_FRAGMENT_THRESHOLD_TO_3                REG_BIT(58 - 32)
>>> #define   DIS_CHAIN_2XSIMD8                        REG_BIT(55 - 32)
>>> #define   FORCE_SLM_FENCE_SCOPE_TO_TILE                REG_BIT(42 - 32)
>>> #define   FORCE_UGM_FENCE_SCOPE_TO_TILE                REG_BIT(41 - 32)
>>> diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
>>> index 660d4f358eab..992041e3776c 100644
>>> --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
>>> +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
>>> @@ -2914,6 +2914,9 @@ general_render_compute_wa_init(struct intel_engine_cs *engine, struct i915_wa_li
>>>                   * Wa_22015475538:dg2
>>>                   */
>>>                  wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, DIS_CHAIN_2XSIMD8);
>>> +
>>> +                /* Wa_18028616096:dg2 */
>> This is not a blocker, but I would prefer to remove the ":dg2" suffix.
>>
>> There was an effort to remove them from our driver[1], but it kinda of
>> stalled. I myself agree that we would be better off without them.
>>
>> [1]https://lore.kernel.org/all/20221222082557.1364711-1-lucas.demarchi@intel.com
>Ack'ed in the new version.
>>
>>> +                wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0_UDW, UGM_FRAGMENT_THRESHOLD_TO_3);
>> This workaround applies to (i) DG2 G10 from stepping C0 to forever and
>> (ii) any stepping of DG2 G12. Here you are applying this workaround to
>> any variant of DG2.
>>
>> It should be moved out of this "if" statement and rather be guarded by
>> something like:
>>
>>         if ((IS_DG2_G10(i915) && IS_GRAPHICS_STEP(i915, STEP_C0, STEP_FOREVER)) ||
>>             IS_DG2_G12(i915))
>>
>> Note that we are there is still a pending decision for G11, so we may
>> need to update this in the future.
>
>I believe we're only supporting production steppings for DG2, 
>henceforth, not really interacting with the "older" steppings.
>
>Please have a look:
>
>https://lore.kernel.org/intel-gfx/20230816214201.534095-7-matthew.d.roper@intel.com/

Oh, I missed that. Thanks!

So I believe we would have the following condition instead:

	if (IS_DG2_G10(i915) || IS_DG2_G12(i915))

, because we do not know yet if this will also apply to DG2 G11.

--
Gustavo Sousa

>
>Although, I could be wrong, if I am, I'll send in another version, 
>modifying the patch as you've suggested.
>
>> --
>> Gustavo Sousa
>>
>>>          }
>>>
>>>          if (IS_DG2_G11(i915)) {
>>> -- 
>>> 2.34.1
>>>
>-- 
>-shekhar

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-09-22 12:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-21  4:27 [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096 Shekhar Chauhan
2023-09-21  4:41 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: Add Wa_18028616096 (rev2) Patchwork
2023-09-21  7:17 ` [Intel-gfx] [PATCH] drm/i915: Add Wa_18028616096 kernel test robot
2023-09-21  8:20 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2023-09-22  3:50 Shekhar Chauhan
2023-09-21 14:30 Shekhar Chauhan
2023-09-21 21:01 ` Gustavo Sousa
2023-09-22  4:04   ` Chauhan, Shekhar
2023-09-22 12:17     ` Gustavo Sousa
2023-09-20  4:05 Shekhar Chauhan
2023-09-20  6:42 ` kernel test robot
2023-09-20 13:42 ` Gustavo Sousa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox