Commit 559f591d authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/display/dm: convert RAVEN to IP version checking

Use IP versions rather than asic_type to differentiate
IP version specific features.
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f7f12b25
...@@ -1342,7 +1342,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) ...@@ -1342,7 +1342,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
switch (adev->asic_type) { switch (adev->asic_type) {
case CHIP_CARRIZO: case CHIP_CARRIZO:
case CHIP_STONEY: case CHIP_STONEY:
case CHIP_RAVEN:
init_data.flags.gpu_vm_support = true; init_data.flags.gpu_vm_support = true;
break; break;
default: default:
...@@ -1352,6 +1351,8 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) ...@@ -1352,6 +1351,8 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
if (ASICREV_IS_GREEN_SARDINE(adev->external_rev_id)) if (ASICREV_IS_GREEN_SARDINE(adev->external_rev_id))
init_data.flags.disable_dmcu = true; init_data.flags.disable_dmcu = true;
break; break;
case IP_VERSION(1, 0, 0):
case IP_VERSION(1, 0, 1):
case IP_VERSION(3, 0, 1): case IP_VERSION(3, 0, 1):
case IP_VERSION(3, 1, 2): case IP_VERSION(3, 1, 2):
case IP_VERSION(3, 1, 3): case IP_VERSION(3, 1, 3):
...@@ -4189,17 +4190,11 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev) ...@@ -4189,17 +4190,11 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
goto fail; goto fail;
} }
break; break;
#if defined(CONFIG_DRM_AMD_DC_DCN)
case CHIP_RAVEN:
if (dcn10_register_irq_handlers(dm->adev)) {
DRM_ERROR("DM: Failed to initialize IRQ\n");
goto fail;
}
break;
#endif
default: default:
#if defined(CONFIG_DRM_AMD_DC_DCN) #if defined(CONFIG_DRM_AMD_DC_DCN)
switch (adev->ip_versions[DCE_HWIP]) { switch (adev->ip_versions[DCE_HWIP]) {
case IP_VERSION(1, 0, 0):
case IP_VERSION(1, 0, 1):
case IP_VERSION(2, 0, 2): case IP_VERSION(2, 0, 2):
case IP_VERSION(2, 0, 3): case IP_VERSION(2, 0, 3):
case IP_VERSION(2, 0, 0): case IP_VERSION(2, 0, 0):
...@@ -4367,13 +4362,6 @@ static int dm_early_init(void *handle) ...@@ -4367,13 +4362,6 @@ static int dm_early_init(void *handle)
adev->mode_info.num_hpd = 6; adev->mode_info.num_hpd = 6;
adev->mode_info.num_dig = 6; adev->mode_info.num_dig = 6;
break; break;
#if defined(CONFIG_DRM_AMD_DC_DCN)
case CHIP_RAVEN:
adev->mode_info.num_crtc = 4;
adev->mode_info.num_hpd = 4;
adev->mode_info.num_dig = 4;
break;
#endif
default: default:
#if defined(CONFIG_DRM_AMD_DC_DCN) #if defined(CONFIG_DRM_AMD_DC_DCN)
switch (adev->ip_versions[DCE_HWIP]) { switch (adev->ip_versions[DCE_HWIP]) {
...@@ -4395,6 +4383,8 @@ static int dm_early_init(void *handle) ...@@ -4395,6 +4383,8 @@ static int dm_early_init(void *handle)
adev->mode_info.num_hpd = 2; adev->mode_info.num_hpd = 2;
adev->mode_info.num_dig = 2; adev->mode_info.num_dig = 2;
break; break;
case IP_VERSION(1, 0, 0):
case IP_VERSION(1, 0, 1):
case IP_VERSION(3, 0, 1): case IP_VERSION(3, 0, 1):
case IP_VERSION(2, 1, 0): case IP_VERSION(2, 1, 0):
case IP_VERSION(3, 1, 2): case IP_VERSION(3, 1, 2):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment