diff options
| author | Lijo Lazar <lijo.lazar@amd.com> | 2023-09-11 13:48:11 +0530 | 
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2023-09-20 12:23:28 -0400 | 
| commit | 4e8303cf2c4dd27374a16a8881ec1a1cd5baf86f (patch) | |
| tree | 1b95c903467e89eec1b8dacdc9f776a838bb3423 /drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | |
| parent | addd7aef251cca374cef743824cc5ae230370bd0 (diff) | |
drm/amdgpu: Use function for IP version check
Use an inline function for version check. Gives more flexibility to
handle any format changes.
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/psp_v13_0.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c index 469eed084976..54008a8991fc 100644 --- a/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c +++ b/drivers/gpu/drm/amd/amdgpu/psp_v13_0.c @@ -79,7 +79,7 @@ static int psp_v13_0_init_microcode(struct psp_context *psp)  	amdgpu_ucode_ip_version_decode(adev, MP0_HWIP, ucode_prefix, sizeof(ucode_prefix)); -	switch (adev->ip_versions[MP0_HWIP][0]) { +	switch (amdgpu_ip_version(adev, MP0_HWIP, 0)) {  	case IP_VERSION(13, 0, 2):  		err = psp_init_sos_microcode(psp, ucode_prefix);  		if (err) @@ -181,7 +181,7 @@ static int psp_v13_0_wait_for_bootloader_steady_state(struct psp_context *psp)  {  	struct amdgpu_device *adev = psp->adev; -	if (adev->ip_versions[MP0_HWIP][0] == IP_VERSION(13, 0, 6)) { +	if (amdgpu_ip_version(adev, MP0_HWIP, 0) == IP_VERSION(13, 0, 6)) {  		psp_v13_0_wait_for_vmbx_ready(psp);  		return psp_v13_0_wait_for_bootloader(psp); @@ -728,7 +728,7 @@ static int psp_v13_0_fatal_error_recovery_quirk(struct psp_context *psp)  {  	struct amdgpu_device *adev = psp->adev; -	if (adev->ip_versions[MP0_HWIP][0] == IP_VERSION(13, 0, 10)) { +	if (amdgpu_ip_version(adev, MP0_HWIP, 0) == IP_VERSION(13, 0, 10)) {  		uint32_t  reg_data;  		/* MP1 fatal error: trigger PSP dram read to unhalt PSP  		 * during MP1 triggered sync flood. | 
