Skip to contentSkip to conversation

drm/amdgpu: update golden regs for gfx12

PATCH In review Min, Frank 2 participants 2 messages Sep 5, 2024 – Sep 6, 2024 4 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

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

A message that is not in the archive (sent off-list or not yet received): SN7PR12MB6932F0EE6B6551AA1263C2D1E99C2@SN7PR12MB6932.namprd12.prod.outlook.com

A message that is not in the archive (sent off-list or not yet received): SN7PR12MB69326E152F81556F0DBD4906E99C2@SN7PR12MB6932.namprd12.prod.outlook.com

A message that is not in the archive (sent off-list or not yet received): DM4PR12MB51819C8A7CF5C6AF899620D8EF9D2@DM4PR12MB5181.namprd12.prod.outlook.com

Min, Frank

author
#4 lore raw

PATCH 1/1 drm/amdgpu: update golden regs for gfx12

[AMD Official Use Only - AMD Internal Distribution Only]

From: Frank Min <[email protected]>

update golden regs for gfx12

---
 drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +5 -1
index d1357c01eb39..47b47d21f464 100644
@@ -202,12 +202,16 @@ static const struct amdgpu_hwip_reg_entry gc_gfx_queue_reg_list_12[] = {
        SOC15_REG_ENTRY_STR(GC, 0, regCP_IB1_BUFSZ)  };
 
-static const struct soc15_reg_golden golden_settings_gc_12_0[] = {
+static const struct soc15_reg_golden golden_settings_gc_12_0_rev0[] = {
        SOC15_REG_GOLDEN_VALUE(GC, 0, regDB_MEM_CONFIG, 0x0000000f, 0x0000000f),
        SOC15_REG_GOLDEN_VALUE(GC, 0, regCB_HW_CONTROL_1, 0x03000000, 0x03000000),
        SOC15_REG_GOLDEN_VALUE(GC, 0, regGL2C_CTRL5, 0x00000070, 0x00000020)  };
 
+static const struct soc15_reg_golden golden_settings_gc_12_0[] = {
+       SOC15_REG_GOLDEN_VALUE(GC, 0, regDB_MEM_CONFIG, 0x00008000,
+0x00008000), };
+
 #define DEFAULT_SH_MEM_CONFIG \
        ((SH_MEM_ADDRESS_MODE_64 << SH_MEM_CONFIG__ADDRESS_MODE__SHIFT) | \
         (SH_MEM_ALIGNMENT_MODE_UNALIGNED << SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT) | \ @@ -3495,10 +3499,14 @@ static void gfx_v12_0_init_golden_registers(struct amdgpu_device *adev)
        switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
        case IP_VERSION(12, 0, 0):
        case IP_VERSION(12, 0, 1):

+ soc15_program_register_sequence(adev,
+ golden_settings_gc_12_0,
+ (const
+ u32)ARRAY_SIZE(golden_settings_gc_12_0));
+

                if (adev->rev_id == 0)
                        soc15_program_register_sequence(adev,
-                                       golden_settings_gc_12_0,
-                                       (const u32)ARRAY_SIZE(golden_settings_gc_12_0));
+                                       golden_settings_gc_12_0_rev0,
+                                       (const
+ u32)ARRAY_SIZE(golden_settings_gc_12_0_rev0));
                break;
        default:
                break;

--
2.43.0

Reviewed-by on v1 1/1
#5 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Regards,
Hawking
-----Original Message-----
From: Min, Frank <[email protected]>
Sent: Thursday, September 5, 2024 23:23
To: [email protected]
Cc: Gao, Likun <[email protected]>; Zhang, Hawking <[email protected]>
Subject: [PATCH] drm/amdgpu: update golden regs for gfx12

[AMD Official Use Only - AMD Internal Distribution Only]

From: Frank Min <[email protected]>

update golden regs for gfx12

---
 drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +5 -1
index d1357c01eb39..47b47d21f464 100644
@@ -202,12 +202,16 @@ static const struct amdgpu_hwip_reg_entry gc_gfx_queue_reg_list_12[] = {
        SOC15_REG_ENTRY_STR(GC, 0, regCP_IB1_BUFSZ)  };
 
-static const struct soc15_reg_golden golden_settings_gc_12_0[] = {
+static const struct soc15_reg_golden golden_settings_gc_12_0_rev0[] = {
        SOC15_REG_GOLDEN_VALUE(GC, 0, regDB_MEM_CONFIG, 0x0000000f, 0x0000000f),
        SOC15_REG_GOLDEN_VALUE(GC, 0, regCB_HW_CONTROL_1, 0x03000000, 0x03000000),
        SOC15_REG_GOLDEN_VALUE(GC, 0, regGL2C_CTRL5, 0x00000070, 0x00000020)  };
 
+static const struct soc15_reg_golden golden_settings_gc_12_0[] = {
+       SOC15_REG_GOLDEN_VALUE(GC, 0, regDB_MEM_CONFIG, 0x00008000,
+0x00008000), };
+
 #define DEFAULT_SH_MEM_CONFIG \
        ((SH_MEM_ADDRESS_MODE_64 << SH_MEM_CONFIG__ADDRESS_MODE__SHIFT) | \
         (SH_MEM_ALIGNMENT_MODE_UNALIGNED << SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT) | \ @@ -3495,10 +3499,14 @@ static void gfx_v12_0_init_golden_registers(struct amdgpu_device *adev)
        switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
        case IP_VERSION(12, 0, 0):
        case IP_VERSION(12, 0, 1):

+ soc15_program_register_sequence(adev,
+ golden_settings_gc_12_0,
+ (const
+ u32)ARRAY_SIZE(golden_settings_gc_12_0));
+

                if (adev->rev_id == 0)
                        soc15_program_register_sequence(adev,
-                                       golden_settings_gc_12_0,
-                                       (const u32)ARRAY_SIZE(golden_settings_gc_12_0));
+                                       golden_settings_gc_12_0_rev0,
+                                       (const
+ u32)ARRAY_SIZE(golden_settings_gc_12_0_rev0));
                break;
        default:
                break;

--
2.43.0