drm/amdgpu: retire ip init code specific for A0 rev
Subsystems (2)
PATCH 1/2 drm/amdgpu: retire ip init code specific for A0 rev
For aqua_vanjaram, A0 HW is retired so remove the code specific for it in gfx ip init.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +1 -12
@@ -351,18 +351,7 @@ static void gfx_v9_4_3_init_golden_registers(struct amdgpu_device *adev)WREG32_SOC15 (GC , dev_inst, regGB_ADDR_CONFIG,GOLDEN_GB_ADDR_CONFIG ); -if (amdgpu_ip_version (adev,GC_HWIP ,0 ) ==IP_VERSION (9 ,5 ,0 )) { -WREG32_FIELD15_PREREG (GC , dev_inst,TCP_UTCL1_CNTL2 ,SPARE ,0x1 ); - }else { -/* Golden settings applied by driver for ASIC with rev_id 0 */ -if (adev->rev_id ==0 ) { -WREG32_FIELD15_PREREG (GC , dev_inst,TCP_UTCL1_CNTL1 , -REDUCE_FIFO_DEPTH_BY_2 ,2 ); - }else { -WREG32_FIELD15_PREREG (GC , dev_inst,TCP_UTCL1_CNTL2 , -SPARE ,0x1 ); - } - } +WREG32_FIELD15_PREREG (GC , dev_inst,TCP_UTCL1_CNTL2 ,SPARE ,0x1 ); } }
Signature · 1 line
2.34.1
PATCH 2/2 drm/amdgpu: fix the gb_addr_config_fields init value mismatch
For gfx_v9_4_3 specifically, before regGB_ADDR_CONFIG is overwritten in gfx hw_init it is read out to popluate the gb_addr_config_fields in the sw_init stage, which causes mismatch.
Fix it temporarily by using the golden value in sw_init as well. The final fix should be by vBIOS/IFWI.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +1 -5
@@ -918,8 +918,6 @@ static const struct aca_info gfx_v9_4_3_aca_info = {static int gfx_v9_4_3_gpu_early_init (struct amdgpu_device *adev) { -u32 gb_addr_config; - adev->gfx.funcs = &gfx_v9_4_3_gfx_funcs; adev->gfx.ras = &gfx_v9_4_3_ras;
@@ -928,9 +926,7 @@ static int gfx_v9_4_3_gpu_early_init(struct amdgpu_device *adev) adev->gfx.config.sc_prim_fifo_size_backend =0x100 ; adev->gfx.config.sc_hiz_tile_fifo_size =0x30 ; adev->gfx.config.sc_earlyz_tile_fifo_size =0x4C0 ; - gb_addr_config =RREG32_SOC15 (GC ,GET_INST (GC ,0 ), regGB_ADDR_CONFIG); - - adev->gfx.config.gb_addr_config = gb_addr_config; + adev->gfx.config.gb_addr_config =GOLDEN_GB_ADDR_CONFIG ; adev->gfx.config.gb_addr_config_fields.num_pipes =1 << REG_GET_FIELD(
Signature · 1 line
2.34.1
Re: [PATCH 2/2] drm/amdgpu: fix the gb_addr_config_fields init value mismatch
Quoted 5 lines · Shiwu Zhang
For
gfx_v9_4_3specifically, beforeregGB_ADDR_CONFIGis overwritten in gfxhw_initit is read out to popluate thegb_addr_config_fieldsin thesw_initstage, which causes mismatch.Fix it temporarily by using the golden value in
sw_initas well.
sw_init => early_init
Quoted 1 line
The final fix should be by vBIOS/IFWI.
This is supposed to be a driver-set golden reg. Most likely will remain this way.
Series is -
Thanks,
Lijo
Quoted 30 lines
Signed-off-by Shiwu Zhang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +1
-5@@ -918,8 +918,6 @@ static const struct aca_info gfx_v9_4_3_aca_info = {static int gfx_v9_4_3_gpu_early_init (struct amdgpu_device *adev) { -u32 gb_addr_config; - adev->gfx.funcs = &gfx_v9_4_3_gfx_funcs; adev->gfx.ras = &gfx_v9_4_3_ras;@@ -928,9 +926,7 @@ static int gfx_v9_4_3_gpu_early_init(struct amdgpu_device *adev) adev->gfx.config.sc_prim_fifo_size_backend =0x100 ; adev->gfx.config.sc_hiz_tile_fifo_size =0x30 ; adev->gfx.config.sc_earlyz_tile_fifo_size =0x4C0 ; - gb_addr_config =RREG32_SOC15 (GC ,GET_INST (GC ,0 ), regGB_ADDR_CONFIG); - - adev->gfx.config.gb_addr_config = gb_addr_config; + adev->gfx.config.gb_addr_config =GOLDEN_GB_ADDR_CONFIG ; adev->gfx.config.gb_addr_config_fields.num_pipes =1 << REG_GET_FIELD(
RE: [PATCH 2/2] drm/amdgpu: fix the gb_addr_config_fields init value mismatch
[AMD Official Use Only - AMD Internal Distribution Only]
Thanks @Lazar, Lijo<mailto:[email protected]> for the review.
And initializing the gb_addr_config_fields is part of sw_init although the callback has the name of early_init in it.
Will remove the part of " Fix it temporarily by using the golden value in sw_init as well." in comment.
Quoted 125 lines
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Wednesday, March 5, 2025 4:02 PM
To: Zhang, Morris <[email protected]>; Ma, Le <[email protected]>; Zhang,
Hawking <[email protected]>; [email protected]
Subject: Re: [PATCH 2/2] drm/amdgpu: fix the
gb_addr_config_fieldsinit valuemismatch
Quoted 9 lines · Shiwu Zhang
For
gfx_v9_4_3specifically, beforeregGB_ADDR_CONFIGis overwrittenin gfx
hw_initit is read out to popluate thegb_addr_config_fieldsinthe
sw_initstage, which causes mismatch.Fix it temporarily by using the golden value in
sw_initas well.
sw_init=>early_initQuoted 1 line
The final fix should be by vBIOS/IFWI.
This is supposed to be a driver-set golden reg. Most likely will remain this way.
Series is -
Thanks,
Lijo
Review static int gfx_v9_4_3_gpu_early_init(struct
Quoted 41 lines
---
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 6 +-----1 file changed, 1 insertion(+), 5 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.cindex
2705f0cdd6da..af9b784eb78d100644---
a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c+++
b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c(quoted diff) +0
-2@@ -918,8 +918,6 @@ static const struct aca_info gfx_v9_4_3_aca_info = { static int gfx_v9_4_3_gpu_early_init(struct amdgpu_device *adev) { - u32 gb_addr_config; - adev->gfx.funcs = &gfx_v9_4_3_gfx_funcs; adev->gfx.ras = &gfx_v9_4_3_ras;@@ -928,9 +926,7 @@ static int gfx_v9_4_3_gpu_early_init(struct
amdgpu_device*adev)drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c static int gfx_v9_4_3_gpu_early_init(struct amdgpu_device *adev)
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +0
-1adev->gfx.config.sc_prim_fifo_size_backend =0x100 ; adev->gfx.config.sc_hiz_tile_fifo_size =0x30 ; adev->gfx.config.sc_earlyz_tile_fifo_size =0x4C0 ; - gb_addr_config = RREG32_SOC15(GC, GET_INST(GC, 0),
regGB_ADDR_CONFIG);Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +1
-2- - adev->gfx.config.gb_addr_config = gb_addr_config; + adev->gfx.config.gb_addr_config =GOLDEN_GB_ADDR_CONFIG ; adev->gfx.config.gb_addr_config_fields.num_pipes =1 << REG_GET_FIELD(