提交 960b6f4f 编写于 作者: R Raul E Rangel 提交者: Alex Deucher

drm/amd/display: fix struct init in update_bounding_box

dcn20_resource.c:2636:9: error: missing braces around initializer [-Werror=missing-braces]
  struct _vcs_dpi_voltage_scaling_st calculated_states[MAX_CLOCK_LIMIT_STATES] = {0};
         ^

Fixes: 7ed4e635 ("drm/amd/display: Add DCN2 HW Sequencer and Resource")
Signed-off-by: NRaul E Rangel <rrangel@chromium.org>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 d0312d0d
......@@ -3015,7 +3015,7 @@ static void cap_soc_clocks(
static void update_bounding_box(struct dc *dc, struct _vcs_dpi_soc_bounding_box_st *bb,
struct pp_smu_nv_clock_table *max_clocks, unsigned int *uclk_states, unsigned int num_states)
{
struct _vcs_dpi_voltage_scaling_st calculated_states[MAX_CLOCK_LIMIT_STATES] = {0};
struct _vcs_dpi_voltage_scaling_st calculated_states[MAX_CLOCK_LIMIT_STATES];
int i;
int num_calculated_states = 0;
int min_dcfclk = 0;
......@@ -3023,6 +3023,8 @@ static void update_bounding_box(struct dc *dc, struct _vcs_dpi_soc_bounding_box_
if (num_states == 0)
return;
memset(calculated_states, 0, sizeof(calculated_states));
if (dc->bb_overrides.min_dcfclk_mhz > 0)
min_dcfclk = dc->bb_overrides.min_dcfclk_mhz;
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册