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

drm/amd/display: dc/core: add SI/DCE6 support (v2)

[Why]
resource_parse_asic_id() and dc_create_resource_pool() are missing SI/DCE6 cases

[How]
SI/DCE6 cases support added using existing DCE8 implementation as a reference

(v2) updated due to following kernel 5.2 commit:
d9673c9 ("drm/amd/display: Pass init_data into DCN resource creation")

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Mauro Rossi and committed by
Alex Deucher
683b5950 7c15fd86

+29
+29
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
··· 42 42 #include "virtual/virtual_stream_encoder.h" 43 43 #include "dpcd_defs.h" 44 44 45 + #if defined(CONFIG_DRM_AMD_DC_SI) 46 + #include "dce60/dce60_resource.h" 47 + #endif 45 48 #include "dce80/dce80_resource.h" 46 49 #include "dce100/dce100_resource.h" 47 50 #include "dce110/dce110_resource.h" ··· 66 63 enum dce_version dc_version = DCE_VERSION_UNKNOWN; 67 64 switch (asic_id.chip_family) { 68 65 66 + #if defined(CONFIG_DRM_AMD_DC_SI) 67 + case FAMILY_SI: 68 + if (ASIC_REV_IS_TAHITI_P(asic_id.hw_internal_rev) || 69 + ASIC_REV_IS_PITCAIRN_PM(asic_id.hw_internal_rev) || 70 + ASIC_REV_IS_CAPEVERDE_M(asic_id.hw_internal_rev)) 71 + dc_version = DCE_VERSION_6_0; 72 + else if (ASIC_REV_IS_OLAND_M(asic_id.hw_internal_rev)) 73 + dc_version = DCE_VERSION_6_4; 74 + else 75 + dc_version = DCE_VERSION_6_1; 76 + break; 77 + #endif 69 78 case FAMILY_CI: 70 79 dc_version = DCE_VERSION_8_0; 71 80 break; ··· 144 129 struct resource_pool *res_pool = NULL; 145 130 146 131 switch (dc_version) { 132 + #if defined(CONFIG_DRM_AMD_DC_SI) 133 + case DCE_VERSION_6_0: 134 + res_pool = dce60_create_resource_pool( 135 + init_data->num_virtual_links, dc); 136 + break; 137 + case DCE_VERSION_6_1: 138 + res_pool = dce61_create_resource_pool( 139 + init_data->num_virtual_links, dc); 140 + break; 141 + case DCE_VERSION_6_4: 142 + res_pool = dce64_create_resource_pool( 143 + init_data->num_virtual_links, dc); 144 + break; 145 + #endif 147 146 case DCE_VERSION_8_0: 148 147 res_pool = dce80_create_resource_pool( 149 148 init_data->num_virtual_links, dc);