drm/amd/display: Make OPTC3 function accessible to other DCN
authorAlvin Lee <Alvin.Lee2@amd.com>
Tue, 19 Apr 2022 15:22:17 +0000 (11:22 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Jul 2022 20:11:54 +0000 (16:11 -0400)
[Why]
Newer DCN should use optc3

[How]
Declare optc3 vmin/vmax function in header.

Signed-off-by: Alvin Lee <Alvin.Lee2@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.c
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.c
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_optc.c

index 7fa46e35bac6391dff4cb3aa139eb7bf6ecaeb51..629cd76b97c2b13ae839c41a9f378cd628638fe7 100644 (file)
@@ -440,6 +440,7 @@ struct dc_clocks {
        bool prev_p_state_change_support;
        bool fclk_prev_p_state_change_support;
        int num_ways;
+       bool fw_based_mclk_switching;
        int prev_num_ways;
        enum dtm_pstate dtm_level;
        int max_supported_dppclk_khz;
index 9a440ae8f865782ff6fef91f1fbdc1346701cf9b..80136b5d7e486dc5ae810d0c4c0b361fcc0b9fed 100644 (file)
@@ -293,6 +293,11 @@ static void optc3_set_timing_double_buffer(struct timing_generator *optc, bool e
                   OTG_DRR_TIMING_DBUF_UPDATE_MODE, mode);
 }
 
+void optc3_set_vtotal_min_max(struct timing_generator *optc, int vtotal_min, int vtotal_max)
+{
+       optc1_set_vtotal_min_max(optc, vtotal_min, vtotal_max);
+}
+
 void optc3_tg_init(struct timing_generator *optc)
 {
        optc3_set_timing_double_buffer(optc, true);
index 30361ebe7d22f47bce8516e24c78c7772d422af1..c279a25ea2935a15d7b3ec5ed2f718f2db111b65 100644 (file)
@@ -58,7 +58,7 @@ static const struct hw_sequencer_funcs dcn32_funcs = {
        .pipe_control_lock = dcn20_pipe_control_lock,
        .interdependent_update_lock = dcn10_lock_all_pipes,
        .cursor_lock = dcn10_cursor_lock,
-       .prepare_bandwidth = dcn20_prepare_bandwidth,
+       .prepare_bandwidth = dcn30_prepare_bandwidth,
        .optimize_bandwidth = dcn20_optimize_bandwidth,
        .update_bandwidth = dcn20_update_bandwidth,
        .set_drr = dcn10_set_drr,
index 88275ea4193cd74bbbfe4c35044f7fbf33156a14..00ff21458a53571a06b19b6f34bf38078af717d7 100644 (file)
@@ -223,7 +223,7 @@ static struct timing_generator_funcs dcn32_tg_funcs = {
                .set_vrr_m_const = optc3_set_vrr_m_const,
                .set_drr = optc1_set_drr,
                .get_last_used_drr_vtotal = optc2_get_last_used_drr_vtotal,
-               .set_vtotal_min_max = optc1_set_vtotal_min_max,
+               .set_vtotal_min_max = optc3_set_vtotal_min_max,
                .set_static_screen_control = optc1_set_static_screen_control,
                .program_stereo = optc1_program_stereo,
                .is_stereo_left_eye = optc1_is_stereo_left_eye,