drm/amdgpu/soc15: fix using ip discovery tables on renoir
Subsystems (2)
PATCH 1/1 drm/amdgpu/soc15: fix using ip discovery tables on renoir
The PWR block moved into SMUIO, so the ip discovery table doesn't have an entry for PWR, but the register has the same absolute offset, so just patch up the offsets after updating the offsets from the IP discovery table.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +5 -1
@@ -670,7 +670,7 @@ static uint32_t soc15_get_rev_id(struct amdgpu_device *adev)int soc15_set_ip_blocks (struct amdgpu_device *adev) { -int r; +int r, i;/* Set IP register base before any HW register access */ switch (adev->asic_type) {
@@ -686,6 +686,10 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)DRM_WARN ("failed to init reg base from ip discovery table, " "fallback to legacy init method\n" );vega10_reg_base_init (adev); + }else { +/* PWR block was merged into SMUIO on renoir */ +for (i =0 ; i <HWIP_MAX_INSTANCE ; ++i) + adev->reg_offset[PWR_HWIP ][i] = adev->reg_offset[SMUIO_HWIP ][i]; } }break ;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 7 lines · Alex Deucher
The PWR block moved into SMUIO, so the ip discovery table doesn't have an entry for PWR, but the register has the same absolute offset, so just patch up the offsets after updating the offsets from the IP discovery table.
Signed-off-by Alex Deucher <[email protected]>
Nevermind. this won't work.
Quoted 29 lines
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/soc15.c +5
-2@@ -670,7 +670,7 @@ static uint32_t soc15_get_rev_id(struct amdgpu_device *adev)int soc15_set_ip_blocks (struct amdgpu_device *adev) { -int r; +int r, i;/* Set IP register base before any HW register access */ switch (adev->asic_type) {@@ -686,6 +686,10 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)DRM_WARN ("failed to init reg base from ip discovery table, " "fallback to legacy init method\n" );vega10_reg_base_init (adev); + }else { +/* PWR block was merged into SMUIO on renoir */ +for (i =0 ; i <HWIP_MAX_INSTANCE ; ++i) + adev->reg_offset[PWR_HWIP ][i] = adev->reg_offset[SMUIO_HWIP ][i]; } }break ; --
Quoted 2 lines
2.25.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx