Commit f7d0157b authored by Charlene Liu's avatar Charlene Liu Committed by Alex Deucher

drm/amd/display: avoid crash and add z8_marks related in dml

[why]
add dml1 used calculate_wm_and_dlg function pointer check to prevent crash.
add z8 watermarks to struct for later asic use
Reviewed-by: default avatarAlvin Lee <alvin.lee2@amd.com>
Acked-by: default avatarStylon Wang <stylon.wang@amd.com>
Signed-off-by: default avatarCharlene Liu <charlene.liu@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 53f32880
...@@ -2063,7 +2063,8 @@ bool dcn30_validate_bandwidth(struct dc *dc, ...@@ -2063,7 +2063,8 @@ bool dcn30_validate_bandwidth(struct dc *dc,
} }
DC_FP_START(); DC_FP_START();
dc->res_pool->funcs->calculate_wm_and_dlg(dc, context, pipes, pipe_cnt, vlevel); if (dc->res_pool->funcs->calculate_wm_and_dlg)
dc->res_pool->funcs->calculate_wm_and_dlg(dc, context, pipes, pipe_cnt, vlevel);
DC_FP_END(); DC_FP_END();
BW_VAL_TRACE_END_WATERMARKS(); BW_VAL_TRACE_END_WATERMARKS();
......
...@@ -1781,8 +1781,8 @@ bool dcn31_validate_bandwidth(struct dc *dc, ...@@ -1781,8 +1781,8 @@ bool dcn31_validate_bandwidth(struct dc *dc,
BW_VAL_TRACE_SKIP(fast); BW_VAL_TRACE_SKIP(fast);
goto validate_out; goto validate_out;
} }
if (dc->res_pool->funcs->calculate_wm_and_dlg)
dc->res_pool->funcs->calculate_wm_and_dlg(dc, context, pipes, pipe_cnt, vlevel); dc->res_pool->funcs->calculate_wm_and_dlg(dc, context, pipes, pipe_cnt, vlevel);
BW_VAL_TRACE_END_WATERMARKS(); BW_VAL_TRACE_END_WATERMARKS();
......
...@@ -1740,8 +1740,8 @@ bool dcn314_validate_bandwidth(struct dc *dc, ...@@ -1740,8 +1740,8 @@ bool dcn314_validate_bandwidth(struct dc *dc,
BW_VAL_TRACE_SKIP(fast); BW_VAL_TRACE_SKIP(fast);
goto validate_out; goto validate_out;
} }
if (dc->res_pool->funcs->calculate_wm_and_dlg)
dc->res_pool->funcs->calculate_wm_and_dlg(dc, context, pipes, pipe_cnt, vlevel); dc->res_pool->funcs->calculate_wm_and_dlg(dc, context, pipes, pipe_cnt, vlevel);
BW_VAL_TRACE_END_WATERMARKS(); BW_VAL_TRACE_END_WATERMARKS();
......
...@@ -49,6 +49,8 @@ struct dcn_hubbub_wm_set { ...@@ -49,6 +49,8 @@ struct dcn_hubbub_wm_set {
uint32_t dram_clk_change; uint32_t dram_clk_change;
uint32_t usr_retrain; uint32_t usr_retrain;
uint32_t fclk_pstate_change; uint32_t fclk_pstate_change;
uint32_t sr_enter_exit_Z8;
uint32_t sr_enter_Z8;
}; };
struct dcn_hubbub_wm { struct dcn_hubbub_wm {
......
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