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/umsch_mm_v4_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/umsch_mm_v4_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c b/drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c index 67164991f541..99713949b61f 100644 --- a/drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c +++ b/drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c @@ -273,14 +273,15 @@ static int umsch_mm_v4_0_set_hw_resources(struct amdgpu_umsch_mm *umsch) memcpy(set_hw_resources.mmhub_base, adev->reg_offset[MMHUB_HWIP][0], sizeof(uint32_t) * 5); - set_hw_resources.mmhub_version = adev->ip_versions[MMHUB_HWIP][0]; + set_hw_resources.mmhub_version = amdgpu_ip_version(adev, MMHUB_HWIP, 0); memcpy(set_hw_resources.osssys_base, adev->reg_offset[OSSSYS_HWIP][0], sizeof(uint32_t) * 5); - set_hw_resources.osssys_version = adev->ip_versions[OSSSYS_HWIP][0]; + set_hw_resources.osssys_version = + amdgpu_ip_version(adev, OSSSYS_HWIP, 0); - set_hw_resources.vcn_version = adev->ip_versions[VCN_HWIP][0]; - set_hw_resources.vpe_version = adev->ip_versions[VPE_HWIP][0]; + set_hw_resources.vcn_version = amdgpu_ip_version(adev, VCN_HWIP, 0); + set_hw_resources.vpe_version = amdgpu_ip_version(adev, VPE_HWIP, 0); set_hw_resources.api_status.api_completion_fence_addr = umsch->ring.fence_drv.gpu_addr; set_hw_resources.api_status.api_completion_fence_value = ++umsch->ring.fence_drv.sync_seq; |