From: Sung Lee Date: Fri, 30 Aug 2019 17:36:40 +0000 (-0400) Subject: drm/amd/display: add dummy functions to smu for Renoir Silicon Diags X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=3794943cb1026006db9363a3641973b62387e51a;p=uclinux-h8%2Flinux.git drm/amd/display: add dummy functions to smu for Renoir Silicon Diags [Why] Previously only dummy functions were added in Diags for FPGA. On silicon, this would lead to a segmentation fault on silicon diags. [How] Check if diags silicon and if so, add dummy functions. Signed-off-by: Sung Lee Acked-by: Bhawanpreet Lakha Reviewed-by: Roman Li Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c index ef167f266e51..bd16a8bfc951 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c @@ -1399,7 +1399,7 @@ static struct pp_smu_funcs *dcn21_pp_smu_create(struct dc_context *ctx) if (!pp_smu) return pp_smu; - if (IS_FPGA_MAXIMUS_DC(ctx->dce_environment)) { + if (IS_FPGA_MAXIMUS_DC(ctx->dce_environment) || IS_DIAG_DC(ctx->dce_environment)) { pp_smu->ctx.ver = PP_SMU_VER_RN; pp_smu->rn_funcs.get_dpm_clock_table = dummy_get_dpm_clock_table; pp_smu->rn_funcs.set_wm_ranges = dummy_set_wm_ranges;