Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display/dc: add DCE_VERSION for DCE8 APUs

DCE 8.1 = Kaveri
DCE 8.3 = Kabini/Mullins

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Alex Deucher and committed by
Alex Deucher
ebfdf0d0 ea062558

+28 -1
+2
drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c
··· 37 37 { 38 38 switch (dce) { 39 39 case DCE_VERSION_8_0: 40 + case DCE_VERSION_8_1: 41 + case DCE_VERSION_8_3: 40 42 *h = dal_cmd_tbl_helper_dce80_get_table(); 41 43 return true; 42 44
+2
drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c
··· 39 39 { 40 40 switch (dce) { 41 41 case DCE_VERSION_8_0: 42 + case DCE_VERSION_8_1: 43 + case DCE_VERSION_8_3: 42 44 *h = dal_cmd_tbl_helper_dce80_get_table(); 43 45 return true; 44 46
+10 -1
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
··· 50 50 switch (asic_id.chip_family) { 51 51 52 52 case FAMILY_CI: 53 - case FAMILY_KV: 54 53 dc_version = DCE_VERSION_8_0; 54 + break; 55 + case FAMILY_KV: 56 + if (ASIC_REV_IS_KALINDI(asic_id.hw_internal_rev) || 57 + ASIC_REV_IS_BHAVANI(asic_id.hw_internal_rev) || 58 + ASIC_REV_IS_GODAVARI(asic_id.hw_internal_rev)) 59 + dc_version = DCE_VERSION_8_3; 60 + else 61 + dc_version = DCE_VERSION_8_1; 55 62 break; 56 63 case FAMILY_CZ: 57 64 dc_version = DCE_VERSION_11_0; ··· 101 94 102 95 switch (dc_version) { 103 96 case DCE_VERSION_8_0: 97 + case DCE_VERSION_8_1: 98 + case DCE_VERSION_8_3: 104 99 res_pool = dce80_create_resource_pool( 105 100 num_virtual_links, dc); 106 101 break;
+6
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
··· 578 578 579 579 switch (cs->ctx->dce_version) { 580 580 case DCE_VERSION_8_0: 581 + case DCE_VERSION_8_1: 582 + case DCE_VERSION_8_3: 581 583 case DCE_VERSION_10_0: 582 584 case DCE_VERSION_11_0: 583 585 pll_calc_error = ··· 864 862 865 863 switch (clock_source->ctx->dce_version) { 866 864 case DCE_VERSION_8_0: 865 + case DCE_VERSION_8_1: 866 + case DCE_VERSION_8_3: 867 867 case DCE_VERSION_10_0: 868 868 case DCE_VERSION_11_0: 869 869 bp_pc_params.reference_divider = pll_settings->reference_divider; ··· 1213 1209 1214 1210 switch (clk_src->base.ctx->dce_version) { 1215 1211 case DCE_VERSION_8_0: 1212 + case DCE_VERSION_8_1: 1213 + case DCE_VERSION_8_3: 1216 1214 case DCE_VERSION_10_0: 1217 1215 case DCE_VERSION_11_0: 1218 1216
+2
drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c
··· 66 66 67 67 switch (dce_version) { 68 68 case DCE_VERSION_8_0: 69 + case DCE_VERSION_8_1: 70 + case DCE_VERSION_8_3: 69 71 dal_hw_factory_dce80_init(factory); 70 72 return true; 71 73
+2
drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c
··· 65 65 66 66 switch (dce_version) { 67 67 case DCE_VERSION_8_0: 68 + case DCE_VERSION_8_1: 69 + case DCE_VERSION_8_3: 68 70 dal_hw_translate_dce80_init(translate); 69 71 return true; 70 72 case DCE_VERSION_10_0:
+2
drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c
··· 79 79 80 80 switch (ctx->dce_version) { 81 81 case DCE_VERSION_8_0: 82 + case DCE_VERSION_8_1: 83 + case DCE_VERSION_8_3: 82 84 return dal_i2caux_dce80_create(ctx); 83 85 case DCE_VERSION_11_2: 84 86 return dal_i2caux_dce112_create(ctx);
+2
drivers/gpu/drm/amd/display/include/dal_types.h
··· 35 35 enum dce_version { 36 36 DCE_VERSION_UNKNOWN = (-1), 37 37 DCE_VERSION_8_0, 38 + DCE_VERSION_8_1, 39 + DCE_VERSION_8_3, 38 40 DCE_VERSION_10_0, 39 41 DCE_VERSION_11_0, 40 42 DCE_VERSION_11_2,