Commit 395f669e authored by Dave Airlie's avatar Dave Airlie Committed by Alex Deucher

amdgpu/dc: constify a bunch of dc structs.

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d90371b0
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
clk_dce->base.ctx clk_dce->base.ctx
/* Max clock values for each state indexed by "enum clocks_state": */ /* Max clock values for each state indexed by "enum clocks_state": */
static struct state_dependent_clocks dce80_max_clks_by_state[] = { static const struct state_dependent_clocks dce80_max_clks_by_state[] = {
/* ClocksStateInvalid - should not be used */ /* ClocksStateInvalid - should not be used */
{ .display_clk_khz = 0, .pixel_clk_khz = 0 }, { .display_clk_khz = 0, .pixel_clk_khz = 0 },
/* ClocksStateUltraLow - not expected to be used for DCE 8.0 */ /* ClocksStateUltraLow - not expected to be used for DCE 8.0 */
...@@ -63,7 +63,7 @@ static struct state_dependent_clocks dce80_max_clks_by_state[] = { ...@@ -63,7 +63,7 @@ static struct state_dependent_clocks dce80_max_clks_by_state[] = {
/* ClocksStatePerformance */ /* ClocksStatePerformance */
{ .display_clk_khz = 600000, .pixel_clk_khz = 400000 } }; { .display_clk_khz = 600000, .pixel_clk_khz = 400000 } };
static struct state_dependent_clocks dce110_max_clks_by_state[] = { static const struct state_dependent_clocks dce110_max_clks_by_state[] = {
/*ClocksStateInvalid - should not be used*/ /*ClocksStateInvalid - should not be used*/
{ .display_clk_khz = 0, .pixel_clk_khz = 0 }, { .display_clk_khz = 0, .pixel_clk_khz = 0 },
/*ClocksStateUltraLow - currently by HW design team not supposed to be used*/ /*ClocksStateUltraLow - currently by HW design team not supposed to be used*/
...@@ -75,7 +75,7 @@ static struct state_dependent_clocks dce110_max_clks_by_state[] = { ...@@ -75,7 +75,7 @@ static struct state_dependent_clocks dce110_max_clks_by_state[] = {
/*ClocksStatePerformance*/ /*ClocksStatePerformance*/
{ .display_clk_khz = 643000, .pixel_clk_khz = 400000 } }; { .display_clk_khz = 643000, .pixel_clk_khz = 400000 } };
static struct state_dependent_clocks dce112_max_clks_by_state[] = { static const struct state_dependent_clocks dce112_max_clks_by_state[] = {
/*ClocksStateInvalid - should not be used*/ /*ClocksStateInvalid - should not be used*/
{ .display_clk_khz = 0, .pixel_clk_khz = 0 }, { .display_clk_khz = 0, .pixel_clk_khz = 0 },
/*ClocksStateUltraLow - currently by HW design team not supposed to be used*/ /*ClocksStateUltraLow - currently by HW design team not supposed to be used*/
...@@ -87,7 +87,7 @@ static struct state_dependent_clocks dce112_max_clks_by_state[] = { ...@@ -87,7 +87,7 @@ static struct state_dependent_clocks dce112_max_clks_by_state[] = {
/*ClocksStatePerformance*/ /*ClocksStatePerformance*/
{ .display_clk_khz = 1132000, .pixel_clk_khz = 600000 } }; { .display_clk_khz = 1132000, .pixel_clk_khz = 600000 } };
static struct state_dependent_clocks dce120_max_clks_by_state[] = { static const struct state_dependent_clocks dce120_max_clks_by_state[] = {
/*ClocksStateInvalid - should not be used*/ /*ClocksStateInvalid - should not be used*/
{ .display_clk_khz = 0, .pixel_clk_khz = 0 }, { .display_clk_khz = 0, .pixel_clk_khz = 0 },
/*ClocksStateUltraLow - currently by HW design team not supposed to be used*/ /*ClocksStateUltraLow - currently by HW design team not supposed to be used*/
......
...@@ -302,7 +302,7 @@ static const struct dce_opp_mask opp_mask = { ...@@ -302,7 +302,7 @@ static const struct dce_opp_mask opp_mask = {
AUD_COMMON_REG_LIST(id)\ AUD_COMMON_REG_LIST(id)\
} }
static struct dce_audio_registers audio_regs[] = { static const struct dce_audio_registers audio_regs[] = {
audio_regs(0), audio_regs(0),
audio_regs(1), audio_regs(1),
audio_regs(2), audio_regs(2),
......
...@@ -1109,7 +1109,7 @@ static bool dce120_arm_vert_intr( ...@@ -1109,7 +1109,7 @@ static bool dce120_arm_vert_intr(
return true; return true;
} }
static struct timing_generator_funcs dce120_tg_funcs = { static const struct timing_generator_funcs dce120_tg_funcs = {
.validate_timing = dce120_tg_validate_timing, .validate_timing = dce120_tg_validate_timing,
.program_timing = dce120_tg_program_timing, .program_timing = dce120_tg_program_timing,
.enable_crtc = dce120_timing_generator_enable_crtc, .enable_crtc = dce120_timing_generator_enable_crtc,
......
...@@ -373,7 +373,7 @@ void ippn10_cnv_setup ( ...@@ -373,7 +373,7 @@ void ippn10_cnv_setup (
} }
} }
static struct transform_funcs dcn10_dpp_funcs = { static const struct transform_funcs dcn10_dpp_funcs = {
.transform_reset = dpp_reset, .transform_reset = dpp_reset,
.transform_set_scaler = dcn10_dpp_dscl_set_scaler_manual_scale, .transform_set_scaler = dcn10_dpp_dscl_set_scaler_manual_scale,
.transform_get_optimal_number_of_taps = dpp_get_optimal_number_of_taps, .transform_get_optimal_number_of_taps = dpp_get_optimal_number_of_taps,
......
...@@ -1146,7 +1146,7 @@ void tgn10_read_otg_state(struct dcn10_timing_generator *tgn10, ...@@ -1146,7 +1146,7 @@ void tgn10_read_otg_state(struct dcn10_timing_generator *tgn10,
} }
static struct timing_generator_funcs dcn10_tg_funcs = { static const struct timing_generator_funcs dcn10_tg_funcs = {
.validate_timing = tgn10_validate_timing, .validate_timing = tgn10_validate_timing,
.program_timing = tgn10_program_timing, .program_timing = tgn10_program_timing,
.program_global_sync = tgn10_program_global_sync, .program_global_sync = tgn10_program_global_sync,
......
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