DC Patches September 24, 2025
Subsystems (3)
cover DC Patches September 24, 2025
From: Roman Li <[email protected]>
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* Fix slice width calculation for YCbCr420
* Fix DTBCLK gating
* Use NRD cap as lttpr cap
* Consolidate DML2 FP guards
* DML2.1 Update
* Firmware Release 0.1.29.0 changes
Austin Zheng (1):
drm/amd/display: DML2.1 Reintegration
Fangzhi Zuo (1):
drm/amd/display: Prevent Gating DTBCLK before It Is Properly Latched
Ivan Lipski (1):
drm/amd/display: Consolidate two DML2 FP guards
Nicholas Kazlauskas (3):
drm/amd/display: Support possibly NULL link for should_use_dmub_lock drm/amd/display: Rename should_use_dmub_lock to reflect inbox1 usage drm/amd/display: Rename FAMS2 global control lock to DMUB HW control
lock
Peichen Huang (1):
drm/amd/display: lttpr cap should be nrd cap in bw_alloc mode
Relja Vojvodic (1):
drm/amd/display: Correct slice width calculation for YCbCr420
Taimur Hassan (2):
drm/amd/display: [FW Promotion] Release 0.1.29.0 drm/amd/display: Promote DC to 3.2.352
.../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 33 +- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 24 +- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- .../amd/display/dc/dccg/dcn35/dcn35_dccg.c | 2 +- .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 29 +- .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.h | 10 +- .../amd/display/dc/dml2/dml21/dml21_wrapper.c | 2 - .../dml21/inc/dml_top_display_cfg_types.h | 11 + .../dml21/inc/dml_top_soc_parameter_types.h | 7 +- .../display/dc/dml2/dml21/inc/dml_top_types.h | 13 + .../src/dml2_core/dml2_core_dcn4_calcs.c | 55 ++- .../dml21/src/dml2_core/dml2_core_factory.c | 2 + .../src/dml2_core/dml2_core_shared_types.h | 10 +- .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 459 +++++++++--------- .../src/inc/dml2_internal_shared_types.h | 36 +- .../drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c | 2 +- drivers/gpu/drm/amd/display/dc/dsc/dsc.h | 1 + .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 2 +- .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 2 +- .../amd/display/dc/hwss/dcn314/dcn314_hwseq.c | 1 + .../amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 1 + .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 1 + .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 18 +- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.h | 4 +- .../amd/display/dc/hwss/dcn401/dcn401_init.c | 4 +- .../drm/amd/display/dc/hwss/hw_sequencer.h | 10 +- .../display/dc/link/accessories/link_dp_cts.c | 4 +- .../gpu/drm/amd/display/dc/link/link_dpms.c | 2 + .../dc/link/protocols/link_dp_capability.c | 38 +- .../dc/resource/dcn20/dcn20_resource.c | 1 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 204 +++++++- 32 files changed, 663 insertions(+), 331 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/10 drm/amd/display: DML2.1 Reintegration
From: Austin Zheng <[email protected]>
[Summary of changes]
- Updated structs
- Renaming of variables for clarity
--- .../dml21/inc/dml_top_display_cfg_types.h | 11 + .../dml21/inc/dml_top_soc_parameter_types.h | 7 +- .../display/dc/dml2/dml21/inc/dml_top_types.h | 13 + .../src/dml2_core/dml2_core_dcn4_calcs.c | 55 ++- .../dml21/src/dml2_core/dml2_core_factory.c | 2 + .../src/dml2_core/dml2_core_shared_types.h | 10 +- .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 459 +++++++++--------- .../src/inc/dml2_internal_shared_types.h | 36 +- 8 files changed, 336 insertions(+), 257 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml_top_display_cfg_types.h +11 -0
@@ -49,6 +49,11 @@ enum dml2_source_format_class { dml2_422_packed_12 =18 }; +enum dml2_sample_positioning { + dml2_interstitial =0 , + dml2_cosited =1 +}; +enum dml2_rotation_angle { dml2_rotation_0 =0 , dml2_rotation_90 =1 ,
@@ -222,7 +227,11 @@ struct dml2_composition_cfg {struct {bool enabled; +bool easf_enabled; +bool isharp_enabled;bool upsp_enabled; +enum dml2_sample_positioning upsp_sample_positioning; +unsigned int upsp_vtaps;struct {double h_ratio;double v_ratio;
@@ -385,6 +394,7 @@ struct dml2_plane_parameters {// The actual reserved vblank time used for the corresponding stream in mode_programming would be at least as much as this per-plane override. long reserved_vblank_time_ns;unsigned int max_vactive_det_fill_delay_us;// 0 = no reserved time, +ve = explicit max delay +unsigned int vactive_latency_to_hide_for_pstate_admissibility_us;unsigned int gpuvm_min_page_size_kbytes;unsigned int hostvm_min_page_size_kbytes;
@@ -456,6 +466,7 @@ struct dml2_display_cfg {bool enable;bool value; } force_nom_det_size_kbytes; +bool mode_support_check_disable;bool mcache_admissibility_check_disable;bool surface_viewport_size_check_disable;
drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml_top_soc_parameter_types.h +6 -1
@@ -145,6 +145,8 @@ struct dml2_soc_bb {struct dml2_soc_vmin_clock_limits vmin_limit;double lower_bound_bandwidth_dchub; +double fraction_of_urgent_bandwidth_nominal_target; +double fraction_of_urgent_bandwidth_flip_target;unsigned int dprefclk_mhz;unsigned int xtalclk_mhz;unsigned int pcie_refclk_mhz;
@@ -170,6 +172,7 @@ struct dml2_soc_bb {struct dml2_ip_capabilities {unsigned int pipe_count;unsigned int otg_count; +unsigned int TDLUT_33cube_count;unsigned int num_dsc;unsigned int max_num_dp2p0_streams;unsigned int max_num_hdmi_frl_outputs;
@@ -188,7 +191,9 @@ struct dml2_ip_capabilities {unsigned int subvp_prefetch_end_to_mall_start_us;unsigned int subvp_fw_processing_delay;unsigned int max_vactive_det_fill_delay_us; - +unsigned int ppt_max_allow_delay_ns; +unsigned int temp_read_max_allow_delay_us; +unsigned int dummy_pstate_max_allow_delay_us;/* FAMS2 delays */ struct {unsigned int max_allow_delay_us;
drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml_top_types.h +13 -0
@@ -70,6 +70,8 @@ struct dml2_pmo_options {bool disable_dyn_odm;bool disable_dyn_odm_for_multi_stream;bool disable_dyn_odm_for_stream_with_svp; +struct dml2_pmo_pstate_strategy *override_strategy_lists[DML2_MAX_PLANES ]; +unsigned int num_override_strategies_per_list[DML2_MAX_PLANES ]; };struct dml2_options {
@@ -193,6 +195,14 @@ struct dml2_mcache_surface_allocation { } informative; }; +enum dml2_pstate_type { + dml2_pstate_type_uclk, + dml2_pstate_type_ppt, + dml2_pstate_type_temp_read, + dml2_pstate_type_dummy_pstate, + dml2_pstate_type_count +}; +enum dml2_pstate_method { dml2_pstate_method_na =0 ,/* hw exclusive modes */
@@ -310,6 +320,7 @@ struct dml2_mode_support_info {bool NumberOfOTGSupport;bool NumberOfHDMIFRLSupport;bool NumberOfDP2p0Support; +bool NumberOfTDLUT33cubeSupport;bool WritebackScaleRatioAndTapsSupport;bool CursorSupport;bool PitchSupport;
@@ -357,6 +368,8 @@ struct dml2_mode_support_info {unsigned int AlignedCPitch[DML2_MAX_PLANES ];bool g6_temp_read_support;bool temp_read_or_ppt_support; +bool qos_bandwidth_support; +bool dcfclk_support; };// dml2_mode_support_info struct dml2_display_cfg_programming {
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c +29 -26
122 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c +2 -0
@@ -15,6 +15,8 @@ bool dml2_core_create(enum dml2_project_id project_id, struct dml2_core_instancememset (out,0 ,sizeof (struct dml2_core_instance )); + out->project_id = project_id; +switch (project_id) {case dml2_project_dcn4x_stage1: result = false;
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared_types.h +8 -2
@@ -37,6 +37,7 @@ struct dml2_core_ip_params {unsigned int writeback_interface_buffer_size_kbytes;unsigned int max_num_dpp;unsigned int max_num_otg; +unsigned int TDLUT_33cube_count;unsigned int max_num_wb;unsigned int max_dchub_pscl_bw_pix_per_clk;unsigned int max_pscl_lb_bw_pix_per_clk;
@@ -46,6 +47,7 @@ struct dml2_core_ip_params {double max_vscl_ratio;unsigned int max_hscl_taps;unsigned int max_vscl_taps; +unsigned int odm_combine_support_mask;unsigned int num_dsc;unsigned int maximum_dsc_bits_per_component;unsigned int maximum_pixels_per_line_per_dsc_unit;
@@ -82,7 +84,6 @@ struct dml2_core_ip_params {unsigned int subvp_swath_height_margin_lines;unsigned int subvp_fw_processing_delay_us;unsigned int subvp_pstate_allow_width_us; -// MRQ bool dcn_mrq_present;unsigned int zero_size_buffer_entries;
@@ -103,6 +104,8 @@ struct dml2_core_internal_DmlPipe {unsigned int DPPPerSurface;bool ScalerEnabled;bool UPSPEnabled; +unsigned int UPSPVTaps; +enum dml2_sample_positioning UPSPSamplePositioning;enum dml2_rotation_angle RotationAngle;bool mirrored;unsigned int ViewportHeight;
@@ -230,6 +233,7 @@ struct dml2_core_internal_mode_support_info {bool MSOOrODMSplitWithNonDPLink;bool NotEnoughLanesForMSO;bool NumberOfOTGSupport; +bool NumberOfTDLUT33cubeSupport;bool NumberOfHDMIFRLSupport;bool NumberOfDP2p0Support;bool WritebackScaleRatioAndTapsSupport;
@@ -1306,7 +1310,7 @@ struct dml2_core_calcs_CalculateVMRowAndSwath_params {unsigned int HostVMMinPageSize;unsigned int DCCMetaBufferSizeBytes;bool mrq_present; -enum dml2_pstate_method pstate_switch_modes[DML2_MAX_PLANES ]; +enum dml2_pstate_method *pstate_switch_modes;// Output bool *PTEBufferSizeNotExceeded;
@@ -2308,6 +2312,7 @@ struct dml2_core_calcs_mode_support_ex {const struct dml2_display_cfg *in_display_cfg;const struct dml2_mcg_min_clock_table *min_clk_table;int min_clk_index; +enum dml2_project_id project_id;//unsigned int in_state_index; struct dml2_core_internal_mode_support_info *out_evaluation_info; };
@@ -2320,6 +2325,7 @@ struct dml2_core_calcs_mode_programming_ex {const struct dml2_mcg_min_clock_table *min_clk_table;const struct core_display_cfg_support_info *cfg_support_info;int min_clk_index; +enum dml2_project_id project_id;struct dml2_display_cfg_programming *programming; };
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c +241 -218
765 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/inc/dml2_internal_shared_types.h +26 -10
@@ -255,7 +255,7 @@ struct dml2_implicit_svp_meta {unsigned long v_front_porch; }; -struct dml2_fams2_per_method_common_meta { +struct dml2_pstate_per_method_common_meta {/* generic params */ unsigned int allow_start_otg_vline;unsigned int allow_end_otg_vline;
@@ -265,7 +265,7 @@ struct dml2_fams2_per_method_common_meta {double period_us; }; -struct dml2_fams2_meta { +struct dml2_pstate_meta {bool valid;double otg_vline_time_us;unsigned int scheduling_delay_otg_vlines;
@@ -280,14 +280,14 @@ struct dml2_fams2_meta {unsigned int max_vtotal;double min_refresh_rate_hz;double max_frame_time_us; -unsigned int dram_clk_change_blackout_otg_vlines; +unsigned int blackout_otg_vlines;struct {double max_vactive_det_fill_delay_us;unsigned int max_vactive_det_fill_delay_otg_vlines; -struct dml2_fams2_per_method_common_meta common; +struct dml2_pstate_per_method_common_meta common; } method_vactive;struct { -struct dml2_fams2_per_method_common_meta common; +struct dml2_pstate_per_method_common_meta common; } method_vblank;struct {unsigned int programming_delay_otg_vlines;
@@ -296,15 +296,24 @@ struct dml2_fams2_meta {unsigned long phantom_vactive;unsigned long phantom_vfp;unsigned long phantom_vtotal; -struct dml2_fams2_per_method_common_meta common; +struct dml2_pstate_per_method_common_meta common; } method_subvp;struct {unsigned int programming_delay_otg_vlines;unsigned int stretched_vtotal; -struct dml2_fams2_per_method_common_meta common; +struct dml2_pstate_per_method_common_meta common; } method_drr; }; +/* mask of synchronized timings by stream index */ +struct dml2_pmo_synchronized_timing_groups { +unsigned int num_timing_groups; +unsigned int synchronized_timing_group_masks[DML2_MAX_PLANES ]; +bool group_is_drr_enabled[DML2_MAX_PLANES ]; +bool group_is_drr_active[DML2_MAX_PLANES ]; +double group_line_time_us[DML2_MAX_PLANES ]; +}; +struct dml2_optimization_stage3_state {bool performed;bool success;
@@ -319,7 +328,7 @@ struct dml2_optimization_stage3_state {// Meta-data for FAMS2 bool fams2_required; -struct dml2_fams2_meta stream_fams2_meta[DML2_MAX_PLANES ]; +struct dml2_pstate_meta stream_pstate_meta[DML2_MAX_PLANES ];int min_clk_index_for_latency; };
@@ -472,6 +481,7 @@ struct dml2_core_scratch { };struct dml2_core_instance { +enum dml2_project_id project_id;struct dml2_mcg_min_clock_table *minimum_clock_table;struct dml2_core_internal_state_inputs inputs;struct dml2_core_internal_state_intermediates intermediates;
@@ -619,6 +629,12 @@ struct dml2_pmo_optimize_for_stutter_in_out {#define PMO_DCN4_MAX_NUM_VARIANTS 2#define PMO_DCN4_MAX_BASE_STRATEGIES 10 +struct dml2_scheduling_check_locals { +struct dml2_pstate_per_method_common_meta group_common_pstate_meta[DML2_MAX_PLANES ]; +unsigned int sorted_group_gtl_disallow_index[DML2_MAX_PLANES ]; +unsigned int sorted_group_gtl_period_index[DML2_MAX_PLANES ]; +}; + struct dml2_pmo_scratch { union { struct {
@@ -648,7 +664,7 @@ struct dml2_pmo_scratch {// Stores all the implicit SVP meta information indexed by stream index of the display // configuration under inspection, built at optimization stage init struct dml2_implicit_svp_meta stream_svp_meta[DML2_MAX_PLANES ]; -struct dml2_fams2_meta stream_fams2_meta[DML2_MAX_PLANES ]; +struct dml2_pstate_meta stream_pstate_meta[DML2_MAX_PLANES ];unsigned int optimal_vblank_reserved_time_for_stutter_us[DML2_PMO_STUTTER_CANDIDATE_LIST_SIZE ];unsigned int num_stutter_candidates;
@@ -663,7 +679,7 @@ struct dml2_pmo_scratch {double group_line_time_us[DML2_MAX_PLANES ];/* scheduling check locals */ -struct dml2_fams2_per_method_common_meta group_common_fams2_meta[DML2_MAX_PLANES ]; +struct dml2_pstate_per_method_common_meta group_common_pstate_meta[DML2_MAX_PLANES ];unsigned int sorted_group_gtl_disallow_index[DML2_MAX_PLANES ];unsigned int sorted_group_gtl_period_index[DML2_MAX_PLANES ];double group_phase_offset[DML2_MAX_PLANES ];
Signature · 1 line
2.34.1
PATCH 2/10 drm/amd/display: Correct slice width calculation for YCbCr420
In reply to [email protected]From: Relja Vojvodic <[email protected]>
[Why]
-OVT compliance testing for 5120x2880p300Hz YCbCr420 was failing due to incorrect slice width being calculated
[How]
-Ensure slice width is divisible by 2 for 420 to comply with spec
--- drivers/gpu/drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c | 2 +- drivers/gpu/drm/amd/display/dc/dsc/dsc.h | 1 + drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c | 1 + drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 1 + drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 1 + drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 2 ++ drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c | 1 + 7 files changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c +1 -1
@@ -407,7 +407,7 @@ bool dsc_prepare_config(const struct dsc_config *dsc_cfg, struct dsc_reg_values dsc_reg_vals->ich_reset_at_eol = (dsc_cfg->is_odm || dsc_reg_vals->num_slices_h >1 ) ?0xF :0 ;// Need to find the ceiling value for the slice width - dsc_reg_vals->pps.slice_width = (dsc_cfg->pic_width + dsc_cfg->dc_dsc_cfg.num_slices_h -1 ) / dsc_cfg->dc_dsc_cfg.num_slices_h; + dsc_reg_vals->pps.slice_width = (dsc_cfg->pic_width + dsc_cfg->dsc_padding + dsc_cfg->dc_dsc_cfg.num_slices_h -1 ) / dsc_cfg->dc_dsc_cfg.num_slices_h;// TODO: in addition to validating slice height (pic height must be divisible by slice height), // see what happens when the same condition doesn't apply for slice_width/pic_width. dsc_reg_vals->pps.slice_height = dsc_cfg->pic_height / dsc_cfg->dc_dsc_cfg.num_slices_v;
drivers/gpu/drm/amd/display/dc/dsc/dsc.h +1 -0
@@ -41,6 +41,7 @@ struct dsc_config {enum dc_color_depth color_depth;/* Bits per component */ bool is_odm;struct dc_dsc_config dc_dsc_cfg; +uint32_t dsc_padding; };
drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c +1 -0
@@ -108,6 +108,7 @@ static void update_dsc_on_stream(struct pipe_ctx *pipe_ctx, bool enable) dsc_cfg.dc_dsc_cfg = stream->timing.dsc_cfg;ASSERT (dsc_cfg.dc_dsc_cfg.num_slices_h % opp_cnt ==0 ); dsc_cfg.dc_dsc_cfg.num_slices_h /= opp_cnt; + dsc_cfg.dsc_padding = pipe_ctx->dsc_padding_params.dsc_hactive_padding; dsc->funcs->dsc_set_config (dsc, &dsc_cfg, &dsc_optc_cfg); dsc->funcs->dsc_enable (dsc, pipe_ctx->stream_res.opp->inst);
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c +1 -0
@@ -1061,6 +1061,7 @@ void dcn32_update_dsc_on_stream(struct pipe_ctx *pipe_ctx, bool enable) dsc_cfg.dc_dsc_cfg = stream->timing.dsc_cfg;ASSERT (dsc_cfg.dc_dsc_cfg.num_slices_h % opp_cnt ==0 ); dsc_cfg.dc_dsc_cfg.num_slices_h /= opp_cnt; + dsc_cfg.dsc_padding = pipe_ctx->dsc_padding_params.dsc_hactive_padding;if (should_use_dto_dscclk) dccg->funcs->set_dto_dscclk (dccg, dsc->inst, dsc_cfg.dc_dsc_cfg.num_slices_h);
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +1 -0
@@ -364,6 +364,7 @@ static void update_dsc_on_stream(struct pipe_ctx *pipe_ctx, bool enable) dsc_cfg.dc_dsc_cfg = stream->timing.dsc_cfg;ASSERT (dsc_cfg.dc_dsc_cfg.num_slices_h % opp_cnt ==0 ); dsc_cfg.dc_dsc_cfg.num_slices_h /= opp_cnt; + dsc_cfg.dsc_padding = pipe_ctx->dsc_padding_params.dsc_hactive_padding; dsc->funcs->dsc_set_config (dsc, &dsc_cfg, &dsc_optc_cfg); dsc->funcs->dsc_enable (dsc, pipe_ctx->stream_res.opp->inst);
drivers/gpu/drm/amd/display/dc/link/link_dpms.c +2 -0
@@ -841,6 +841,7 @@ void link_set_dsc_on_stream(struct pipe_ctx *pipe_ctx, bool enable) dsc_cfg.dc_dsc_cfg = stream->timing.dsc_cfg;ASSERT (dsc_cfg.dc_dsc_cfg.num_slices_h % opp_cnt ==0 ); dsc_cfg.dc_dsc_cfg.num_slices_h /= opp_cnt; + dsc_cfg.dsc_padding = pipe_ctx->dsc_padding_params.dsc_hactive_padding;if (should_use_dto_dscclk) dccg->funcs->set_dto_dscclk (dccg, dsc->inst, dsc_cfg.dc_dsc_cfg.num_slices_h);
@@ -970,6 +971,7 @@ bool link_set_dsc_pps_packet(struct pipe_ctx *pipe_ctx, bool enable, bool immedi dsc_cfg.color_depth = stream->timing.display_color_depth; dsc_cfg.is_odm = pipe_ctx->next_odm_pipe ? true : false; dsc_cfg.dc_dsc_cfg = stream->timing.dsc_cfg; + dsc_cfg.dsc_padding = pipe_ctx->dsc_padding_params.dsc_hactive_padding; dsc->funcs->dsc_get_packed_pps (dsc, &dsc_cfg, &dsc_packed_pps[0 ]);memcpy (&stream->dsc_packed_pps[0 ], &dsc_packed_pps[0 ],sizeof (stream->dsc_packed_pps));
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +1 -0
@@ -1668,6 +1668,7 @@ bool dcn20_validate_dsc(struct dc *dc, struct dc_state *new_ctx) dsc_cfg.is_odm = pipe_ctx->next_odm_pipe ? true : false; dsc_cfg.dc_dsc_cfg = stream->timing.dsc_cfg; dsc_cfg.dc_dsc_cfg.num_slices_h /= opp_cnt; + dsc_cfg.dsc_padding = pipe_ctx->dsc_padding_params.dsc_hactive_padding;if (!pipe_ctx->stream_res.dsc->funcs->dsc_validate_stream (pipe_ctx->stream_res.dsc, &dsc_cfg))return false;
Signature · 1 line
2.34.1
PATCH 3/10 drm/amd/display: Consolidate two DML2 FP guards
In reply to [email protected]From: Ivan Lipski <[email protected]>
[Why&How]
Consolidate two FP guards into one in dml2 since they are separated by one line of code, independent from the guard.
--- drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c +0 -2
@@ -283,9 +283,7 @@ static bool dml21_check_mode_support(const struct dc *in_dc, struct dc_state *co mode_support->dml2_instance = dml_init->dml2_instance;DC_FP_START ();dml21_map_dc_state_into_dml_display_cfg (in_dc, context, dml_ctx); -DC_FP_END (); dml_ctx->v21.mode_programming.dml2_instance->scratch.build_mode_programming_locals.mode_programming_params.programming = dml_ctx->v21.mode_programming.programming; -DC_FP_START (); is_supported =dml2_check_mode_supported (mode_support);DC_FP_END ();if (!is_supported)
Signature · 1 line
2.34.1
PATCH 4/10 drm/amd/display: Support possibly NULL link for should_use_dmub_lock
In reply to [email protected]From: Nicholas Kazlauskas <[email protected]>
[Why]
It's possible to have a stream enabled without a link or link encoder.
There are cases where we'd still like to interlock the driver programming from firmware programming to ensure that we don't put the hardware in an undefined (or error) state if two programming sequences are simultaneously executed on the same hardware blocks.
[How]
Add an explicit DC parameter to should_use_dmub_lock().
Make pointers to should_use_dmub_lock() const since it's a checker function that shouldn't modify state.
Update the callsites to pass in DC explicitly.
Check that the link is non-NULL before deferencing and performing link based checks.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +-- .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 29 ++++++++++--------- .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.h | 2 +- .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 2 +- .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 2 +- .../display/dc/link/accessories/link_dp_cts.c | 4 +-- 6 files changed, 23 insertions(+), 20 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -2
@@ -4149,7 +4149,7 @@ static void commit_planes_for_stream(struct dc *dc,if ((update_type !=UPDATE_TYPE_FAST ) && stream->update_flags.bits.dsc_changed)if (top_pipe_to_program && top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_enable) { -if (should_use_dmub_lock (stream->link)) { +if (should_use_dmub_lock (dc, stream->link)) {union dmub_hw_lock_flags hw_locks = {0 };struct dmub_hw_lock_inst_flags inst_flags = {0 };
@@ -4419,7 +4419,7 @@ static void commit_planes_for_stream(struct dc *dc, top_pipe_to_program->stream_res.tg, CRTC_STATE_VACTIVE); -if (should_use_dmub_lock (stream->link)) { +if (should_use_dmub_lock (dc, stream->link)) {union dmub_hw_lock_flags hw_locks = {0 };struct dmub_hw_lock_inst_flags inst_flags = {0 };
drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c +16 -13
@@ -61,27 +61,30 @@ void dmub_hw_lock_mgr_inbox0_cmd(struct dc_dmub_srv *dmub_srv,dc_dmub_srv_wait_for_inbox0_ack (dmub_srv); } -bool should_use_dmub_lock (struct dc_link *link) +bool should_use_dmub_lock (const struct dc *dc,const struct dc_link *link) {/* ASIC doesn't support DMUB */ -if (!link->ctx->dmub_srv) +if (!dc->ctx->dmub_srv)return false; -if (link->psr_settings.psr_version ==DC_PSR_VERSION_SU_1 ) -return true; +if (link) { -if (link->replay_settings.replay_feature_enabled) -return true; +if (link->psr_settings.psr_version ==DC_PSR_VERSION_SU_1 ) +return true; + +if (link->replay_settings.replay_feature_enabled) +return true; -/* only use HW lock for PSR1 on single eDP */ -if (link->psr_settings.psr_version ==DC_PSR_VERSION_1 ) { -struct dc_link *edp_links[MAX_NUM_EDP ]; -int edp_num; +/* only use HW lock for PSR1 on single eDP */ +if (link->psr_settings.psr_version ==DC_PSR_VERSION_1 ) { +struct dc_link *edp_links[MAX_NUM_EDP ]; +int edp_num; -dc_get_edp_links (link->dc, edp_links, &edp_num); +dc_get_edp_links (dc, edp_links, &edp_num); -if (edp_num ==1 ) -return true; +if (edp_num ==1 ) +return true; + } }return false;
drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.h +1 -1
@@ -37,6 +37,6 @@ void dmub_hw_lock_mgr_cmd(struct dc_dmub_srv *dmub_srv,void dmub_hw_lock_mgr_inbox0_cmd (struct dc_dmub_srv *dmub_srv,union dmub_inbox0_cmd_lock_hw hw_lock_cmd); -bool should_use_dmub_lock (struct dc_link *link); +bool should_use_dmub_lock (const struct dc *dc,const struct dc_link *link);#endif /*_DMUB_HW_LOCK_MGR_H_ */
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c +1 -1
@@ -2245,7 +2245,7 @@ void dcn10_cursor_lock(struct dc *dc, struct pipe_ctx *pipe, bool lock)if (lock)delay_cursor_until_vupdate (dc, pipe); -if (pipe->stream &&should_use_dmub_lock (pipe->stream->link)) { +if (pipe->stream &&should_use_dmub_lock (dc, pipe->stream->link)) {union dmub_hw_lock_flags hw_locks = {0 };struct dmub_hw_lock_inst_flags inst_flags = {0 };
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c +1 -1
@@ -1449,7 +1449,7 @@ void dcn20_pipe_control_lock( !flip_immediate)dcn20_setup_gsl_group_as_lock (dc, pipe, false); -if (pipe->stream &&should_use_dmub_lock (pipe->stream->link)) { +if (pipe->stream &&should_use_dmub_lock (dc, pipe->stream->link)) {union dmub_hw_lock_flags hw_locks = {0 };struct dmub_hw_lock_inst_flags inst_flags = {0 };
drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c +2 -2
@@ -876,7 +876,7 @@ bool dp_set_test_pattern(return false;if (pipe_ctx->stream_res.tg->funcs->lock_doublebuffer_enable) { -if (should_use_dmub_lock (pipe_ctx->stream->link)) { +if (should_use_dmub_lock (pipe_ctx->stream->link->dc, pipe_ctx->stream->link)) {union dmub_hw_lock_flags hw_locks = {0 };struct dmub_hw_lock_inst_flags inst_flags = {0 };
@@ -924,7 +924,7 @@ bool dp_set_test_pattern( CRTC_STATE_VACTIVE);if (pipe_ctx->stream_res.tg->funcs->lock_doublebuffer_disable) { -if (should_use_dmub_lock (pipe_ctx->stream->link)) { +if (should_use_dmub_lock (pipe_ctx->stream->link->dc, pipe_ctx->stream->link)) {union dmub_hw_lock_flags hw_locks = {0 };struct dmub_hw_lock_inst_flags inst_flags = {0 };
Signature · 1 line
2.34.1
PATCH 5/10 drm/amd/display: Rename should_use_dmub_lock to reflect inbox1 usage
In reply to [email protected]From: Nicholas Kazlauskas <[email protected]>
[Why]
Newer DCN use the DMCUB HW lock via inbox0 for performance reasons while older ones will use inbox1.
The should_use_dmub_lock() function does not describe whether the lock in general should be used, but whether it should be used via inbox1.
[How]
Rename the function to should_use_dmub_inbox1_lock() to reflect this.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.h | 10 +++++++++- .../gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 2 +- .../gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 2 +- .../drm/amd/display/dc/link/accessories/link_dp_cts.c | 4 ++-- 6 files changed, 16 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -2
@@ -4149,7 +4149,7 @@ static void commit_planes_for_stream(struct dc *dc,if ((update_type !=UPDATE_TYPE_FAST ) && stream->update_flags.bits.dsc_changed)if (top_pipe_to_program && top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_enable) { -if (should_use_dmub_lock (dc, stream->link)) { +if (should_use_dmub_inbox1_lock (dc, stream->link)) {union dmub_hw_lock_flags hw_locks = {0 };struct dmub_hw_lock_inst_flags inst_flags = {0 };
@@ -4419,7 +4419,7 @@ static void commit_planes_for_stream(struct dc *dc, top_pipe_to_program->stream_res.tg, CRTC_STATE_VACTIVE); -if (should_use_dmub_lock (dc, stream->link)) { +if (should_use_dmub_inbox1_lock (dc, stream->link)) {union dmub_hw_lock_flags hw_locks = {0 };struct dmub_hw_lock_inst_flags inst_flags = {0 };
drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c +1 -1
@@ -61,7 +61,7 @@ void dmub_hw_lock_mgr_inbox0_cmd(struct dc_dmub_srv *dmub_srv,dc_dmub_srv_wait_for_inbox0_ack (dmub_srv); } -bool should_use_dmub_lock (const struct dc *dc,const struct dc_link *link) +bool should_use_dmub_inbox1_lock (const struct dc *dc,const struct dc_link *link) {/* ASIC doesn't support DMUB */ if (!dc->ctx->dmub_srv)
drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.h +9 -1
@@ -37,6 +37,14 @@ void dmub_hw_lock_mgr_cmd(struct dc_dmub_srv *dmub_srv,void dmub_hw_lock_mgr_inbox0_cmd (struct dc_dmub_srv *dmub_srv,union dmub_inbox0_cmd_lock_hw hw_lock_cmd); -bool should_use_dmub_lock (const struct dc *dc,const struct dc_link *link); +/** +* should_use_dmub_inbox1_lock() - Checks if the DMCUB hardware lock via inbox1 should be used. +* +* @dc: pointer to DC object +* @link: optional pointer to the link object to check for enabled link features +* +* Return: true if the inbox1 lock should be used, false otherwise +*/ +bool should_use_dmub_inbox1_lock (const struct dc *dc,const struct dc_link *link);#endif /*_DMUB_HW_LOCK_MGR_H_ */
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c +1 -1
@@ -2245,7 +2245,7 @@ void dcn10_cursor_lock(struct dc *dc, struct pipe_ctx *pipe, bool lock)if (lock)delay_cursor_until_vupdate (dc, pipe); -if (pipe->stream &&should_use_dmub_lock (dc, pipe->stream->link)) { +if (pipe->stream &&should_use_dmub_inbox1_lock (dc, pipe->stream->link)) {union dmub_hw_lock_flags hw_locks = {0 };struct dmub_hw_lock_inst_flags inst_flags = {0 };
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c +1 -1
@@ -1449,7 +1449,7 @@ void dcn20_pipe_control_lock( !flip_immediate)dcn20_setup_gsl_group_as_lock (dc, pipe, false); -if (pipe->stream &&should_use_dmub_lock (dc, pipe->stream->link)) { +if (pipe->stream &&should_use_dmub_inbox1_lock (dc, pipe->stream->link)) {union dmub_hw_lock_flags hw_locks = {0 };struct dmub_hw_lock_inst_flags inst_flags = {0 };
drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c +2 -2
@@ -876,7 +876,7 @@ bool dp_set_test_pattern(return false;if (pipe_ctx->stream_res.tg->funcs->lock_doublebuffer_enable) { -if (should_use_dmub_lock (pipe_ctx->stream->link->dc, pipe_ctx->stream->link)) { +if (should_use_dmub_inbox1_lock (pipe_ctx->stream->link->dc, pipe_ctx->stream->link)) {union dmub_hw_lock_flags hw_locks = {0 };struct dmub_hw_lock_inst_flags inst_flags = {0 };
@@ -924,7 +924,7 @@ bool dp_set_test_pattern( CRTC_STATE_VACTIVE);if (pipe_ctx->stream_res.tg->funcs->lock_doublebuffer_disable) { -if (should_use_dmub_lock (pipe_ctx->stream->link->dc, pipe_ctx->stream->link)) { +if (should_use_dmub_inbox1_lock (pipe_ctx->stream->link->dc, pipe_ctx->stream->link)) {union dmub_hw_lock_flags hw_locks = {0 };struct dmub_hw_lock_inst_flags inst_flags = {0 };
Signature · 1 line
2.34.1
PATCH 6/10 drm/amd/display: Rename FAMS2 global control lock to DMUB HW control lock
In reply to [email protected]From: Nicholas Kazlauskas <[email protected]>
[Why]
FAMS2 dictates whether the inbox0 HW lock is required, but it is not the only feature that may determine this.
In order to leverage the faster inbox0 HW lock in place of the inbox1 ringbuffer based control lock it's desirable to utilize the HWSS based locking protocol FAMS2 has already implemented.
[How]
Rename the FAMS2 global control lock to DMUB HW control lock.
This is purely a refactor with no functional change, the logic that will determine which features need to enable this HW lock will be added in a future commit.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 29 +++++++++---------- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 24 +++++++-------- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 18 ++++++------ .../amd/display/dc/hwss/dcn401/dcn401_hwseq.h | 4 +-- .../amd/display/dc/hwss/dcn401/dcn401_init.c | 4 +-- .../drm/amd/display/dc/hwss/hw_sequencer.h | 10 +++---- 6 files changed, 44 insertions(+), 45 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +14 -15
@@ -2158,8 +2158,8 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c*/ if (dc->hwss.subvp_pipe_control_lock) dc->hwss.subvp_pipe_control_lock (dc, context, true, true,NULL , subvp_prev_use); -if (dc->hwss.fams2_global_control_lock) - dc->hwss.fams2_global_control_lock (dc, context, true); +if (dc->hwss.dmub_hw_control_lock) + dc->hwss.dmub_hw_control_lock (dc, context, true);if (dc->hwss.update_dsc_pg) dc->hwss.update_dsc_pg (dc, context, false);
@@ -2229,8 +2229,8 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c dc->hwss.commit_subvp_config (dc, context);if (dc->hwss.subvp_pipe_control_lock) dc->hwss.subvp_pipe_control_lock (dc, context, false, true,NULL , subvp_prev_use); -if (dc->hwss.fams2_global_control_lock) - dc->hwss.fams2_global_control_lock (dc, context, false); +if (dc->hwss.dmub_hw_control_lock) + dc->hwss.dmub_hw_control_lock (dc, context, false);for (i =0 ; i < context->stream_count; i++) {const struct dc_link *link = context->streams[i]->link;
@@ -4176,16 +4176,16 @@ static void commit_planes_for_stream(struct dc *dc,if (dc->hwss.subvp_pipe_control_lock) dc->hwss.subvp_pipe_control_lock (dc, context, true, should_lock_all_pipes,NULL , subvp_prev_use); -if (dc->hwss.fams2_global_control_lock) - dc->hwss.fams2_global_control_lock (dc, context, true); +if (dc->hwss.dmub_hw_control_lock) + dc->hwss.dmub_hw_control_lock (dc, context, true); dc->hwss.interdependent_update_lock (dc, context, true); }else {if (dc->hwss.subvp_pipe_control_lock) dc->hwss.subvp_pipe_control_lock (dc, context, true, should_lock_all_pipes, top_pipe_to_program, subvp_prev_use); -if (dc->hwss.fams2_global_control_lock) - dc->hwss.fams2_global_control_lock (dc, context, true); +if (dc->hwss.dmub_hw_control_lock) + dc->hwss.dmub_hw_control_lock (dc, context, true);/* Lock the top pipe while updating plane addrs, since freesync requires * plane addr update event triggers to be synchronized.
@@ -4228,9 +4228,8 @@ static void commit_planes_for_stream(struct dc *dc, dc->hwss.subvp_pipe_control_lock (dc, context, false, should_lock_all_pipes,NULL , subvp_prev_use); -if (dc->hwss.fams2_global_control_lock) - dc->hwss.fams2_global_control_lock (dc, context, false); - +if (dc->hwss.dmub_hw_control_lock) + dc->hwss.dmub_hw_control_lock (dc, context, false);return ; }
@@ -4467,13 +4466,13 @@ static void commit_planes_for_stream(struct dc *dc,if (should_lock_all_pipes && dc->hwss.interdependent_update_lock) {if (dc->hwss.subvp_pipe_control_lock) dc->hwss.subvp_pipe_control_lock (dc, context, false, should_lock_all_pipes,NULL , subvp_prev_use); -if (dc->hwss.fams2_global_control_lock) - dc->hwss.fams2_global_control_lock (dc, context, false); +if (dc->hwss.dmub_hw_control_lock) + dc->hwss.dmub_hw_control_lock (dc, context, false); }else {if (dc->hwss.subvp_pipe_control_lock) dc->hwss.subvp_pipe_control_lock (dc, context, false, should_lock_all_pipes, top_pipe_to_program, subvp_prev_use); -if (dc->hwss.fams2_global_control_lock) - dc->hwss.fams2_global_control_lock (dc, context, false); +if (dc->hwss.dmub_hw_control_lock) + dc->hwss.dmub_hw_control_lock (dc, context, false); }// Fire manual trigger only when bottom plane is flipped
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +12 -12
@@ -755,11 +755,11 @@ void hwss_build_fast_sequence(struct dc *dc, block_sequence[*num_steps].func =DMUB_SUBVP_PIPE_CONTROL_LOCK_FAST ; (*num_steps)++; } -if (dc->hwss.fams2_global_control_lock_fast) { - block_sequence[*num_steps].params.fams2_global_control_lock_fast_params.dc = dc; - block_sequence[*num_steps].params.fams2_global_control_lock_fast_params.lock = true; - block_sequence[*num_steps].params.fams2_global_control_lock_fast_params.is_required =dc_state_is_fams2_in_use (dc, context); - block_sequence[*num_steps].func =DMUB_FAMS2_GLOBAL_CONTROL_LOCK_FAST ; +if (dc->hwss.dmub_hw_control_lock_fast) { + block_sequence[*num_steps].params.dmub_hw_control_lock_fast_params.dc = dc; + block_sequence[*num_steps].params.dmub_hw_control_lock_fast_params.lock = true; + block_sequence[*num_steps].params.dmub_hw_control_lock_fast_params.is_required =dc_state_is_fams2_in_use (dc, context); + block_sequence[*num_steps].func =DMUB_HW_CONTROL_LOCK_FAST ; (*num_steps)++; }if (dc->hwss.pipe_control_lock) {
@@ -894,11 +894,11 @@ void hwss_build_fast_sequence(struct dc *dc, block_sequence[*num_steps].func =DMUB_SUBVP_PIPE_CONTROL_LOCK_FAST ; (*num_steps)++; } -if (dc->hwss.fams2_global_control_lock_fast) { - block_sequence[*num_steps].params.fams2_global_control_lock_fast_params.dc = dc; - block_sequence[*num_steps].params.fams2_global_control_lock_fast_params.lock = false; - block_sequence[*num_steps].params.fams2_global_control_lock_fast_params.is_required =dc_state_is_fams2_in_use (dc, context); - block_sequence[*num_steps].func =DMUB_FAMS2_GLOBAL_CONTROL_LOCK_FAST ; +if (dc->hwss.dmub_hw_control_lock_fast) { + block_sequence[*num_steps].params.dmub_hw_control_lock_fast_params.dc = dc; + block_sequence[*num_steps].params.dmub_hw_control_lock_fast_params.lock = false; + block_sequence[*num_steps].params.dmub_hw_control_lock_fast_params.is_required =dc_state_is_fams2_in_use (dc, context); + block_sequence[*num_steps].func =DMUB_HW_CONTROL_LOCK_FAST ; (*num_steps)++; }
@@ -1001,8 +1001,8 @@ void hwss_execute_sequence(struct dc *dc, params->wait_for_dcc_meta_propagation_params.dc, params->wait_for_dcc_meta_propagation_params.top_pipe_to_program);break ; -case DMUB_FAMS2_GLOBAL_CONTROL_LOCK_FAST : - dc->hwss.fams2_global_control_lock_fast (params); +case DMUB_HW_CONTROL_LOCK_FAST : + dc->hwss.dmub_hw_control_lock_fast (params);break ;default :ASSERT (false);
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +9 -9
@@ -1404,9 +1404,9 @@ void dcn401_prepare_bandwidth(struct dc *dc, }if (dc->debug.fams2_config.bits.enable) { -dcn401_fams2_global_control_lock (dc, context, true); +dcn401_dmub_hw_control_lock (dc, context, true);dcn401_fams2_update_config (dc, context, false); -dcn401_fams2_global_control_lock (dc, context, false); +dcn401_dmub_hw_control_lock (dc, context, false); }if (p_state_change_support != context->bw_ctx.bw.dcn.clk.p_state_change_support) {
@@ -1425,9 +1425,9 @@ void dcn401_optimize_bandwidth(/* enable fams2 if needed */ if (dc->debug.fams2_config.bits.enable) { -dcn401_fams2_global_control_lock (dc, context, true); +dcn401_dmub_hw_control_lock (dc, context, true);dcn401_fams2_update_config (dc, context, true); -dcn401_fams2_global_control_lock (dc, context, false); +dcn401_dmub_hw_control_lock (dc, context, false); }/* program dchubbub watermarks */
@@ -1466,7 +1466,7 @@ void dcn401_optimize_bandwidth( } } -void dcn401_fams2_global_control_lock (struct dc *dc, +void dcn401_dmub_hw_control_lock (struct dc *dc,struct dc_state *context,bool lock) {
@@ -1483,12 +1483,12 @@ void dcn401_fams2_global_control_lock(struct dc *dc,dmub_hw_lock_mgr_inbox0_cmd (dc->ctx->dmub_srv, hw_lock_cmd); } -void dcn401_fams2_global_control_lock_fast (union block_sequence_params *params) +void dcn401_dmub_hw_control_lock_fast (union block_sequence_params *params) { -struct dc *dc = params->fams2_global_control_lock_fast_params.dc; -bool lock = params->fams2_global_control_lock_fast_params.lock; +struct dc *dc = params->dmub_hw_control_lock_fast_params.dc; +bool lock = params->dmub_hw_control_lock_fast_params.lock; -if (params->fams2_global_control_lock_fast_params.is_required) { +if (params->dmub_hw_control_lock_fast_params.is_required) {union dmub_inbox0_cmd_lock_hw hw_lock_cmd = {0 }; hw_lock_cmd.bits.command_code =DMUB_INBOX0_CMD__HW_LOCK ;
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.h +2 -2
@@ -73,11 +73,11 @@ void dcn401_optimize_bandwidth(struct dc *dc, struct dc_state *context); -void dcn401_fams2_global_control_lock (struct dc *dc, +void dcn401_dmub_hw_control_lock (struct dc *dc,struct dc_state *context,bool lock);void dcn401_fams2_update_config (struct dc *dc,struct dc_state *context,bool enable); -void dcn401_fams2_global_control_lock_fast (union block_sequence_params *params); +void dcn401_dmub_hw_control_lock_fast (union block_sequence_params *params);void dcn401_unblank_stream (struct pipe_ctx *pipe_ctx,struct dc_link_settings *link_settings);void dcn401_hardware_release (struct dc *dc); void dcn401_update_odm(struct dc *dc, struct dc_state *context,
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_init.c +2 -2
@@ -95,9 +95,9 @@ static const struct hw_sequencer_funcs dcn401_funcs = { .apply_update_flags_for_phantom = dcn32_apply_update_flags_for_phantom, .wait_for_dcc_meta_propagation = dcn401_wait_for_dcc_meta_propagation, .is_pipe_topology_transition_seamless = dcn32_is_pipe_topology_transition_seamless, - .fams2_global_control_lock = dcn401_fams2_global_control_lock, + .dmub_hw_control_lock = dcn401_dmub_hw_control_lock, .fams2_update_config = dcn401_fams2_update_config, - .fams2_global_control_lock_fast = dcn401_fams2_global_control_lock_fast, + .dmub_hw_control_lock_fast = dcn401_dmub_hw_control_lock_fast, .program_outstanding_updates = dcn401_program_outstanding_updates, .wait_for_all_pending_updates = dcn30_wait_for_all_pending_updates, .detect_pipe_changes = dcn401_detect_pipe_changes,
drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h +5 -5
@@ -148,7 +148,7 @@ struct wait_for_dcc_meta_propagation_params {const struct pipe_ctx *top_pipe_to_program; }; -struct fams2_global_control_lock_fast_params { +struct dmub_hw_control_lock_fast_params {struct dc *dc;bool is_required;bool lock;
@@ -173,7 +173,7 @@ union block_sequence_params {struct set_ocsc_default_params set_ocsc_default_params;struct subvp_save_surf_addr subvp_save_surf_addr;struct wait_for_dcc_meta_propagation_params wait_for_dcc_meta_propagation_params; -struct fams2_global_control_lock_fast_params fams2_global_control_lock_fast_params; +struct dmub_hw_control_lock_fast_params dmub_hw_control_lock_fast_params; };enum block_sequence_func {
@@ -195,7 +195,7 @@ enum block_sequence_func {MPC_SET_OCSC_DEFAULT ,DMUB_SUBVP_SAVE_SURF_ADDR ,HUBP_WAIT_FOR_DCC_META_PROP , -DMUB_FAMS2_GLOBAL_CONTROL_LOCK_FAST , +DMUB_HW_CONTROL_LOCK_FAST ,/* This must be the last value in this enum, add new ones above */ HWSS_BLOCK_SEQUENCE_FUNC_COUNT };
@@ -452,13 +452,13 @@ struct hw_sequencer_funcs { const struct dc_state *new_ctx);void (*wait_for_dcc_meta_propagation)(const struct dc *dc,const struct pipe_ctx *top_pipe_to_program); -void (*fams2_global_control_lock)(struct dc *dc, +void (*dmub_hw_control_lock)(struct dc *dc,struct dc_state *context,bool lock);void (*fams2_update_config)(struct dc *dc,struct dc_state *context,bool enable); -void (*fams2_global_control_lock_fast)(union block_sequence_params *params); +void (*dmub_hw_control_lock_fast)(union block_sequence_params *params);void (*set_long_vtotal)(struct pipe_ctx **pipe_ctx,int num_pipes,uint32_t v_total_min,uint32_t v_total_max);void (*program_outstanding_updates)(struct dc *dc,struct dc_state *context);
Signature · 1 line
2.34.1
PATCH 7/10 drm/amd/display: lttpr cap should be nrd cap in bw_alloc mode
In reply to [email protected]From: Peichen Huang <[email protected]>
[WHY]
When bw allocation mode enabled, dpia may reports lttpr cap with reduced common cap. It would cause driver not start pre-training with max available bandwidth.
[How]
When bw allocation mode enabled, use NRD cap as lttpr cap.
--- .../dc/link/protocols/link_dp_capability.c | 38 ++++++++++++++++++- 1 file changed, 36 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +36 -2
@@ -424,6 +424,21 @@ static enum dc_link_rate get_link_rate_from_max_link_bw(return link_rate; } +static enum dc_lane_count get_lttpr_max_lane_count (struct dc_link *link) +{ +enum dc_lane_count lttpr_max_lane_count =LANE_COUNT_UNKNOWN ; + +if (link->dpcd_caps.lttpr_caps.max_lane_count <=LANE_COUNT_DP_MAX ) + lttpr_max_lane_count = link->dpcd_caps.lttpr_caps.max_lane_count; + +/* if bw_allocation is enabled and nrd_max_lane_count is set, use it */ +if (link->dpia_bw_alloc_config.bw_alloc_enabled && + link->dpia_bw_alloc_config.nrd_max_lane_count >0 ) + lttpr_max_lane_count = link->dpia_bw_alloc_config.nrd_max_lane_count; + +return lttpr_max_lane_count; +} +static enum dc_link_rate get_lttpr_max_link_rate (struct dc_link *link) {
@@ -438,6 +453,11 @@ static enum dc_link_rate get_lttpr_max_link_rate(struct dc_link *link)break ; } +/* if bw_allocation is enabled and nrd_max_link_rate is set, use it */ +if (link->dpia_bw_alloc_config.bw_alloc_enabled && + link->dpia_bw_alloc_config.nrd_max_link_rate >0 ) + lttpr_max_link_rate = link->dpia_bw_alloc_config.nrd_max_link_rate; +if (link->dpcd_caps.lttpr_caps.supported_128b_132b_rates.bits.UHBR20) lttpr_max_link_rate =LINK_RATE_UHBR20 ;else if (link->dpcd_caps.lttpr_caps.supported_128b_132b_rates.bits.UHBR13_5)
@@ -2241,6 +2261,7 @@ const struct dc_link_settings *dp_get_verified_link_cap(struct dc_link_settings dp_get_max_link_cap (struct dc_link *link) {struct dc_link_settings max_link_cap = {0 }; +enum dc_lane_count lttpr_max_lane_count;enum dc_link_rate lttpr_max_link_rate;enum dc_link_rate cable_max_link_rate;struct resource_context *res_ctx = &link->dc->current_state->res_ctx;
@@ -2305,8 +2326,11 @@ struct dc_link_settings dp_get_max_link_cap(struct dc_link *link)/* Some LTTPR devices do not report valid DPCD revisions, if so, do not take it's link cap into consideration. */ if (link->dpcd_caps.lttpr_caps.revision.raw >=DPCD_REV_14 ) { -if (link->dpcd_caps.lttpr_caps.max_lane_count < max_link_cap.lane_count) - max_link_cap.lane_count = link->dpcd_caps.lttpr_caps.max_lane_count; + lttpr_max_lane_count =get_lttpr_max_lane_count (link); + +if (lttpr_max_lane_count < max_link_cap.lane_count) + max_link_cap.lane_count = lttpr_max_lane_count; + lttpr_max_link_rate =get_lttpr_max_link_rate (link);if (lttpr_max_link_rate < max_link_cap.link_rate)
@@ -2412,6 +2436,11 @@ bool dp_verify_link_cap_with_retries(dp_trace_detect_lt_init (link); +DC_LOG_HW_LINK_TRAINING ("%s: Link[%d] LinkRate=0x%x LaneCount=%d" , + __func__, link->link_index, + known_limit_link_setting->link_rate, + known_limit_link_setting->lane_count); +if (link->link_enc && link->link_enc->features.flags.bits.DP_IS_USB_C && link->dc->debug.usbc_combo_phy_reset_wa)apply_usbc_combo_phy_reset_wa (link, known_limit_link_setting);
@@ -2448,6 +2477,11 @@ bool dp_verify_link_cap_with_retries(dp_trace_lt_fail_count_update (link, fail_count, true);dp_trace_set_lt_end_timestamp (link, true); +DC_LOG_HW_LINK_TRAINING ("%s: Link[%d] Exit. is_success=%d fail_count=%d" , + __func__, link->link_index, + success, + fail_count); +return success; }
Signature · 1 line
2.34.1
PATCH 8/10 drm/amd/display: Prevent Gating DTBCLK before It Is Properly Latched
In reply to [email protected]From: Fangzhi Zuo <[email protected]>
[why]
1. With allow_0_dtb_clk enabled, the time required to latch DTBCLK to 600 MHz depends on the SMU. If DTBCLK is not latched to 600 MHz before set_mode completes, gating DTBCLK causes the DP2 sink to lose its clock source.
2. The existing DTBCLK gating sequence ungates DTBCLK based on both pix_clk and ref_dtbclk, but gates DTBCLK when either pix_clk or ref_dtbclk is zero.pix_clk can be zero outside the set_mode sequence before DTBCLK is properly latched, which can lead to DTBCLK being gated by mistake.
[how]
Consider both pixel_clk and ref_dtbclk when determining when it is safe to gate DTBCLK; this is more accurate.
--- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 4 +++- drivers/gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c +3 -1
@@ -394,6 +394,8 @@ void dcn35_update_clocks(struct clk_mgr *clk_mgr_base, display_count =dcn35_get_active_display_cnt_wa (dc, context, &all_active_disps);if (new_clocks->dtbclk_en && !new_clocks->ref_dtbclk_khz) new_clocks->ref_dtbclk_khz =600000 ; +else if (!new_clocks->dtbclk_en && new_clocks->ref_dtbclk_khz >590000 ) + new_clocks->ref_dtbclk_khz =0 ;/* * if it is safe to lower, but we are already in the lower state, we don't have to do anything
@@ -435,7 +437,7 @@ void dcn35_update_clocks(struct clk_mgr *clk_mgr_base, actual_dtbclk =REG_READ (CLK1_CLK4_CURRENT_CNT ); -if (actual_dtbclk) { +if (actual_dtbclk >590000 ) { clk_mgr_base->clks.ref_dtbclk_khz = new_clocks->ref_dtbclk_khz; clk_mgr_base->clks.dtbclk_en = new_clocks->dtbclk_en; }
drivers/gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c +1 -1
@@ -1411,7 +1411,7 @@ static void dccg35_set_dtbclk_dto( __func__, params->otg_inst, params->pixclk_khz, params->ref_dtbclk_khz, req_dtbclk_khz, phase, modulo); - }else { + }else if (!params->ref_dtbclk_khz && !req_dtbclk_khz) {switch (params->otg_inst) {case 0 :REG_UPDATE (DCCG_GATE_DISABLE_CNTL5 ,DTBCLK_P0_GATE_DISABLE ,0 );
Signature · 1 line
2.34.1
PATCH 9/10 drm/amd/display: [FW Promotion] Release 0.1.29.0
In reply to [email protected]From: Taimur Hassan <[email protected]>
Add new interface for offloading cursor programming to DMUB.
--- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 204 +++++++++++++++++- 1 file changed, 203 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +203 -1
@@ -629,6 +629,112 @@ struct dmub_visual_confirm_color {uint16_t panel_inst; }; +/** +* struct dmub_cursor_offload_pipe_data_dcn30_v1 - DCN30+ per pipe data. +*/ +struct dmub_cursor_offload_pipe_data_dcn30_v1 { +uint32_t CURSOR0_0_CURSOR_SURFACE_ADDRESS; +uint32_t CURSOR0_0_CURSOR_SURFACE_ADDRESS_HIGH; +uint32_t CURSOR0_0_CURSOR_SIZE__CURSOR_WIDTH :16 ; +uint32_t CURSOR0_0_CURSOR_SIZE__CURSOR_HEIGHT :16 ; +uint32_t CURSOR0_0_CURSOR_POSITION__CURSOR_X_POSITION :16 ; +uint32_t CURSOR0_0_CURSOR_POSITION__CURSOR_Y_POSITION :16 ; +uint32_t CURSOR0_0_CURSOR_HOT_SPOT__CURSOR_HOT_SPOT_X :16 ; +uint32_t CURSOR0_0_CURSOR_HOT_SPOT__CURSOR_HOT_SPOT_Y :16 ; +uint32_t CURSOR0_0_CURSOR_DST_OFFSET__CURSOR_DST_X_OFFSET :13 ; +uint32_t CURSOR0_0_CURSOR_CONTROL__CURSOR_ENABLE :1 ; +uint32_t CURSOR0_0_CURSOR_CONTROL__CURSOR_MODE :3 ; +uint32_t CURSOR0_0_CURSOR_CONTROL__CURSOR_2X_MAGNIFY :1 ; +uint32_t CURSOR0_0_CURSOR_CONTROL__CURSOR_PITCH :2 ; +uint32_t CURSOR0_0_CURSOR_CONTROL__CURSOR_LINES_PER_CHUNK :5 ; +uint32_t reserved0[4 ]; +uint32_t CNVC_CUR0_CURSOR0_CONTROL__CUR0_ENABLE :1 ; +uint32_t CNVC_CUR0_CURSOR0_CONTROL__CUR0_MODE :3 ; +uint32_t CNVC_CUR0_CURSOR0_CONTROL__CUR0_EXPANSION_MODE :1 ; +uint32_t CNVC_CUR0_CURSOR0_CONTROL__CUR0_ROM_EN :1 ; +uint32_t CNVC_CUR0_CURSOR0_COLOR0__CUR0_COLOR0 :24 ; +uint32_t CNVC_CUR0_CURSOR0_COLOR1__CUR0_COLOR1 :24 ; +uint32_t CNVC_CUR0_CURSOR0_FP_SCALE_BIAS__CUR0_FP_BIAS :16 ; + uint32_t CNVC_CUR0_CURSOR0_FP_SCALE_BIAS__CUR0_FP_SCALE, : 16; +uint32_t reserved1[5 ]; +uint32_t HUBPREQ0_CURSOR_SETTINGS__CURSOR0_DST_Y_OFFSET :8 ; +uint32_t HUBPREQ0_CURSOR_SETTINGS__CURSOR0_CHUNK_HDL_ADJUST :8 ; +uint32_t reserved2[3 ]; +}; + +/** +* struct dmub_cursor_offload_pipe_data_dcn401_v1 - DCN401 per pipe data. +*/ +struct dmub_cursor_offload_pipe_data_dcn401_v1 { +uint32_t CURSOR0_0_CURSOR_SURFACE_ADDRESS; +uint32_t CURSOR0_0_CURSOR_SURFACE_ADDRESS_HIGH; +uint32_t CURSOR0_0_CURSOR_SIZE__CURSOR_WIDTH :16 ; +uint32_t CURSOR0_0_CURSOR_SIZE__CURSOR_HEIGHT :16 ; +uint32_t CURSOR0_0_CURSOR_POSITION__CURSOR_X_POSITION :16 ; +uint32_t CURSOR0_0_CURSOR_POSITION__CURSOR_Y_POSITION :16 ; +uint32_t CURSOR0_0_CURSOR_HOT_SPOT__CURSOR_HOT_SPOT_X :16 ; +uint32_t CURSOR0_0_CURSOR_HOT_SPOT__CURSOR_HOT_SPOT_Y :16 ; +uint32_t CURSOR0_0_CURSOR_DST_OFFSET__CURSOR_DST_X_OFFSET :13 ; +uint32_t CURSOR0_0_CURSOR_CONTROL__CURSOR_ENABLE :1 ; +uint32_t CURSOR0_0_CURSOR_CONTROL__CURSOR_MODE :3 ; +uint32_t CURSOR0_0_CURSOR_CONTROL__CURSOR_2X_MAGNIFY :1 ; +uint32_t CURSOR0_0_CURSOR_CONTROL__CURSOR_PITCH :2 ; +uint32_t CURSOR0_0_CURSOR_CONTROL__CURSOR_LINES_PER_CHUNK :5 ; +uint32_t reserved0[4 ]; +uint32_t CM_CUR0_CURSOR0_CONTROL__CUR0_ENABLE :1 ; +uint32_t CM_CUR0_CURSOR0_CONTROL__CUR0_MODE :3 ; +uint32_t CM_CUR0_CURSOR0_CONTROL__CUR0_EXPANSION_MODE :1 ; +uint32_t CM_CUR0_CURSOR0_CONTROL__CUR0_ROM_EN :1 ; +uint32_t CM_CUR0_CURSOR0_COLOR0__CUR0_COLOR0 :24 ; +uint32_t CM_CUR0_CURSOR0_COLOR1__CUR0_COLOR1 :24 ; +uint32_t CM_CUR0_CURSOR0_FP_SCALE_BIAS_G_Y__CUR0_FP_BIAS_G_Y :16 ; + uint32_t CM_CUR0_CURSOR0_FP_SCALE_BIAS_G_Y__CUR0_FP_SCALE_G_Y, : 16; +uint32_t CM_CUR0_CURSOR0_FP_SCALE_BIAS_RB_CRCB__CUR0_FP_BIAS_RB_CRCB :16 ; +uint32_t CM_CUR0_CURSOR0_FP_SCALE_BIAS_RB_CRCB__CUR0_FP_SCALE_RB_CRCB :16 ; +uint32_t reserved1[4 ]; +uint32_t HUBPREQ0_CURSOR_SETTINGS__CURSOR0_DST_Y_OFFSET :8 ; +uint32_t HUBPREQ0_CURSOR_SETTINGS__CURSOR0_CHUNK_HDL_ADJUST :8 ; +uint32_t HUBP0_DCHUBP_MALL_CONFIG__USE_MALL_FOR_CURSOR :1 ; +uint32_t reserved2[3 ]; +}; + +/** +* struct dmub_cursor_offload_pipe_data_v1 - Per pipe data for cursor offload. +*/ +struct dmub_cursor_offload_pipe_data_v1 { +union { +struct dmub_cursor_offload_pipe_data_dcn30_v1 dcn30;/**< DCN30 cursor data. */ +struct dmub_cursor_offload_pipe_data_dcn401_v1 dcn401;/**< DCN401 cursor data. */ +uint8_t payload[96 ];/**< Guarantees the cursor pipe data size per-pipe. */ + }; +}; + +/** +* struct dmub_cursor_offload_payload_data_v1 - A payload of stream data. +*/ +struct dmub_cursor_offload_payload_data_v1 { +uint32_t write_idx_start;/**< Write index, updated before pipe_data is written. */ +uint32_t write_idx_finish;/**< Write index, updated after pipe_data is written. */ +uint32_t pipe_mask;/**< Mask of pipes to update. */ +uint32_t reserved;/**< Reserved for future use. */ +struct dmub_cursor_offload_pipe_data_v1 pipe_data[6 ];/**< Per-pipe cursor data. */ +}; + +/** +* struct dmub_cursor_offload_stream_v1 - Per-stream data for cursor offload. +*/ +struct dmub_cursor_offload_stream_v1 { +struct dmub_cursor_offload_payload_data_v1 payloads[4 ];/**< A small buffer of cursor payloads. */ +uint32_t write_idx;/**< The index of the last written payload. */ +}; + +/** +* struct dmub_cursor_offload_v1 - Cursor offload feature state. +*/ +struct dmub_cursor_offload_v1 { +struct dmub_cursor_offload_stream_v1 offload_streams[6 ];/**< Per-stream cursor offload data */ +}; +//============================================================================== //</DMUB_TYPES>================================================================= //==============================================================================
@@ -648,7 +754,8 @@ struct dmub_visual_confirm_color {union dmub_fw_meta_feature_bits {struct {uint32_t shared_state_link_detection :1 ;/**< 1 supports link detection via shared state */ -uint32_t reserved :31 ; +uint32_t cursor_offload_v1_support:1 ;/**< 1 supports cursor offload */ +uint32_t reserved :30 ; } bits;/**< status bits */ uint32_t all;/**< 32-bit access to status bits */ };
@@ -813,6 +920,28 @@ enum dmub_ips_comand_type { DMUB_CMD__IPS_QUERY_RESIDENCY_INFO = 1, }; +/** +* enum dmub_cursor_offload_comand_type - Cursor offload subcommands. +*/ +enum dmub_cursor_offload_comand_type { +/** +* Initializes the cursor offload feature. +*/ +DMUB_CMD__CURSOR_OFFLOAD_INIT =0 , +/** +* Enables cursor offloading for a stream and updates the timing parameters. +*/ +DMUB_CMD__CURSOR_OFFLOAD_STREAM_ENABLE =1 , +/** +* Disables cursor offloading for a given stream. +*/ +DMUB_CMD__CURSOR_OFFLOAD_STREAM_DISABLE =2 , +/** +* Programs the latest data for a given stream. +*/ +DMUB_CMD__CURSOR_OFFLOAD_STREAM_PROGRAM =3 , +}; +/** * union dmub_fw_boot_options - Boot option definitions for SCRATCH14 */
@@ -877,6 +1006,7 @@ enum dmub_shared_state_feature_id {DMUB_SHARED_SHARE_FEATURE__IPS_FW =1 ,DMUB_SHARED_SHARE_FEATURE__IPS_DRIVER =2 ,DMUB_SHARED_SHARE_FEATURE__DEBUG_SETUP =3 , +DMUB_SHARED_STATE_FEATURE__CURSOR_OFFLOAD_V1 =4 , DMUB_SHARED_STATE_FEATURE__LAST, /* Total number of features. */ };
@@ -957,6 +1087,22 @@ struct dmub_shared_state_ips_driver {uint32_t reserved[61 ];/**< Reversed, to be updated when adding new fields. */ };/* 248-bytes, fixed */ +/** +* struct dmub_shared_state_cursor_offload_v1 - Header metadata for cursor offload. +*/ +struct dmub_shared_state_cursor_offload_stream_v1 { +uint32_t last_write_idx;/**< Last write index */ +uint8_t reserved[28 ];/**< Reserved bytes. */ +};/* 32-bytes, fixed */ + +/** +* struct dmub_shared_state_cursor_offload_v1 - Header metadata for cursor offload. +*/ +struct dmub_shared_state_cursor_offload_v1 { +struct dmub_shared_state_cursor_offload_stream_v1 offload_streams[6 ];/**< stream state, 32-bytes each */ +uint8_t reserved[56 ];/**< reserved for future use */ +};/* 248-bytes, fixed */ +/** * enum dmub_shared_state_feature_common - Generic payload. */
@@ -983,6 +1129,7 @@ struct dmub_shared_state_feature_block {struct dmub_shared_state_ips_fw ips_fw;/**< IPS firmware state */ struct dmub_shared_state_ips_driver ips_driver;/**< IPS driver state */ struct dmub_shared_state_debug_setup debug_setup;/**< Debug setup */ +struct dmub_shared_state_cursor_offload_v1 cursor_offload_v1;/**< Cursor offload */ } data;/**< Shared state data. */ };/* 256-bytes, fixed */
@@ -1572,6 +1719,14 @@ enum dmub_cmd_type {*/ DMUB_CMD__IPS =91 , +/** +* Command type use for Cursor offload. +*/ +DMUB_CMD__CURSOR_OFFLOAD =92 , + +/** +* Command type use for VBIOS shared commands. +*/ DMUB_CMD__VBIOS = 128, };
@@ -4664,6 +4819,7 @@ enum hw_lock_client {*/ HW_LOCK_CLIENT_REPLAY =4 ,HW_LOCK_CLIENT_FAMS2 =5 , + HW_LOCK_CLIENT_CURSOR_OFFLOAD = 6,/** * Invalid client. */
@@ -6075,6 +6231,40 @@ struct dmub_rb_cmd_ips_query_residency_info {struct dmub_cmd_ips_query_residency_info_data info_data; }; +/** +* struct dmub_cmd_cursor_offload_init_data - Payload for cursor offload init command. +*/ +struct dmub_cmd_cursor_offload_init_data { +union dmub_addr state_addr;/**< State address for dmub_cursor_offload */ +uint32_t state_size;/**< State size for dmub_cursor_offload */ +}; + +/** +* struct dmub_rb_cmd_cursor_offload_init - Data for initializing cursor offload. +*/ +struct dmub_rb_cmd_cursor_offload_init { +struct dmub_cmd_header header; +struct dmub_cmd_cursor_offload_init_data init_data; +}; + +/** +* struct dmub_cmd_cursor_offload_stream_data - Payload for cursor offload stream command. +*/ +struct dmub_cmd_cursor_offload_stream_data { +uint32_t otg_inst:4 ;/**< OTG instance to control */ +uint32_t reserved:28 ;/**< Reserved for future use */ +uint32_t line_time_in_ns;/**< Line time in ns for the OTG */ +uint32_t v_total_max;/**< OTG v_total_max */ +}; + +/** +* struct dmub_rb_cmd_cursor_offload_stream_cntl - Controls a stream for cursor offload. +*/ +struct dmub_rb_cmd_cursor_offload_stream_cntl { +struct dmub_cmd_header header; +struct dmub_cmd_cursor_offload_stream_data data; +}; +/** * union dmub_rb_cmd - DMUB inbox command. */
@@ -6404,6 +6594,18 @@ union dmub_rb_cmd {struct dmub_rb_cmd_ips_residency_cntl ips_residency_cntl;struct dmub_rb_cmd_ips_query_residency_info ips_query_residency_info; +/** +* Definition of a DMUB_CMD__CURSOR_OFFLOAD_INIT command. +*/ +struct dmub_rb_cmd_cursor_offload_init cursor_offload_init; +/** +* Definition of a DMUB_CMD__CURSOR_OFFLOAD control commands. +* - DMUB_CMD__CURSOR_OFFLOAD_STREAM_ENABLE +* - DMUB_CMD__CURSOR_OFFLOAD_STREAM_DISABLE +* - DMUB_CMD__CURSOR_OFFLOAD_STREAM_PROGRAM +* - DMUB_CMD__CURSOR_OFFLOAD_STREAM_UPDATE_DRR +*/ +struct dmub_rb_cmd_cursor_offload_stream_cntl cursor_offload_stream_ctnl; };/**
Signature · 1 line
2.34.1
PATCH 10/10 drm/amd/display: Promote DC to 3.2.352
In reply to [email protected]From: Taimur Hassan <[email protected]>
- Fix slice width calculation for YCbCr420
- Fix DTBCLK gating
- Use NRD cap as lttpr cap
- Consolidate DML2 FP guards
- DML2.1 Update
- Firmware Release 0.1.29.0 changes
--- 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
@@ -55,7 +55,7 @@ struct aux_payload;struct set_config_cmd_payload ;struct dmub_notification ; -#define DC_VER "3.2.351" +#define DC_VER "3.2.352"/** * MAX_SURFACES - representative of the upper bound of surfaces that can be piped to a single CRTC
Signature · 1 line
2.34.1
[Public]
Hi all,
This week this patchset was tested on 4 systems, two dGPU and two APU based, and tested across multiple display and connection types.
APU
* Single Display eDP -> 1080p 60hz, 1920x1200 165hz, 3840x2400 60hz
* Single Display DP (SST DSC) -> 4k144hz, 4k240hz
* Multi display -> eDP + DP/HDMI/USB-C -> 1080p 60hz eDP + 4k 144hz, 4k 240hz (Includes USB-C to DP/HDMI adapters)
* Thunderbolt -> LG Ultrafine 5k
* MST DSC -> Cable Matters 101075 (DP to 3x DP) with 3x 4k60hz displays, HP Hook G2 with 2x 4k60hz displays
* USB 4 -> HP Hook G4, Lenovo Thunderbolt Dock, both with 2x 4k60hz DP and 1x 4k60hz HDMI displays
* SST PCON -> Club3D CAC-1085 + 1x 4k 144hz, FRL3, at a max resolution supported by the dongle of 4k 120hz YUV420 12bpc.
* MST PCON -> 1x 4k 144hz, FRL3, at a max resolution supported by the adapter of 4k 120hz RGB 8bpc.
DGPU
* Single Display DP (SST DSC) -> 4k144hz, 4k240hz
* Multiple Display DP -> 4k240hz + 4k144hz
* MST (Startech MST14DP123DP [DP to 3x DP] and 2x 4k 60hz displays)
* MST DSC (with Cable Matters 101075 [DP to 3x DP] with 3x 4k60hz displays)
The testing is a mix of automated and manual tests. Manual testing includes (but is not limited to)
* Changing display configurations and settings
* Video/Audio playback
* Benchmark testing
* Suspend/Resume testing
* Feature testing (Freesync, HDCP, etc.)
Automated testing includes (but is not limited to)
* Script testing (scripts to automate some of the manual checks)
* IGT testing
The testing is mainly tested on the following displays, but occasionally there are tests with other displays
* Samsung G8 Neo 4k240hz
* Samsung QN55QN95B 4k 120hz
* Acer XV322QKKV 4k144hz
* HP U27 4k Wireless 4k60hz
* LG 27UD58B 4k60hz
* LG 32UN650WA 4k60hz
* LG Ultrafine 5k 5k60hz
* AU Optronics B140HAN01.1 1080p 60hz eDP
* AU Optronics B160UAN01.J 1920x1200 165hz eDP
* Samsung ATNA60YV02-0 3840x2400 60Hz OLED eDP
The patchset consists of the amd-staging-drm-next branch (Head commit - 1880960e845adaa5a356e4ce3572f1e4c221c529 -> drm/amdgpu: Use kmalloc_array() instead of kmalloc()) with new patches added on top of it.
Tested on Ubuntu 24.04.3, on Wayland and X11, using Gnome.
Thank you,
Dan Wheeler
Sr. Technologist | AMD
SW Display
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
amd.com
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Wednesday, September 24, 2025 2:22 PM
To: [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Zuo, Jerry <[email protected]>; Wheeler, Daniel <[email protected]>; Wu, Ray <[email protected]>; LIPSKI, IVAN <[email protected]>; Hung, Alex <[email protected]>; Li, Roman <[email protected]>
Subject: [PATCH 00/10] DC Patches September 24, 2025
From: Roman Li <[email protected]>
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* Fix slice width calculation for YCbCr420
* Fix DTBCLK gating
* Use NRD cap as lttpr cap
* Consolidate DML2 FP guards
* DML2.1 Update
* Firmware Release 0.1.29.0 changes
Austin Zheng (1):
drm/amd/display: DML2.1 Reintegration
Fangzhi Zuo (1):
drm/amd/display: Prevent Gating DTBCLK before It Is Properly Latched
Ivan Lipski (1):
drm/amd/display: Consolidate two DML2 FP guards
Nicholas Kazlauskas (3):
drm/amd/display: Support possibly NULL link for should_use_dmub_lock drm/amd/display: Rename should_use_dmub_lock to reflect inbox1 usage drm/amd/display: Rename FAMS2 global control lock to DMUB HW control
lock
Peichen Huang (1):
drm/amd/display: lttpr cap should be nrd cap in bw_alloc mode
Relja Vojvodic (1):
drm/amd/display: Correct slice width calculation for YCbCr420
Taimur Hassan (2):
drm/amd/display: [FW Promotion] Release 0.1.29.0 drm/amd/display: Promote DC to 3.2.352
.../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 33 +- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 24 +- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- .../amd/display/dc/dccg/dcn35/dcn35_dccg.c | 2 +- .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 29 +- .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.h | 10 +- .../amd/display/dc/dml2/dml21/dml21_wrapper.c | 2 - .../dml21/inc/dml_top_display_cfg_types.h | 11 + .../dml21/inc/dml_top_soc_parameter_types.h | 7 +- .../display/dc/dml2/dml21/inc/dml_top_types.h | 13 + .../src/dml2_core/dml2_core_dcn4_calcs.c | 55 ++- .../dml21/src/dml2_core/dml2_core_factory.c | 2 + .../src/dml2_core/dml2_core_shared_types.h | 10 +- .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 459 +++++++++--------- .../src/inc/dml2_internal_shared_types.h | 36 +- .../drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c | 2 +- drivers/gpu/drm/amd/display/dc/dsc/dsc.h | 1 + .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 2 +- .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 2 +- .../amd/display/dc/hwss/dcn314/dcn314_hwseq.c | 1 + .../amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 1 + .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 1 + .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 18 +- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.h | 4 +- .../amd/display/dc/hwss/dcn401/dcn401_init.c | 4 +- .../drm/amd/display/dc/hwss/hw_sequencer.h | 10 +- .../display/dc/link/accessories/link_dp_cts.c | 4 +- .../gpu/drm/amd/display/dc/link/link_dpms.c | 2 + .../dc/link/protocols/link_dp_capability.c | 38 +- .../dc/resource/dcn20/dcn20_resource.c | 1 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 204 +++++++- 32 files changed, 663 insertions(+), 331 deletions(-)
--
2.34.1