DC Patches for 2023 Sept 29
cover DC Patches for 2023 Sept 29
This DC patchset brings improvements in multiple areas. In summary, we have:
* Stability fixes through null pointer checks, blackscreen fixes on certain configurations
* Improvements for various functionality like Idle optimization, ILR, DSC, IPS
* Fixes for ILR functionality
* Trivial code cleanups
===================================================================
Aric Cyr (2):
drm/amd/display: Clean up code warnings
drm/amd/display: 3.2.254
Aurabindo Pillai (3):
drm/amd/display: Update DMUB cmd header drm/amd/display: Adjust code style for dmub_cmd.h drm/amd/display: Adjust code style for hw_sequencer.h
Chiawen Huang (1):
drm/amd/display: remove duplicated edp relink to fastboot
Gabe Teeger (1):
drm/amd/display: Add Null check for DPP resource
Kim, Sung joon (1):
drm/amd/display: Add a check for idle power optimization
Muhammad Ahmed (1):
drm/amd/display: enable dsc_clk even if dsc_pg disabled
Ovidiu Bunea (1):
drm/amd/display: Make driver backwards-compatible with non-IPS PMFW
Samson Tam (1):
drm/amd/display: apply edge-case DISPCLK WDIVIDER changes to master
OTG pipes only
Sherry Wang (1):
drm/amd/display: refactor ILR to make it work
Wayne Lin (1):
drm/amd/display: fix problems in power_helper
Wenjing Liu (1):
drm/amd/display: use full update for clip size increase of large plane
source
.../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 4 +- .../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 4 +- .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 28 ++- drivers/gpu/drm/amd/display/dc/core/dc.c | 102 ++++----- .../gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- .../gpu/drm/amd/display/dc/core/dc_stream.c | 17 -- drivers/gpu/drm/amd/display/dc/dc.h | 10 +- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 7 - drivers/gpu/drm/amd/display/dc/dc_stream.h | 6 - .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 27 --- .../drm/amd/display/dc/dcn20/dcn20_hwseq.h | 6 - .../gpu/drm/amd/display/dc/dcn20/dcn20_init.c | 3 - .../gpu/drm/amd/display/dc/dcn21/dcn21_init.c | 3 - .../drm/amd/display/dc/dcn32/dcn32_hwseq.c | 3 + .../drm/amd/display/dc/dcn35/dcn35_resource.c | 3 +- .../gpu/drm/amd/display/dc/inc/hw_sequencer.h | 56 +++-- .../drm/amd/display/dc/link/link_detection.c | 6 + .../dc/link/protocols/link_dp_capability.c | 14 +- .../link/protocols/link_edp_panel_control.c | 21 +- .../link/protocols/link_edp_panel_control.h | 2 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 193 ++++++++++-------- .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 1 + .../drm/amd/display/modules/inc/mod_stats.h | 2 +- .../amd/display/modules/power/power_helpers.c | 23 ++- 24 files changed, 248 insertions(+), 295 deletions(-)
Signature · 1 line
2.42.0
PATCH 1/14 drm/amd/display: fix problems in power_helper
From: Wayne Lin <[email protected]>
[Why & How]
Fix following problems:
- In abm config, forget to initialize config.ambient_thresholds_lux.
- Adjust the coding style problem
- Restrict to call psr_su_set_dsc_slice_height() under edp only
--- .../amd/display/modules/power/power_helpers.c | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/display/modules/power/power_helpers.c +12 -11
@@ -719,8 +719,9 @@ bool dmub_init_abm_config(struct resource_pool *res_pool, config.backlight_offsets[i] = ram_table.backlight_offsets[i]; } -for (i =0 ; i <NUM_AMBI_LEVEL ; i++) +for (i =0 ; i <NUM_AMBI_LEVEL ; i++) { config.iir_curve[i] = ram_table.iir_curve[i]; + }for (i =0 ; i <NUM_AMBI_LEVEL ; i++) {for (j =0 ; j <NUM_AGGR_LEVEL ; j++) {
@@ -743,13 +744,13 @@ bool dmub_init_abm_config(struct resource_pool *res_pool,for (i =0 ; i <NUM_AGGR_LEVEL ; i++) { config.blRampReduction[i] = params.backlight_ramping_reduction; config.blRampStart[i] = params.backlight_ramping_start; - } - }else { -for (i =0 ; i <NUM_AGGR_LEVEL ; i++) { - config.blRampReduction[i] = abm_settings[set][i].blRampReduction; - config.blRampStart[i] = abm_settings[set][i].blRampStart; - } - } + } + }else { +for (i =0 ; i <NUM_AGGR_LEVEL ; i++) { + config.blRampReduction[i] = abm_settings[set][i].blRampReduction; + config.blRampStart[i] = abm_settings[set][i].blRampStart; + } + } config.min_abm_backlight = ram_table.min_abm_backlight;
@@ -944,11 +945,11 @@ bool psr_su_set_dsc_slice_height(struct dc *dc, struct dc_link *link,uint16_t slice_height; config->dsc_slice_height =0 ; -if ((link->connector_signal &SIGNAL_TYPE_EDP ) && - (!dc->caps.edp_dsc_support || +if (!(link->connector_signal &SIGNAL_TYPE_EDP ) || + !dc->caps.edp_dsc_support || link->panel_config.dsc.disable_dsc_edp || !link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_SUPPORT || - !stream->timing.dsc_cfg.num_slices_v)) + !stream->timing.dsc_cfg.num_slices_v)return true; pic_height = stream->timing.v_addressable +
Signature · 1 line
2.42.0
PATCH 2/14 drm/amd/display: Add Null check for DPP resource
In reply to Aurabindo PillaiFrom: Gabe Teeger <[email protected]>
[what and why]
Check whether dpp resource pointer is null in advance and return early if so.
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +1 -1
@@ -945,7 +945,7 @@ static void adjust_recout_for_visual_confirm(struct rect *recout,struct dc *dc = pipe_ctx->stream->ctx->dc;int dpp_offset, base_offset; -if (dc->debug.visual_confirm ==VISUAL_CONFIRM_DISABLE ) +if (dc->debug.visual_confirm ==VISUAL_CONFIRM_DISABLE || !pipe_ctx->plane_res.dpp)return ; dpp_offset = pipe_ctx->stream->timing.v_addressable /VISUAL_CONFIRM_DPP_OFFSET_DENO ;
Signature · 1 line
2.42.0
PATCH 3/14 drm/amd/display: enable dsc_clk even if dsc_pg disabled
In reply to Aurabindo PillaiFrom: Muhammad Ahmed <[email protected]>
[why]
need to enable dsc_clk regardless dsc_pg
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 3 +++ drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +4 -4
@@ -1853,7 +1853,7 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *cif (dc->hwss.subvp_pipe_control_lock) dc->hwss.subvp_pipe_control_lock (dc, context, true, true,NULL , subvp_prev_use); -if (dc->debug.enable_double_buffered_dsc_pg_support) +if (dc->hwss.update_dsc_pg) dc->hwss.update_dsc_pg (dc, context, false);disable_dangling_plane (dc, context);
@@ -1960,7 +1960,7 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c dc->hwss.optimize_bandwidth (dc, context); } -if (dc->debug.enable_double_buffered_dsc_pg_support) +if (dc->hwss.update_dsc_pg) dc->hwss.update_dsc_pg (dc, context, true);if (dc->ctx->dce_version >=DCE_VERSION_MAX )
@@ -2207,7 +2207,7 @@ void dc_post_update_surfaces_to_stream(struct dc *dc) dc->hwss.optimize_bandwidth (dc, context); -if (dc->debug.enable_double_buffered_dsc_pg_support) +if (dc->hwss.update_dsc_pg) dc->hwss.update_dsc_pg (dc, context, true); }
@@ -3565,7 +3565,7 @@ static void commit_planes_for_stream(struct dc *dc,if (get_seamless_boot_stream_count (context) ==0 ) dc->hwss.prepare_bandwidth (dc, context); -if (dc->debug.enable_double_buffered_dsc_pg_support) +if (dc->hwss.update_dsc_pg) dc->hwss.update_dsc_pg (dc, context, false);context_clock_trace (dc, context);
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c +3 -0
@@ -77,6 +77,9 @@ void dcn32_dsc_pg_control(if (hws->ctx->dc->debug.disable_dsc_power_gate)return ; +if (!hws->ctx->dc->debug.enable_double_buffered_dsc_pg_support) +return ; +REG_GET (DC_IP_REQUEST_CNTL ,IP_REQUEST_EN , &org_ip_request_cntl);if (org_ip_request_cntl ==0 )REG_SET (DC_IP_REQUEST_CNTL ,0 ,IP_REQUEST_EN ,1 );
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c +1 -1
@@ -742,7 +742,7 @@ static const struct dc_debug_options debug_defaults_drv = { .disable_mem_low_power = false, .enable_hpo_pg_support = false,//must match enable_single_display_2to1_odm_policy to support dynamic ODM transitions - .enable_double_buffered_dsc_pg_support = false, + .enable_double_buffered_dsc_pg_support = true, .enable_dp_dig_pixel_rate_div_policy = 1, .disable_z10 = false, .ignore_pg = true,
Signature · 1 line
2.42.0
PATCH 4/14 drm/amd/display: apply edge-case DISPCLK WDIVIDER changes to master OTG pipes only
In reply to Aurabindo PillaiFrom: Samson Tam <[email protected]>
[Why]
The edge-case DISPCLK WDIVIDER changes call stream_enc functions. But with MPC pipes, downstream pipes have null stream_enc and will
cause crash.
[How]
Only call stream_enc functions for pipes that are OTG master.
--- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 4 ++-- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c +2 -2
@@ -157,7 +157,7 @@ void dcn20_update_clocks_update_dentist(struct clk_mgr_internal *clk_mgr, structint32_t N ;int32_t j; -if (!pipe_ctx->stream) +if (!resource_is_pipe_type (pipe_ctx,OTG_MASTER ))continue ;/* Virtual encoders don't have this function */ if (!stream_enc->funcs->get_fifo_cal_average_level)
@@ -188,7 +188,7 @@ void dcn20_update_clocks_update_dentist(struct clk_mgr_internal *clk_mgr, structint32_t N ;int32_t j; -if (!pipe_ctx->stream) +if (!resource_is_pipe_type (pipe_ctx,OTG_MASTER ))continue ;/* Virtual encoders don't have this function */ if (!stream_enc->funcs->get_fifo_cal_average_level)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c +2 -2
@@ -363,7 +363,7 @@ static void dcn32_update_clocks_update_dentist(int32_t N ;int32_t j; -if (!pipe_ctx->stream) +if (!resource_is_pipe_type (pipe_ctx,OTG_MASTER ))continue ;/* Virtual encoders don't have this function */ if (!stream_enc->funcs->get_fifo_cal_average_level)
@@ -409,7 +409,7 @@ static void dcn32_update_clocks_update_dentist(int32_t N ;int32_t j; -if (!pipe_ctx->stream) +if (!resource_is_pipe_type (pipe_ctx,OTG_MASTER ))continue ;/* Virtual encoders don't have this function */ if (!stream_enc->funcs->get_fifo_cal_average_level)
Signature · 1 line
2.42.0
PATCH 5/14 drm/amd/display: remove duplicated edp relink to fastboot
In reply to Aurabindo PillaiFrom: Chiawen Huang <[email protected]>
[Why&How]enable_accelerated_mode function is fully to check whether fastboot support or not.
It is no longer to disable_vbios_mode_if_required.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 59 ------------------------ 1 file changed, 59 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -59
@@ -1212,64 +1212,6 @@ static void disable_dangling_plane(struct dc *dc, struct dc_state *context)dc_release_state (current_ctx); } -static void disable_vbios_mode_if_required ( -struct dc *dc, -struct dc_state *context) -{ -unsigned int i, j; - -/* check if timing_changed, disable stream*/ -for (i =0 ; i < dc->res_pool->pipe_count; i++) { -struct dc_stream_state *stream =NULL ; -struct dc_link *link =NULL ; -struct pipe_ctx *pipe =NULL ; - - pipe = &context->res_ctx.pipe_ctx[i]; - stream = pipe->stream; -if (stream ==NULL ) -continue ; - -// only looking for first odm pipe -if (pipe->prev_odm_pipe) -continue ; - -if (stream->link->local_sink && - stream->link->local_sink->sink_signal ==SIGNAL_TYPE_EDP ) { - link = stream->link; - } - -if (link !=NULL && link->link_enc->funcs->is_dig_enabled (link->link_enc)) { -unsigned int enc_inst, tg_inst =0 ; -unsigned int pix_clk_100hz; - - enc_inst = link->link_enc->funcs->get_dig_frontend (link->link_enc); -if (enc_inst !=ENGINE_ID_UNKNOWN ) { -for (j =0 ; j < dc->res_pool->stream_enc_count; j++) { -if (dc->res_pool->stream_enc[j]->id == enc_inst) { - tg_inst = dc->res_pool->stream_enc[j]->funcs->dig_source_otg ( - dc->res_pool->stream_enc[j]); -break ; - } - } - - dc->res_pool->dp_clock_source->funcs->get_pixel_clk_frequency_100hz ( - dc->res_pool->dp_clock_source, - tg_inst, &pix_clk_100hz); - -if (link->link_status.link_active) { -uint32_t requested_pix_clk_100hz = - pipe->stream_res.pix_clk_params.requested_pix_clk_100hz; - -if (pix_clk_100hz != requested_pix_clk_100hz) { - dc->link_srv->set_dpms_off (pipe); - pipe->stream->dpms_off = false; - } - } - } - } - } -} -static void wait_for_no_pipes_pending (struct dc *dc,struct dc_state *context) {int i;
@@ -1839,7 +1781,6 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c dc_streams[i] = context->streams[i];if (!dcb->funcs->is_accelerated_mode (dcb)) { -disable_vbios_mode_if_required (dc, context); dc->hwss.enable_accelerated_mode (dc, context); }
Signature · 1 line
2.42.0
PATCH 6/14 drm/amd/display: refactor ILR to make it work
In reply to Aurabindo PillaiFrom: Sherry Wang <[email protected]>
[Why]
Current ILR toggle is on/off as a part of panel config for new function, which breaks original ILR logic
[How]
Refactor ILR and take panel config into account
--- .../drm/amd/display/dc/link/link_detection.c | 6 ++++++ .../dc/link/protocols/link_dp_capability.c | 14 ++++--------- .../link/protocols/link_edp_panel_control.c | 21 +++++++++++++++++-- .../link/protocols/link_edp_panel_control.h | 2 ++ 4 files changed, 31 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/display/dc/link/link_detection.c +6 -0
@@ -1166,6 +1166,12 @@ static bool detect_link_and_local_sink(struct dc_link *link,dm_helpers_init_panel_settings (dc_ctx, &link->panel_config, sink);// Override dc_panel_config if system has specific settings dm_helpers_override_panel_settings (dc_ctx, &link->panel_config); + +//sink only can use supported link rate table, we are foreced to enable it +if (link->reported_link_cap.link_rate ==LINK_RATE_UNKNOWN ) + link->panel_config.ilr.optimize_edp_link_rate = true; +if (edp_is_ilr_optimization_enabled (link)) + link->reported_link_cap.link_rate =get_max_link_rate_from_ilr_table (link); } }else {
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +4 -10
@@ -707,8 +707,7 @@ bool edp_decide_link_settings(struct dc_link *link,* edp_supported_link_rates_count is only valid for eDP v1.4 or higher. * Per VESA eDP spec, "The DPCD revision for eDP v1.4 is 13h" */ -if (link->dpcd_caps.dpcd_rev.raw <DPCD_REV_13 || - link->dpcd_caps.edp_supported_link_rates_count ==0 ) { +if (!edp_is_ilr_optimization_enabled (link)) { *link_setting = link->verified_link_cap;return true; }
@@ -772,8 +771,7 @@ bool decide_edp_link_settings_with_dsc(struct dc_link *link,* edp_supported_link_rates_count is only valid for eDP v1.4 or higher. * Per VESA eDP spec, "The DPCD revision for eDP v1.4 is 13h" */ -if ((link->dpcd_caps.dpcd_rev.raw <DPCD_REV_13 || - link->dpcd_caps.edp_supported_link_rates_count ==0 )) { +if (!edp_is_ilr_optimization_enabled (link)) {/* for DSC enabled case, we search for minimum lane count */ memset (&initial_link_setting,0 ,sizeof (initial_link_setting)); initial_link_setting.lane_count =LANE_COUNT_ONE ;
@@ -1938,9 +1936,7 @@ void detect_edp_sink_caps(struct dc_link *link)* edp_supported_link_rates_count is only valid for eDP v1.4 or higher. * Per VESA eDP spec, "The DPCD revision for eDP v1.4 is 13h" */ -if (link->dpcd_caps.dpcd_rev.raw >=DPCD_REV_13 && - (link->panel_config.ilr.optimize_edp_link_rate || - link->reported_link_cap.link_rate ==LINK_RATE_UNKNOWN )) { +if (link->dpcd_caps.dpcd_rev.raw >=DPCD_REV_13 ) {// Read DPCD 00010h - 0001Fh 16 bytes at one shot core_link_read_dpcd (link,DP_SUPPORTED_LINK_RATES , supported_link_rates,sizeof (supported_link_rates));
@@ -1958,12 +1954,10 @@ void detect_edp_sink_caps(struct dc_link *link) link_rate =linkRateInKHzToLinkRateMultiplier (link_rate_in_khz); link->dpcd_caps.edp_supported_link_rates[link->dpcd_caps.edp_supported_link_rates_count] = link_rate; link->dpcd_caps.edp_supported_link_rates_count++; - -if (link->reported_link_cap.link_rate < link_rate) - link->reported_link_cap.link_rate = link_rate; } } } +core_link_read_dpcd (link,DP_EDP_BACKLIGHT_ADJUSTMENT_CAP , &backlight_adj_cap,sizeof (backlight_adj_cap));
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +19 -2
@@ -302,6 +302,24 @@ bool set_cached_brightness_aux(struct dc_link *link)return set_default_brightness_aux (link);return false; } +bool edp_is_ilr_optimization_enabled (struct dc_link *link) +{ +if (link->dpcd_caps.edp_supported_link_rates_count ==0 || !link->panel_config.ilr.optimize_edp_link_rate) +return false; +return true; +} + +enum dc_link_rate get_max_link_rate_from_ilr_table (struct dc_link *link) +{ +enum dc_link_rate link_rate = link->reported_link_cap.link_rate; + +for (int i =0 ; i < link->dpcd_caps.edp_supported_link_rates_count; i++) { +if (link_rate < link->dpcd_caps.edp_supported_link_rates[i]) + link_rate = link->dpcd_caps.edp_supported_link_rates[i]; + } + +return link_rate; +}bool edp_is_ilr_optimization_required (struct dc_link *link,struct dc_crtc_timing *crtc_timing)
@@ -314,8 +332,7 @@ bool edp_is_ilr_optimization_required(struct dc_link *link,ASSERT (link || crtc_timing);// invalid input -if (link->dpcd_caps.edp_supported_link_rates_count ==0 || - !link->panel_config.ilr.optimize_edp_link_rate) +if (!edp_is_ilr_optimization_enabled (link))return false;
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.h +2 -0
@@ -64,6 +64,8 @@ bool edp_get_replay_state(const struct dc_link *link, uint64_t *state);bool edp_wait_for_t12 (struct dc_link *link);bool edp_is_ilr_optimization_required (struct dc_link *link,struct dc_crtc_timing *crtc_timing); +bool edp_is_ilr_optimization_enabled (struct dc_link *link); +enum dc_link_rate get_max_link_rate_from_ilr_table (struct dc_link *link);bool edp_backlight_enable_aux (struct dc_link *link,bool enable);void edp_add_delay_for_T9 (struct dc_link *link);bool edp_receiver_ready_T9 (struct dc_link *link);
Signature · 1 line
2.42.0
PATCH 7/14 drm/amd/display: Make driver backwards-compatible with non-IPS PMFW
In reply to Aurabindo PillaiFrom: Ovidiu Bunea <[email protected]>
[why]
Driver needs to be compatible with PM FW that doesn't support IPS
[how]
Toggle internal control flag
--- .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 28 ++++++++++++------- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- .../drm/amd/display/dc/dcn35/dcn35_resource.c | 1 - 3 files changed, 19 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c +18 -10
@@ -744,16 +744,16 @@ static void dcn35_set_idle_state(struct clk_mgr *clk_mgr_base, bool allow_idle)struct dc *dc = clk_mgr_base->ctx->dc;uint32_t val =dcn35_smu_read_ips_scratch (clk_mgr); -if (dc->debug.disable_ips ==0 ) { +if (dc->config.disable_ips ==0 ) { val |=DMUB_IPS1_ALLOW_MASK ; val |=DMUB_IPS2_ALLOW_MASK ; - }else if (dc->debug.disable_ips ==DMUB_IPS_DISABLE_IPS1 ) { + }else if (dc->config.disable_ips ==DMUB_IPS_DISABLE_IPS1 ) { val = val & ~DMUB_IPS1_ALLOW_MASK ; val = val & ~DMUB_IPS2_ALLOW_MASK ; - }else if (dc->debug.disable_ips ==DMUB_IPS_DISABLE_IPS2 ) { + }else if (dc->config.disable_ips ==DMUB_IPS_DISABLE_IPS2 ) { val |=DMUB_IPS1_ALLOW_MASK ; val = val & ~DMUB_IPS2_ALLOW_MASK ; - }else if (dc->debug.disable_ips ==DMUB_IPS_DISABLE_IPS2_Z10 ) { + }else if (dc->config.disable_ips ==DMUB_IPS_DISABLE_IPS2_Z10 ) { val |=DMUB_IPS1_ALLOW_MASK ; val |=DMUB_IPS2_ALLOW_MASK ; }
@@ -1036,12 +1036,20 @@ void dcn35_clk_mgr_construct(dm_helpers_free_gpu_mem (clk_mgr->base.base.ctx,DC_MEM_ALLOC_TYPE_FRAME_BUFFER , smu_dpm_clks.dpm_clks); -if (dcn35_smu_get_ips_supported (&clk_mgr->base)) { - ctx->dc->debug.ignore_pg = false; - ctx->dc->debug.dmcub_emulation = false; - ctx->dc->debug.disable_dpp_power_gate = false; - ctx->dc->debug.disable_hubp_power_gate = false; - ctx->dc->debug.disable_dsc_power_gate = false; +if (ctx->dc->config.disable_ips ==0 ) { +bool ips_support = false; + +/*avoid call pmfw at init*/ + ips_support =dcn35_smu_get_ips_supported (&clk_mgr->base); +if (ips_support) { + ctx->dc->debug.ignore_pg = false; + ctx->dc->debug.disable_dpp_power_gate = false; + ctx->dc->debug.disable_hubp_power_gate = false; + ctx->dc->debug.disable_dsc_power_gate = false; + }else { +/*let's reset the config control flag*/ + ctx->dc->config.disable_ips =1 ;/*pmfw not support it, disable it all*/ + } } }
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -423,6 +423,7 @@ struct dc_config {bool dc_mode_clk_limit_support;bool EnableMinDispClkODM;bool enable_auto_dpm_test_logs; +unsigned int disable_ips; };enum visual_confirm {
@@ -913,7 +914,6 @@ struct dc_debug_options {enum det_size crb_alloc_policy;int crb_alloc_policy_min_disp_count;bool disable_z10; -unsigned int disable_ips;bool enable_z9_disable_interface;bool psr_skip_crtc_disable;union dpia_debug_options dpia_debug;
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c +0 -1
@@ -747,7 +747,6 @@ static const struct dc_debug_options debug_defaults_drv = { .disable_z10 = false, .ignore_pg = true, .psp_disabled_wa = true, - .disable_ips = true, .ips2_eval_delay_us = 200, .ips2_entry_delay_us = 400 };
Signature · 1 line
2.42.0
PATCH 8/14 drm/amd/display: Clean up code warnings
In reply to Aurabindo PillaiFrom: Aric Cyr <[email protected]>
- Fix constness of string parameters
- Fix zero-initialization of structs which cannot take a 0 literal as the first field, for example enums
--- drivers/gpu/drm/amd/display/modules/inc/mod_stats.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/modules/inc/mod_stats.h +1 -1
@@ -53,7 +53,7 @@ void mod_stats_dump(struct mod_stats *mod_stats);void mod_stats_reset_data (struct mod_stats *mod_stats);void mod_stats_update_event (struct mod_stats *mod_stats, -char *event_string, +const char *event_string,unsigned int length); void mod_stats_update_flip(struct mod_stats *mod_stats,
Signature · 1 line
2.42.0
PATCH 9/14 drm/amd/display: use full update for clip size increase of large plane source
In reply to Aurabindo PillaiFrom: Wenjing Liu <[email protected]>
[why]
Clip size increase will increase viewport, which could cause us to switch to MPC combine.
If we skip full update, we are not able to change to MPC combine in fast update. This will cause corruption showing on the video plane.
[how]
treat clip size increase of a surface larger than 5k as a full update.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 15 +++++++++++++-- drivers/gpu/drm/amd/display/dc/dc.h | 5 +++++ 2 files changed, 18 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +13 -2
@@ -1003,7 +1003,8 @@ static bool dc_construct(struct dc *dc,/* set i2c speed if not done by the respective dcnxxx__resource.c */ if (dc->caps.i2c_speed_in_khz_hdcp ==0 ) dc->caps.i2c_speed_in_khz_hdcp = dc->caps.i2c_speed_in_khz; - +if (dc->caps.max_optimizable_video_width ==0 ) + dc->caps.max_optimizable_video_width =5120 ; dc->clk_mgr =dc_clk_mgr_create (dc->ctx, dc->res_pool->pp_smu, dc->res_pool->dccg);if (!dc->clk_mgr) goto fail;
@@ -2394,6 +2395,7 @@ static enum surface_update_type get_plane_info_update_type(const struct dc_surfa }static enum surface_update_type get_scaling_info_update_type ( +const struct dc *dc,const struct dc_surface_update *u) {union surface_update_flags *update_flags = &u->surface->update_flags;
@@ -2426,6 +2428,15 @@ static enum surface_update_type get_scaling_info_update_type( update_flags->bits.clock_change =1 ; } +if (u->scaling_info->src_rect.width > dc->caps.max_optimizable_video_width && + (u->scaling_info->clip_rect.width > u->surface->clip_rect.width + || u->scaling_info->clip_rect.height > u->surface->clip_rect.height)) +/* +* Changing clip size of a large surface may result in MPC slice +* count change +*/ + update_flags->bits.bandwidth_change =1 ; +if (u->scaling_info->src_rect.x != u->surface->src_rect.x || u->scaling_info->src_rect.y != u->surface->src_rect.y || u->scaling_info->clip_rect.x != u->surface->clip_rect.x
@@ -2463,7 +2474,7 @@ static enum surface_update_type det_surface_update(const struct dc *dc, type =get_plane_info_update_type (u);elevate_update_type (&overall_type, type); - type =get_scaling_info_update_type (u); + type =get_scaling_info_update_type (dc, u);elevate_update_type (&overall_type, type);if (u->flip_addr) {
drivers/gpu/drm/amd/display/dc/dc.h +5 -0
@@ -231,6 +231,11 @@ struct dc_caps {uint32_t dmdata_alloc_size;unsigned int max_cursor_size;unsigned int max_video_width; +/* +* max video plane width that can be safely assumed to be always +* supported by single DPP pipe. +*/ +unsigned int max_optimizable_video_width;unsigned int min_horizontal_blanking_period;int linear_pitch_alignment;bool dcc_const_color;
Signature · 1 line
2.42.0
PATCH 10/14 drm/amd/display: Add a check for idle power optimization
In reply to Aurabindo PillaiFrom: "Kim, Sung joon" <[email protected]>
[why]
Need a helper function to check idle power is allowed so that dc doesn't access any registers that are power-gated.
[how]
Implement helper function to check idle power optimization. Enable a hook to check if detection is allowed.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 20 ++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 1 + 3 files changed, 21 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +19 -1
@@ -4805,7 +4805,8 @@ bool dc_set_psr_allow_active(struct dc *dc, bool enable)void dc_allow_idle_optimizations (struct dc *dc,bool allow) { -if (dc->debug.disable_idle_power_optimizations) +if (dc->debug.disable_idle_power_optimizations || + (dc->caps.ips_support && dc->config.disable_ips))return ;if (dc->clk_mgr !=NULL && dc->clk_mgr->funcs->is_smu_present)
@@ -4819,6 +4820,23 @@ void dc_allow_idle_optimizations(struct dc *dc, bool allow) dc->idle_optimizations_allowed = allow; } +bool dc_is_idle_power_optimized (struct dc *dc) +{ +uint32_t idle_state =0 ; + +if (dc->debug.disable_idle_power_optimizations) +return false; + +if (dc->hwss.get_idle_state) + idle_state = dc->hwss.get_idle_state (dc); + +if ((idle_state &DMUB_IPS1_ALLOW_MASK ) || + (idle_state &DMUB_IPS2_ALLOW_MASK )) +return true; + +return false; +} +/* set min and max memory clock to lowest and highest DPM level, respectively */ void dc_unlock_memory_clock_frequency (struct dc *dc) {
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -2358,6 +2358,7 @@ bool dc_is_plane_eligible_for_idle_optimizations(struct dc *dc, struct dc_plane_ struct dc_cursor_attributes *cursor_attr);void dc_allow_idle_optimizations (struct dc *dc,bool allow); +bool dc_is_idle_power_optimized (struct dc *dc);/* set min and max memory clock to lowest and highest DPM level, respectively */ void dc_unlock_memory_clock_frequency (struct dc *dc);
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +1 -0
@@ -352,6 +352,7 @@ static bool dmub_srv_hw_setup(struct dmub_srv *dmub, enum dmub_asic asic) funcs->init_reg_offsets = dmub_srv_dcn35_regs_init; funcs->is_hw_powered_up = dmub_dcn35_is_hw_powered_up; + funcs->should_detect = dmub_dcn35_should_detect;break ;default :
Signature · 1 line
2.42.0
PATCH 11/14 drm/amd/display: Update DMUB cmd header
In reply to Aurabindo Pillai[Why&How]
* Add hints about the bits used in the packed struct.
* Update new bitfields for ABM and IPS
--- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 31 +++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +28 -3
@@ -343,53 +343,78 @@ union dmub_psr_debug_flags {union replay_debug_flags {struct {/** +* 0x1 (bit 0) * Enable visual confirm in FW. */ uint32_t visual_confirm :1 ;/** +* 0x2 (bit 1) * @skip_crc: Set if need to skip CRC. */ uint32_t skip_crc :1 ;/** +* 0x4 (bit 2) * @force_link_power_on: Force disable ALPM control */ uint32_t force_link_power_on :1 ;/** +* 0x8 (bit 3) * @force_phy_power_on: Force phy power on */ uint32_t force_phy_power_on :1 ;/** +* 0x10 (bit 4) * @timing_resync_disabled: Disabled Replay normal sleep mode timing resync */ uint32_t timing_resync_disabled :1 ;/** +* 0x20 (bit 5) * @skip_crtc_disabled: CRTC disable skipped */ uint32_t skip_crtc_disabled :1 ;/** +* 0x40 (bit 6) * @force_defer_one_frame_update: Force defer one frame update in ultra sleep mode */ uint32_t force_defer_one_frame_update :1 ; +/** +* 0x80 (bit 7) * @disable_delay_alpm_on: Force disable delay alpm on */ uint32_t disable_delay_alpm_on :1 ; +/** +* 0x100 (bit 8) * @disable_desync_error_check: Force disable desync error check */ uint32_t disable_desync_error_check :1 ; +/** -* @disable_desync_error_check: Force disable desync error check +* 0x200 (bit 9) +* @force_self_update_when_abm_non_steady: Force self update if abm is not steady +*/ +uint32_t force_self_update_when_abm_non_steady :1 ; + +/** +* 0x400 (bit 10) +* @force_disable_ips1: Force disable IPS1 state +*/ +uint32_t force_disable_ips1 :1 ; + +/** +* 0x800 (bit 11) +* @force_disable_ips2: Force disable IPS2 state */ -uint32_t disable_dmub_save_restore :1 ; +uint32_t force_disable_ips2 :1 ; -uint32_t reserved :22 ; +uint32_t reserved :20 ; } bitfields;uint32_t u32All;
Signature · 1 line
2.42.0
PATCH 12/14 drm/amd/display: Adjust code style for dmub_cmd.h
In reply to Aurabindo Pillai[Why&How]
Make some formatting changes and rearranging of definitions for consistency.
--- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 162 +++++++++--------- 1 file changed, 81 insertions(+), 81 deletions(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +81 -81
@@ -464,7 +464,8 @@ union replay_hw_flags { };/** -* DMUB visual confirm color +* DMUB feature capabilities. +* After DMUB init, driver will query FW capabilities prior to enabling certain features. */ struct dmub_feature_caps {/**
@@ -641,7 +642,7 @@ union dmub_fw_boot_options { uint32_t enable_dpia: 1; /**< 1 if DPIA should be enabled */ uint32_t invalid_vbios_data: 1; /**< 1 if VBIOS data table is invalid */ uint32_t dpia_supported: 1; /**< 1 if DPIA is supported on this platform */ - uint32_t sel_mux_phy_c_d_phy_f_g: 1; /**< 1 if PHYF/PHYG should be enabled */ + uint32_t sel_mux_phy_c_d_phy_f_g: 1; /**< 1 if PHYF/PHYG should be enabled on DCN31 *//**< 1 if all root clock gating is enabled and low power memory is enabled*/ uint32_t power_optimization: 1; uint32_t diag_env: 1; /* 1 if diagnostic environment */
@@ -787,6 +788,11 @@ enum dmub_gpint_command {*/ DMUB_GPINT__PSR_RESIDENCY =9 , +/** +* DESC: Notifies DMCUB detection is done so detection required can be cleared. +*/ + DMUB_GPINT__NOTIFY_DETECTION_DONE = 12, +/** * DESC: Get REPLAY state from FW. * RETURN: REPLAY state enum. This enum may need to be converted to the legacy REPLAY state value.
@@ -801,11 +807,6 @@ enum dmub_gpint_command {*/ DMUB_GPINT__REPLAY_RESIDENCY = 14, - -/** -* DESC: Notifies DMCUB detection is done so detection required can be cleared. -*/ - DMUB_GPINT__NOTIFY_DETECTION_DONE = 12,/** * DESC: Updates the trace buffer lower 32-bit mask. * ARGS: The new mask
@@ -991,8 +992,9 @@ enum dmub_cmd_type {* Command type used for all panel control commands. */ DMUB_CMD__PANEL_CNTL =74 , +/** -* Command type used for <TODO:description> +* Command type used for all CAB commands. */ DMUB_CMD__CAB_FOR_SS = 75,
@@ -1017,7 +1019,6 @@ enum dmub_cmd_type {/** * Command type used for all VBIOS interface commands. */ -/** * Command type used for all REPLAY commands. */
@@ -1240,6 +1241,28 @@ struct dmub_rb_cmd_PLAT_54186_wa {struct dmub_cmd_PLAT_54186_wa flip;/**< Flip data */ }; +/** +* enum dmub_cmd_mall_type - MALL commands +*/ +enum dmub_cmd_mall_type { +/** +* Allows display refresh from MALL. +*/ +DMUB_CMD__MALL_ACTION_ALLOW =0 , +/** +* Disallows display refresh from MALL. +*/ +DMUB_CMD__MALL_ACTION_DISALLOW =1 , +/** +* Cursor copy for MALL. +*/ +DMUB_CMD__MALL_ACTION_COPY_CURSOR =2 , +/** +* Controls DF requests. +*/ +DMUB_CMD__MALL_ACTION_NO_DF_REQ =3 , +}; +/** * struct dmub_rb_cmd_mall - MALL command data. */
@@ -2078,28 +2101,6 @@ enum psr_version { PSR_VERSION_UNSUPPORTED = 0xFFFFFFFF, }; -/** -* enum dmub_cmd_mall_type - MALL commands -*/ -enum dmub_cmd_mall_type { -/** -* Allows display refresh from MALL. -*/ -DMUB_CMD__MALL_ACTION_ALLOW =0 , -/** -* Disallows display refresh from MALL. -*/ -DMUB_CMD__MALL_ACTION_DISALLOW =1 , -/** -* Cursor copy for MALL. -*/ -DMUB_CMD__MALL_ACTION_COPY_CURSOR =2 , -/** -* Controls DF requests. -*/ -DMUB_CMD__MALL_ACTION_NO_DF_REQ =3 , -}; -/** * PHY Link rate for DP. */
@@ -2760,6 +2761,20 @@ struct dmub_cmd_psr_set_power_opt_data {uint32_t power_opt; }; +/** +* Definition of a DMUB_CMD__SET_PSR_POWER_OPT command. +*/ +struct dmub_rb_cmd_psr_set_power_opt { +/** +* Command header. +*/ +struct dmub_cmd_header header; +/** +* Definition of a DMUB_CMD__SET_PSR_POWER_OPT command. +*/ +struct dmub_cmd_psr_set_power_opt_data psr_set_power_opt_data; +}; +#define REPLAY_RESIDENCY_MODE_SHIFT (0)#define REPLAY_RESIDENCY_ENABLE_SHIFT (1)
@@ -3048,20 +3063,6 @@ struct dmub_rb_cmd_replay_set_power_opt_and_coasting_vtotal {struct dmub_cmd_replay_set_coasting_vtotal_data replay_set_coasting_vtotal_data; }; -/** -* Definition of a DMUB_CMD__SET_PSR_POWER_OPT command. -*/ -struct dmub_rb_cmd_psr_set_power_opt { -/** -* Command header. -*/ -struct dmub_cmd_header header; -/** -* Definition of a DMUB_CMD__SET_PSR_POWER_OPT command. -*/ -struct dmub_cmd_psr_set_power_opt_data psr_set_power_opt_data; -}; -/** * Set of HW components that can be locked. *
@@ -3694,17 +3695,16 @@ struct dmub_rb_cmd_query_feature_caps {*/ struct dmub_cmd_visual_confirm_color_data {/** -* DMUB feature capabilities. -* After DMUB init, driver will query FW capabilities prior to enabling certain features. +* DMUB visual confirm color */ -struct dmub_visual_confirm_color visual_confirm_color; +struct dmub_visual_confirm_color visual_confirm_color; };/** * Definition of a DMUB_CMD__GET_VISUAL_CONFIRM_COLOR command. */ struct dmub_rb_cmd_get_visual_confirm_color { -/** +/** * Command header. */ struct dmub_cmd_header header;
@@ -3714,38 +3714,6 @@ struct dmub_rb_cmd_get_visual_confirm_color {struct dmub_cmd_visual_confirm_color_data visual_confirm_color_data; }; -struct dmub_optc_state { -uint32_t v_total_max; -uint32_t v_total_min; -uint32_t tg_inst; -}; - -struct dmub_rb_cmd_drr_update { -struct dmub_cmd_header header; -struct dmub_optc_state dmub_optc_state_req; -}; - -struct dmub_cmd_fw_assisted_mclk_switch_pipe_data { -uint32_t pix_clk_100hz; -uint8_t max_ramp_step; -uint8_t pipes; -uint8_t min_refresh_in_hz; -uint8_t pipe_count; -uint8_t pipe_index[4 ]; -}; - -struct dmub_cmd_fw_assisted_mclk_switch_config { -uint8_t fams_enabled; -uint8_t visual_confirm_enabled; -uint16_t vactive_stretch_margin_us;// Extra vblank stretch required when doing FPO + Vactive -struct dmub_cmd_fw_assisted_mclk_switch_pipe_data pipe_data[DMUB_MAX_FPO_STREAMS ]; -}; - -struct dmub_rb_cmd_fw_assisted_mclk_switch { -struct dmub_cmd_header header; -struct dmub_cmd_fw_assisted_mclk_switch_config config_data; -}; -/** * enum dmub_cmd_panel_cntl_type - Panel control command. */
@@ -3784,6 +3752,38 @@ struct dmub_rb_cmd_panel_cntl {struct dmub_cmd_panel_cntl_data data;/**< payload */ }; +struct dmub_optc_state { +uint32_t v_total_max; +uint32_t v_total_min; +uint32_t tg_inst; +}; + +struct dmub_rb_cmd_drr_update { +struct dmub_cmd_header header; +struct dmub_optc_state dmub_optc_state_req; +}; + +struct dmub_cmd_fw_assisted_mclk_switch_pipe_data { +uint32_t pix_clk_100hz; +uint8_t max_ramp_step; +uint8_t pipes; +uint8_t min_refresh_in_hz; +uint8_t pipe_count; +uint8_t pipe_index[4 ]; +}; + +struct dmub_cmd_fw_assisted_mclk_switch_config { +uint8_t fams_enabled; +uint8_t visual_confirm_enabled; +uint16_t vactive_stretch_margin_us;// Extra vblank stretch required when doing FPO + Vactive +struct dmub_cmd_fw_assisted_mclk_switch_pipe_data pipe_data[DMUB_MAX_FPO_STREAMS ]; +}; + +struct dmub_rb_cmd_fw_assisted_mclk_switch { +struct dmub_cmd_header header; +struct dmub_cmd_fw_assisted_mclk_switch_config config_data; +}; +/** * Data passed from driver to FW in a DMUB_CMD__VBIOS_LVTMA_CONTROL command. */
Signature · 1 line
2.42.0
PATCH 13/14 drm/amd/display: Adjust code style for hw_sequencer.h
In reply to Aurabindo Pillai[Why&How]
* Rearrange some definitions for consistency
* Drop legacy code
--- .../gpu/drm/amd/display/dc/core/dc_stream.c | 17 ------ drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 7 --- drivers/gpu/drm/amd/display/dc/dc_stream.h | 6 -- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 27 --------- .../drm/amd/display/dc/dcn20/dcn20_hwseq.h | 6 -- .../gpu/drm/amd/display/dc/dcn20/dcn20_init.c | 3 - .../gpu/drm/amd/display/dc/dcn21/dcn21_init.c | 3 - .../gpu/drm/amd/display/dc/inc/hw_sequencer.h | 56 ++++++++----------- 8 files changed, 23 insertions(+), 102 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +0 -17
@@ -288,23 +288,6 @@ static void program_cursor_attributes( } } -#ifndef TRIM_FSFT -/* -* dc_optimize_timing_for_fsft() - dc to optimize timing -*/ -bool dc_optimize_timing_for_fsft ( -struct dc_stream_state *pStream, -unsigned int max_input_rate_in_khz) -{ -struct dc *dc; - - dc = pStream->ctx->dc; - -return (dc->hwss.optimize_timing_for_fsft && - dc->hwss.optimize_timing_for_fsft (dc, &pStream->timing, max_input_rate_in_khz)); -} -#endif -static bool is_subvp_high_refresh_candidate (struct dc_stream_state *stream) {uint32_t refresh_rate;
drivers/gpu/drm/amd/display/dc/dc_hw_types.h +0 -7
@@ -769,9 +769,6 @@ struct dc_crtc_timing_flags { uint32_t LTE_340MCSC_SCRAMBLE:1; uint32_t DSC : 1; /* Use DSC with this timing */ -#ifndef TRIM_FSFT - uint32_t FAST_TRANSPORT: 1; -#endif uint32_t VBLANK_SYNCHRONIZABLE: 1; };
@@ -950,10 +947,6 @@ struct dc_crtc_timing {enum dc_aspect_ratio aspect_ratio;enum scanning_type scan_type; -#ifndef TRIM_FSFT -uint32_t fast_transport_output_rate_100hz; -#endif -struct dc_crtc_timing_flags flags;uint32_t dsc_fixed_bits_per_pixel_x16;/* DSC target bitrate in 1/16 of bpp (e.g. 128 -> 8bpp) */ struct dc_dsc_config dsc_cfg;
drivers/gpu/drm/amd/display/dc/dc_stream.h +0 -6
@@ -520,12 +520,6 @@ struct dc_stream_status *dc_stream_get_status_from_state(struct dc_stream_status *dc_stream_get_status (struct dc_stream_state *dc_stream); -#ifndef TRIM_FSFT -bool dc_optimize_timing_for_fsft ( -struct dc_stream_state *pStream, -unsigned int max_input_rate_in_khz); -#endif -/******************************************************************************* * Cursor interfaces - To manages the cursor within a stream ******************************************************************************/
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +0 -27
@@ -2927,33 +2927,6 @@ void dcn20_fpga_init_hw(struct dc *dc)if (dc->res_pool->hubbub->funcs->init_crb) dc->res_pool->hubbub->funcs->init_crb (dc->res_pool->hubbub); } -#ifndef TRIM_FSFT -bool dcn20_optimize_timing_for_fsft (struct dc *dc, -struct dc_crtc_timing *timing, -unsigned int max_input_rate_in_khz) -{ -unsigned int old_v_front_porch; -unsigned int old_v_total; -unsigned int max_input_rate_in_100hz; -unsigned long long new_v_total; - - max_input_rate_in_100hz = max_input_rate_in_khz *10 ; -if (max_input_rate_in_100hz < timing->pix_clk_100hz) -return false; - - old_v_total = timing->v_total; - old_v_front_porch = timing->v_front_porch; - - timing->fast_transport_output_rate_100hz = timing->pix_clk_100hz; - timing->pix_clk_100hz = max_input_rate_in_100hz; - - new_v_total =div_u64 ((unsigned long long )old_v_total * max_input_rate_in_100hz, timing->pix_clk_100hz); - - timing->v_total = new_v_total; - timing->v_front_porch = old_v_front_porch + (timing->v_total - old_v_total); -return true; -} -#endif void dcn20_set_disp_pattern_generator(const struct dc *dc, struct pipe_ctx *pipe_ctx,
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.h +0 -6
@@ -136,12 +136,6 @@ int dcn20_init_sys_ctx(struct dce_hwseq *hws,struct dc *dc, struct dc_phy_addr_space_config *pa_config); -#ifndef TRIM_FSFT -bool dcn20_optimize_timing_for_fsft (struct dc *dc, -struct dc_crtc_timing *timing, -unsigned int max_input_rate_in_khz); -#endif - void dcn20_set_disp_pattern_generator(const struct dc *dc, struct pipe_ctx *pipe_ctx, enum controller_dp_test_pattern test_pattern,
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_init.c +0 -3
@@ -93,9 +93,6 @@ static const struct hw_sequencer_funcs dcn20_funcs = { .set_backlight_level = dce110_set_backlight_level, .set_abm_immediate_disable = dce110_set_abm_immediate_disable, .set_pipe = dce110_set_pipe, -#ifndef TRIM_FSFT - .optimize_timing_for_fsft = dcn20_optimize_timing_for_fsft, -#endif .enable_lvds_link_output = dce110_enable_lvds_link_output, .enable_tmds_link_output = dce110_enable_tmds_link_output, .enable_dp_link_output = dce110_enable_dp_link_output,
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_init.c +0 -3
@@ -96,9 +96,6 @@ static const struct hw_sequencer_funcs dcn21_funcs = { .set_backlight_level = dcn21_set_backlight_level, .set_abm_immediate_disable = dcn21_set_abm_immediate_disable, .set_pipe = dcn21_set_pipe, -#ifndef TRIM_FSFT - .optimize_timing_for_fsft = dcn20_optimize_timing_for_fsft, -#endif .enable_lvds_link_output = dce110_enable_lvds_link_output, .enable_tmds_link_output = dce110_enable_tmds_link_output, .enable_dp_link_output = dce110_enable_dp_link_output,
drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h +23 -33
108 lines not on this page · raw message
Signature · 1 line
2.42.0
PATCH 14/14 drm/amd/display: 3.2.254
In reply to Aurabindo PillaiFrom: Aric Cyr <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -47,7 +47,7 @@ struct aux_payload;struct set_config_cmd_payload ;struct dmub_notification ; -#define DC_VER "3.2.253" +#define DC_VER "3.2.254"#define MAX_SURFACES 3#define MAX_PLANES 6
Signature · 1 line
2.42.0