drm/amdgpu/soc15: fix using ip discovery tables on renoir (v2)
Subsystems (2)
PATCH 1/1 drm/amdgpu/soc15: fix using ip discovery tables on renoir (v2)
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.
v2: PWR became SMUIO block 1. fix the mapping.
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc15.c +3 -0
@@ -686,6 +686,9 @@ 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 and became SMUIO block 1 */ + adev->reg_offset[PWR_HWIP ][0 ] = adev->reg_offset[SMUIO_HWIP ][1 ]; } }break ;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Friday, June 5, 2020 11:40 PM
To: [email protected]; Liang, Prike <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/soc15: fix using ip discovery tables on renoir (v2)
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.
v2: PWR became SMUIO block 1. fix the mapping.
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc15.c +3 -0
@@ -686,6 +686,9 @@ 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 and became SMUIO block 1 */ +adev->reg_offset[PWR_HWIP ][0 ] = adev->reg_offset[SMUIO_HWIP ][1 ]; } }break ;
--
2.25.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cevan.quan%40amd.com%7C3f359d67aa2d42c7f53d08d80966d087%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637269684501531639&sdata=K5%2BV%2Bo5cBNSAVgDk8NHQ%2F46YiRVB5rbbk6wy%2BSL9RM4%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
According to reg_offset assignment in amdgpu_discovery_reg_base_init() the reg_offset is calculated as IP base address pointer therefore PWR IP base should be map to adev->reg_offset[SMUIO_HWIP][0] + 1. Moreover, not sure whether can use/need the mapped address to access PWR_MISC_CNTL_STATUS for controlling the GFX CGPG in Renoir.
Base on the above modify the PWR IP access nullptr issue should can be fix, but should hold on this patch since start X will be occur other nullptr issue during amdgpu_info_ioctl().
Thanks,
Prike
Quoted 33 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Friday, June 5, 2020 11:40 PM
To: [email protected]; Liang, Prike <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/soc15: fix using ip discovery tables on renoir (v2)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.
v2: PWR became SMUIO block 1. fix the mapping.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/soc15.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/amd/amdgpu/soc15.c +0
-0@@ -686,6 +686,9 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev) DRM_WARN("failed to init reg base from ipdiscovery table, "
"fallback to legacy init method\n");
vega10_reg_base_init(adev);drivers/gpu/drm/amd/amdgpu/soc15.c +2
-0+}else { +/* PWR block was merged into SMUIO on renoir and became SMUIO block 1 */
+adev->reg_offset[PWR_HWIP][0] = adev-
Quoted 6 lines
Quoted 1 line
reg_offset[SMUIO_HWIP][1];
}
}
break;
--
2.25.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Regards the gpu info inquire failed during start X, have sent a following fix for the issue.
drm/amdgpu/soc15: fix nullptr issue in soc15_read_register() for reg base accessing
Quoted 48 lines
-----Original Message-----
From: Liang, Prike
Sent: Monday, June 8, 2020 2:00 PM
To: Alex Deucher <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: RE: [PATCH] drm/amdgpu/soc15: fix using ip discovery tables on renoir (v2)According to
reg_offsetassignment inamdgpu_discovery_reg_base_init()thereg_offsetis calculated as IP base address pointer therefore PWR IP base should be map to adev->reg_offset[SMUIO_HWIP][0] + 1. Moreover, not sure whether can use/need the mapped address to accessPWR_MISC_CNTL_STATUSfor controlling the GFX CGPG in Renoir.Base on the above modify the PWR IP access nullptr issue should can be fix, but should hold on this patch since start X will be occur other nullptr issue during
amdgpu_info_ioctl().Thanks,
PrikeQuoted 9 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Friday, June 5, 2020 11:40 PM
To: [email protected]; Liang, Prike <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/soc15: fix using ip discovery tables on renoir
(v2)Quoted 3 lines
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.
drivers/gpu/drm/amd/amdgpu/soc15.c int soc15_set_ip_blocks(struct amdgpu_device
Quoted 14 lines
v2: PWR became SMUIO block 1. fix the mapping.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/soc15.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/amd/amdgpu/soc15.c +0
-0@@ -686,6 +686,9 @@ int soc15_set_ip_blocks(struct amdgpu_device*adev)
Quoted 14 lines
drivers/gpu/drm/amd/amdgpu/soc15.c int soc15_set_ip_blocks(struct amdgpu_device · line 686
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/soc15.c +0
-0DRM_WARN("failed to init reg base from ipdiscovery table, "
Quoted 12 lines
drivers/gpu/drm/amd/amdgpu/soc15.c +2
-0"fallback to legacy init method\n");vega10_reg_base_init (adev); +}else { +/* PWR block was merged into SMUIO on renoir and became SMUIO block 1 */
+adev->reg_offset[PWR_HWIP][0] = adev-Quoted 1 line
reg_offset[SMUIO_HWIP][1];
}
}
break;
--
2.25.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx