drm/amd/display: Add DCE_VERSION_12_1 enum for Vega 20
authorLeo Li <sunpeng.li@amd.com>
Wed, 31 Oct 2018 20:56:54 +0000 (16:56 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 18 Dec 2018 22:39:49 +0000 (17:39 -0500)
[Why]
We'll need a way to differentiate Vega 20 in DC

[How]
Add a DCE_VERSION_12_1 enum, which will be returned as the DC version if
the ASIC used is a Vega 20.

Signed-off-by: Leo Li <sunpeng.li@amd.com>
Reviewed-by: David Francis <David.Francis@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c
drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c
drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c
drivers/gpu/drm/amd/display/include/dal_types.h

index 65b006ad372ebcc0e8aaaf1521d4c6f52f8ede97..8196f3bb10c786c983a57e14bdfe92fac32c519f 100644 (file)
@@ -67,6 +67,7 @@ bool dal_bios_parser_init_cmd_tbl_helper2(
                return true;
 #endif
        case DCE_VERSION_12_0:
+       case DCE_VERSION_12_1:
                *h = dal_cmd_tbl_helper_dce112_get_table2();
                return true;
 
index c347afd1030f8e15e44e55888f48cdbe06f6fd34..76137df74a535b6d8c1609e2bb265787538ee87d 100644 (file)
@@ -83,7 +83,10 @@ enum dce_version resource_parse_asic_id(struct hw_asic_id asic_id)
                        dc_version = DCE_VERSION_11_22;
                break;
        case FAMILY_AI:
-               dc_version = DCE_VERSION_12_0;
+               if (ASICREV_IS_VEGA20_P(asic_id.hw_internal_rev))
+                       dc_version = DCE_VERSION_12_1;
+               else
+                       dc_version = DCE_VERSION_12_0;
                break;
 #if defined(CONFIG_DRM_AMD_DC_DCN1_0)
        case FAMILY_RV:
@@ -136,6 +139,7 @@ struct resource_pool *dc_create_resource_pool(
                        num_virtual_links, dc);
                break;
        case DCE_VERSION_12_0:
+       case DCE_VERSION_12_1:
                res_pool = dce120_create_resource_pool(
                        num_virtual_links, dc);
                break;
index a683f4102e657496df4f4e06b0a0fafbe35af94a..c2028c4744a6446ff9bb0b3d5b838262f8d6e35e 100644 (file)
@@ -79,6 +79,7 @@ bool dal_hw_factory_init(
                dal_hw_factory_dce110_init(factory);
                return true;
        case DCE_VERSION_12_0:
+       case DCE_VERSION_12_1:
                dal_hw_factory_dce120_init(factory);
                return true;
 #if defined(CONFIG_DRM_AMD_DC_DCN1_0)
index 096f45628630dc17052c14ecd1cc2e50cc88f0b8..236ca28784a9cf505fe2c046e8b0ded3dbcbf486 100644 (file)
@@ -76,6 +76,7 @@ bool dal_hw_translate_init(
                dal_hw_translate_dce110_init(translate);
                return true;
        case DCE_VERSION_12_0:
+       case DCE_VERSION_12_1:
                dal_hw_translate_dce120_init(translate);
                return true;
 #if defined(CONFIG_DRM_AMD_DC_DCN1_0)
index e56093f26eed9736fe117dc7391a23ac5e552161..1ad6e49102ff1ced8326098dcd9ff5c5528d47c4 100644 (file)
@@ -90,6 +90,7 @@ struct i2caux *dal_i2caux_create(
        case DCE_VERSION_10_0:
                return dal_i2caux_dce100_create(ctx);
        case DCE_VERSION_12_0:
+       case DCE_VERSION_12_1:
                return dal_i2caux_dce120_create(ctx);
 #if defined(CONFIG_DRM_AMD_DC_DCN1_0)
        case DCN_VERSION_1_0:
index 89627133e188574addf79377073be66a0a7ec062..f5bd869d4320bdd6f552d1344e025372d15d4e21 100644 (file)
@@ -42,6 +42,7 @@ enum dce_version {
        DCE_VERSION_11_2,
        DCE_VERSION_11_22,
        DCE_VERSION_12_0,
+       DCE_VERSION_12_1,
        DCE_VERSION_MAX,
        DCN_VERSION_1_0,
 #if defined(CONFIG_DRM_AMD_DC_DCN1_01)