diff options
author | Lijo Lazar <lijo.lazar@amd.com> | 2023-12-01 17:13:46 +0530 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-12-13 15:09:53 -0500 |
commit | ed342a2e78c4e4a8d82c2d19c95e8a3eb092c0d0 (patch) | |
tree | 5854931d7e86d2d7a9b2b7ea7f3d3f8c892af775 /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | |
parent | 9342a9ae54ef299ffe5e4ce3d0be6a4da5edba0e (diff) |
drm/amdgpu: Use the right method to get IP version
Replace direct usage of adev->ip_versions with amdgpu_ip_version.
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@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/display/amdgpu_dm/amdgpu_dm.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 80346bebb7fc..e819d05755b3 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1712,7 +1712,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) init_data.clk_reg_offsets = adev->reg_offset[CLK_HWIP][0]; /* Enable DWB for tested platforms only */ - if (adev->ip_versions[DCE_HWIP][0] >= IP_VERSION(3, 0, 0)) + if (amdgpu_ip_version(adev, DCE_HWIP, 0) >= IP_VERSION(3, 0, 0)) init_data.num_virtual_links = 1; INIT_LIST_HEAD(&adev->dm.da_list); @@ -8939,7 +8939,7 @@ static void dm_set_writeback(struct amdgpu_display_manager *dm, } wb_info->mcif_buf_params.p_vmid = 1; - if (adev->ip_versions[DCE_HWIP][0] >= IP_VERSION(3, 0, 0)) { + if (amdgpu_ip_version(adev, DCE_HWIP, 0) >= IP_VERSION(3, 0, 0)) { wb_info->mcif_warmup_params.start_address.quad_part = afb->address; wb_info->mcif_warmup_params.region_size = wb_info->mcif_buf_params.luma_pitch * wb_info->dwb_params.dest_height; @@ -9891,7 +9891,8 @@ static bool should_reset_plane(struct drm_atomic_state *state, * TODO: Remove this hack for all asics once it proves that the * fast updates works fine on DCN3.2+. */ - if (adev->ip_versions[DCE_HWIP][0] < IP_VERSION(3, 2, 0) && state->allow_modeset) + if (amdgpu_ip_version(adev, DCE_HWIP, 0) < IP_VERSION(3, 2, 0) && + state->allow_modeset) return true; /* Exit early if we know that we're adding or removing the plane. */ |