DC Patches April 02, 2026
cover DC Patches April 02, 2026
From: Roman Li <[email protected]>
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* Enable sink freesync via MCCS with pcon whitelist adjustments
* Rework YCbCr422 DSC policy
* Update DML2.1 parameters
* Fix coding style issues and compiler warnings
Charlene Liu (2):
drm/amd/display: update dcn42 bounding box drm/amd/display: Restore "Move setup_stream_attribute"
Chuanyu Tseng (1):
drm/amd/display: Fix coding style issue
Dmytro Laktyushkin (2):
drm/amd/display: update dcn42 memory latencies drm/amd/display: move memory latency update to dml for dcn42
Gaghik Khachatrian (2):
drm/amd/display: Fix unused parameters warnings in dml2_0 drm/amd/display: Fix implicit narrowing conversions in modules
George Shen (1):
drm/amd/display: Remove unnecessary Freesync w/a from DCN32
Nicholas Kazlauskas (5):
drm/amd/display: Fix HostVMMinPageSize unit mismatch in DML2.1 drm/amd/display: Correct MALL parameters for DCN42 soc bb drm/amd/display: Pass min page size from SOC BB to dml2_1 plane config drm/amd/display: Fix DCN42 gpuvm_min_page_size_kbytes in SOC BB drm/amd/display: Add DCN42 PMO policy for DML2.1
Relja Vojvodic (1):
drm/amd/display: Rework YCbCr422 DSC policy
Roman Li (1):
drm/amd/display: Drop unused tiling formats from dml2
Taimur Hassan (1):
drm/amd/display: Promote DC to 3.2.377
Wayne Lin (5):
drm/amd/display: Adjust freesync pcon whitelist drm/amd/display: Parse freesync mccs vcp code drm/amd/display: Read sink freesync support via mccs drm/amd/display: Enable sink freesync via MCCS drm/amd/display: Avoid to do MCCS transaction if unnecessary
Zheng, Austin (1):
drm/amd/display: Remove Duplicate Prefetch Parameter
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 74 ++++-- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 7 +- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 241 ++++++++++++++++++ .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 78 ------ drivers/gpu/drm/amd/display/dc/dc.h | 5 +- drivers/gpu/drm/amd/display/dc/dc_dsc.h | 1 + drivers/gpu/drm/amd/display/dc/dc_types.h | 6 + .../dc/dio/virtual/virtual_stream_encoder.c | 10 + drivers/gpu/drm/amd/display/dc/dm_helpers.h | 10 + .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 37 --- .../gpu/drm/amd/display/dc/dml2_0/Makefile | 1 + .../amd/display/dc/dml2_0/display_mode_core.c | 17 ++ .../amd/display/dc/dml2_0/display_mode_util.c | 14 + .../dml2_0/dml21/dml21_translation_helper.c | 24 +- .../amd/display/dc/dml2_0/dml21/dml21_utils.c | 2 + .../dc/dml2_0/dml21/dml21_wrapper_fpu.c | 2 + .../dml21/inc/bounding_boxes/dcn42_soc_bb.h | 25 +- .../dml21/inc/dml_top_display_cfg_types.h | 14 - .../dml21/src/dml2_core/dml2_core_dcn4.c | 5 +- .../src/dml2_core/dml2_core_dcn4_calcs.c | 37 ++- .../src/dml2_core/dml2_core_shared_types.h | 1 - .../dml21/src/dml2_core/dml2_core_utils.c | 65 +---- .../dml21/src/dml2_core/dml2_core_utils.h | 2 - .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 1 + .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 2 + .../dml21/src/dml2_mcg/dml2_mcg_factory.c | 1 + .../dml21/src/dml2_pmo/dml2_pmo_dcn42.c | 192 ++++++++++++++ .../dml21/src/dml2_pmo/dml2_pmo_dcn42.h | 17 ++ .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 21 +- .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.h | 10 + .../dml21/src/dml2_pmo/dml2_pmo_factory.c | 3 + .../dml21/src/dml2_top/dml2_top_soc15.c | 2 + .../display/dc/dml2_0/dml2_dc_resource_mgmt.c | 9 + .../dc/dml2_0/dml2_translation_helper.c | 6 + .../drm/amd/display/dc/dml2_0/dml2_utils.c | 1 + .../dc/dml2_0/dml_display_rq_dlg_calc.c | 1 + drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 13 +- .../drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c | 2 +- .../drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c | 2 +- .../amd/display/dc/dsc/dcn401/dcn401_dsc.c | 2 +- .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 2 + .../drm/amd/display/dc/link/link_detection.c | 25 +- .../gpu/drm/amd/display/dc/link/link_dpms.c | 6 +- .../dc/link/protocols/link_dp_capability.c | 5 +- .../dc/resource/dcn31/dcn31_resource.c | 2 + .../dc/resource/dcn315/dcn315_resource.c | 2 + .../dcn42/dcn42_soc_and_ip_translator.c | 4 + .../amd/display/include/ddc_service_types.h | 1 + .../amd/display/modules/freesync/freesync.c | 32 ++- .../amd/display/modules/power/power_helpers.c | 49 ++-- .../gpu/drm/amd/display/modules/vmid/vmid.c | 8 +- 52 files changed, 799 insertions(+), 302 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn42.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn42.h
Signature · 1 line
2.34.1
PATCH 1/22 drm/amd/display: Fix unused parameters warnings in dml2_0
From: Gaghik Khachatrian <[email protected]>
[Why] Resolve warnings by marking unused parameters explicitly.
[How] Keep parameter names in signatures and add a line with
'(void)param;' inside the function body
Preserved function signatures and avoids breaking code paths that may reference the parameter under conditional compilation.
--- .../amd/display/dc/dml2_0/display_mode_core.c | 17 ++++++++++++++ .../amd/display/dc/dml2_0/display_mode_util.c | 14 +++++++++++ .../dml2_0/dml21/dml21_translation_helper.c | 3 +++ .../amd/display/dc/dml2_0/dml21/dml21_utils.c | 2 ++ .../dc/dml2_0/dml21/dml21_wrapper_fpu.c | 2 ++ .../dml21/src/dml2_core/dml2_core_dcn4.c | 1 + .../src/dml2_core/dml2_core_dcn4_calcs.c | 23 +++++++++++++++++++ .../dml21/src/dml2_core/dml2_core_utils.c | 1 + .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 1 + .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 2 ++ .../dml21/src/dml2_mcg/dml2_mcg_factory.c | 1 + .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 5 ++++ .../dml21/src/dml2_pmo/dml2_pmo_factory.c | 3 +++ .../dml21/src/dml2_top/dml2_top_soc15.c | 2 ++ .../display/dc/dml2_0/dml2_dc_resource_mgmt.c | 9 ++++++++ .../dc/dml2_0/dml2_translation_helper.c | 6 +++++ .../drm/amd/display/dc/dml2_0/dml2_utils.c | 1 + .../dc/dml2_0/dml_display_rq_dlg_calc.c | 1 + 18 files changed, 94 insertions(+)
drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_core.c +17 -0
@@ -1812,6 +1812,8 @@ static dml_float_t CalculateWriteBackDISPCLK( dml_uint_t WritebackLineBufferSize, dml_float_t DISPCLKDPPCLKVCOSpeed) { + (void)WritebackPixelFormat; + (void)WritebackVRatio;dml_float_t DISPCLK_H ,DISPCLK_V ,DISPCLK_HB ;DISPCLK_H = PixelClock *dml_ceil (WritebackHTaps /8.0 ,1 ) / WritebackHRatio;
@@ -1830,6 +1832,8 @@ static dml_float_t CalculateWriteBackDelay( dml_uint_t WritebackSourceHeight, dml_uint_t HTotal) { + (void)WritebackPixelFormat; + (void)WritebackHRatio;dml_float_t CalculateWriteBackDelay;dml_float_t Line_length;dml_float_t Output_lines_last_notclamped;
@@ -1977,6 +1981,7 @@ static void CalculateFlipSchedule( dml_float_t *final_flip_bw, dml_bool_t *ImmediateFlipSupportedForPipe) { + (void )HostVMMinPageSize;dml_float_t min_row_time =0.0 ;dml_uint_t HostVMDynamicLevelsTrips =0 ;dml_float_t TimeForFetchingMetaPTEImmediateFlip =0 ;
@@ -2118,6 +2123,11 @@ static void CalculateDCCConfiguration( dml_uint_t *IndependentBlockLuma, dml_uint_t *IndependentBlockChroma) { + (void )SurfaceWidthChroma; + (void )SurfaceHeightChroma; + (void )TilingFormat; + (void )BytePerPixelDETY; + (void )BytePerPixelDETC;dml_uint_t DETBufferSizeForDCC = nomDETInKByte *1024 ;dml_uint_t yuv420;
@@ -2489,6 +2499,7 @@ static dml_uint_t CalculateVMAndRowBytes( dml_uint_t *DPDE0BytesFrame, dml_uint_t *MetaPTEBytesFrame) { + (void )SourcePixelFormat;dml_uint_t MPDEBytesFrame;dml_uint_t DCCMetaSurfaceBytes;dml_uint_t ExtraDPDEBytesFrame;
@@ -3662,6 +3673,8 @@ static void CalculateVMGroupAndRequestTimes( dml_float_t TimePerVMRequestVBlank[], dml_float_t TimePerVMRequestFlip[]) { + (void)dpte_row_width_luma_ub; + (void)dpte_row_width_chroma_ub;dml_uint_t num_group_per_lower_vm_stage;dml_uint_t num_req_per_lower_vm_stage;
@@ -3762,6 +3775,7 @@ static void CalculateVMGroupAndRequestTimes(static void CalculateStutterEfficiency (struct display_mode_lib_scratch_st *scratch,struct CalculateStutterEfficiency_params_st *p) { + (void )scratch;dml_float_t DETBufferingTimeY =0 ;dml_float_t SwathWidthYCriticalSurface =0 ;dml_float_t SwathHeightYCriticalSurface =0 ;
@@ -4085,6 +4099,7 @@ static void CalculateStutterEfficiency(struct display_mode_lib_scratch_st *scratstatic void CalculateSwathAndDETConfiguration (struct display_mode_lib_scratch_st *scratch,struct CalculateSwathAndDETConfiguration_params_st *p) { + (void )scratch;dml_uint_t MaximumSwathHeightY[__DML_NUM_PLANES__];dml_uint_t MaximumSwathHeightC[__DML_NUM_PLANES__];dml_uint_t RoundedUpMaxSwathSizeBytesY[__DML_NUM_PLANES__];
@@ -4331,6 +4346,7 @@ static void CalculateSwathWidth( dml_uint_t swath_width_luma_ub[], // per-pipe dml_uint_t swath_width_chroma_ub[]) // per-pipe { + (void)BytePerPixY;enum dml_odm_mode MainSurfaceODMMode;dml_uint_t surface_width_ub_l;dml_uint_t surface_height_ub_l;
@@ -5029,6 +5045,7 @@ static void CalculateMaxDETAndMinCompressedBufferSize( dml_uint_t *nomDETInKByte, dml_uint_t *MinCompressedBufferSizeInKByte) { + (void )ROBBufferSizeInKByte; *MaxTotalDETInKByte = ConfigReturnBufferSizeInKByte - ConfigReturnBufferSegmentSizeInKByte; *nomDETInKByte = (dml_uint_t)(dml_floor ((dml_float_t) *MaxTotalDETInKByte / (dml_float_t ) MaxNumDPP, ConfigReturnBufferSegmentSizeInKByte)); *MinCompressedBufferSizeInKByte = ConfigReturnBufferSizeInKByte - *MaxTotalDETInKByte;
drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_util.c +14 -0
@@ -178,6 +178,7 @@ dml_float_t dml_log2(dml_float_t x)dml_float_t dml_round (dml_float_t val,dml_bool_t bankers_rounding) { + (void )bankers_rounding;// if (bankers_rounding) // return (dml_float_t) lrint(val); // else {
@@ -217,6 +218,7 @@ dml_uint_t dml_round_to_multiple(dml_uint_t num, dml_uint_t multiple, dml_bool_tvoid dml_print_data_rq_regs_st (const dml_display_plane_rq_regs_st *rq_regs) { + (void )rq_regs;dml_print ("DML: ===================================== \n" );dml_print ("DML: DISPLAY_PLANE_RQ_REGS_ST\n" );dml_print ("DML: chunk_size = 0x%x\n" , rq_regs->chunk_size);
@@ -248,6 +250,7 @@ void dml_print_rq_regs_st(const dml_display_rq_regs_st *rq_regs)void dml_print_dlg_regs_st (const dml_display_dlg_regs_st *dlg_regs) { + (void )dlg_regs;dml_print ("DML: ===================================== \n" );dml_print ("DML: DISPLAY_DLG_REGS_ST \n" );dml_print ("DML: refcyc_h_blank_end = 0x%x\n" , dlg_regs->refcyc_h_blank_end);
@@ -299,6 +302,7 @@ void dml_print_dlg_regs_st(const dml_display_dlg_regs_st *dlg_regs)void dml_print_ttu_regs_st (const dml_display_ttu_regs_st *ttu_regs) { + (void )ttu_regs;dml_print ("DML: ===================================== \n" );dml_print ("DML: DISPLAY_TTU_REGS_ST \n" );dml_print ("DML: qos_level_low_wm = 0x%x\n" , ttu_regs->qos_level_low_wm);
@@ -326,6 +330,7 @@ void dml_print_ttu_regs_st(const dml_display_ttu_regs_st *ttu_regs)void dml_print_dml_policy (const struct dml_mode_eval_policy_st *policy) { + (void )policy;dml_print ("DML: ===================================== \n" );dml_print ("DML: DML_MODE_EVAL_POLICY_ST\n" );dml_print ("DML: Policy: UseUnboundedRequesting = 0x%x\n" , policy->UseUnboundedRequesting);
@@ -353,6 +358,8 @@ void dml_print_dml_policy(const struct dml_mode_eval_policy_st *policy)void dml_print_mode_support (struct display_mode_lib_st *mode_lib,dml_uint_t j) { + (void )j; + (void )mode_lib;dml_print ("DML: MODE SUPPORT: ===============================================\n" );dml_print ("DML: MODE SUPPORT: Voltage State %d\n" , j);dml_print ("DML: MODE SUPPORT: Mode Supported : %s\n" , mode_lib->ms.support.ModeSupport[j] == true ?"Supported" :"NOT Supported" );
@@ -526,6 +533,7 @@ void dml_print_dml_mode_support_info(const struct dml_mode_support_info_st *suppvoid dml_print_dml_display_cfg_timing (const struct dml_timing_cfg_st *timing,dml_uint_t num_plane) { + (void )timing;for (dml_uint_t i =0 ; i < num_plane; i++) {dml_print ("DML: timing_cfg: plane=%d, HTotal = %d\n" , i, timing->HTotal[i]);dml_print ("DML: timing_cfg: plane=%d, VTotal = %d\n" , i, timing->VTotal[i]);
@@ -542,6 +550,7 @@ void dml_print_dml_display_cfg_timing(const struct dml_timing_cfg_st *timing, dmvoid dml_print_dml_display_cfg_plane (const struct dml_plane_cfg_st *plane,dml_uint_t num_plane) { + (void )plane;dml_print ("DML: plane_cfg: num_plane = %d\n" , num_plane);dml_print ("DML: plane_cfg: GPUVMEnable = %d\n" , plane->GPUVMEnable);dml_print ("DML: plane_cfg: HostVMEnable = %d\n" , plane->HostVMEnable);
@@ -590,6 +599,7 @@ void dml_print_dml_display_cfg_plane(const struct dml_plane_cfg_st *plane, dml_uvoid dml_print_dml_display_cfg_surface (const struct dml_surface_cfg_st *surface,dml_uint_t num_plane) { + (void )surface;for (dml_uint_t i =0 ; i < num_plane; i++) {dml_print ("DML: surface_cfg: plane=%d, PitchY = %d\n" , i, surface->PitchY[i]);dml_print ("DML: surface_cfg: plane=%d, SurfaceWidthY = %d\n" , i, surface->SurfaceWidthY[i]);
@@ -609,6 +619,7 @@ void dml_print_dml_display_cfg_surface(const struct dml_surface_cfg_st *surface,void dml_print_dml_display_cfg_hw_resource (const struct dml_hw_resource_st *hw,dml_uint_t num_plane) { + (void )hw;for (dml_uint_t i =0 ; i < num_plane; i++) {dml_print ("DML: hw_resource: plane=%d, ODMMode = %d\n" , i, hw->ODMMode[i]);dml_print ("DML: hw_resource: plane=%d, DPPPerSurface = %d\n" , i, hw->DPPPerSurface[i]);
@@ -620,6 +631,7 @@ void dml_print_dml_display_cfg_hw_resource(const struct dml_hw_resource_st *hw, __DML_DLL_EXPORT__ void dml_print_soc_state_bounding_box(const struct soc_state_bounding_box_st *state) { + (void )state;dml_print ("DML: state_bbox: socclk_mhz = %f\n" , state->socclk_mhz);dml_print ("DML: state_bbox: dscclk_mhz = %f\n" , state->dscclk_mhz);dml_print ("DML: state_bbox: phyclk_mhz = %f\n" , state->phyclk_mhz);
@@ -649,6 +661,7 @@ __DML_DLL_EXPORT__ void dml_print_soc_state_bounding_box(const struct soc_state_ __DML_DLL_EXPORT__ void dml_print_soc_bounding_box(const struct soc_bounding_box_st *soc) { + (void )soc;dml_print ("DML: soc_bbox: dprefclk_mhz = %f\n" , soc->dprefclk_mhz);dml_print ("DML: soc_bbox: xtalclk_mhz = %f\n" , soc->xtalclk_mhz);dml_print ("DML: soc_bbox: pcierefclk_mhz = %f\n" , soc->pcierefclk_mhz);
@@ -686,6 +699,7 @@ __DML_DLL_EXPORT__ void dml_print_soc_bounding_box(const struct soc_bounding_box __DML_DLL_EXPORT__ void dml_print_clk_cfg(const struct dml_clk_cfg_st *clk_cfg) { + (void )clk_cfg;dml_print ("DML: clk_cfg: 0-use_required, 1-use pipe.clks_cfg, 2-use state bbox\n" );dml_print ("DML: clk_cfg: dcfclk_option = %d\n" , clk_cfg->dcfclk_option);dml_print ("DML: clk_cfg: dispclk_option = %d\n" , clk_cfg->dispclk_option);
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.c +3 -0
@@ -441,6 +441,7 @@ static void populate_dml21_surface_config_from_plane_state( struct dml2_surface_cfg *surface, const struct dc_plane_state *plane_state) { + (void)in_dc; surface->plane0.pitch = plane_state->plane_size.surface_pitch; surface->plane1.pitch = plane_state->plane_size.chroma_pitch; surface->plane0.height = plane_state->plane_size.surface_size.height;
@@ -873,6 +874,7 @@ static struct dml2_dchub_watermark_regs *wm_set_index_to_dc_wm_set(union dcn_watvoid dml21_extract_watermark_sets (const struct dc *in_dc,union dcn_watermark_set *watermarks,struct dml2_context *in_ctx) { + (void )in_dc;const struct dml2_display_cfg_programming *programming = in_ctx->v21.mode_programming.programming;unsigned int wm_index;
@@ -907,6 +909,7 @@ void dml21_get_pipe_mcache_config( struct dml2_per_plane_programming *pln_prog, struct dml2_pipe_configuration_descriptor *mcache_pipe_config) { + (void)context; mcache_pipe_config->plane0.viewport_x_start = pipe_ctx->plane_res.scl_data.viewport.x; mcache_pipe_config->plane0.viewport_width = pipe_ctx->plane_res.scl_data.viewport.width;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_utils.c +2 -0
@@ -88,6 +88,7 @@ int dml21_find_dc_pipes_for_plane(const struct dc *in_dc, struct pipe_ctx *dc_phantom_pipes[__DML2_WRAPPER_MAX_STREAMS_PLANES__], int dml_plane_idx) { + (void)in_dc;unsigned int dml_stream_index;unsigned int main_stream_id;unsigned int dc_plane_index;
@@ -282,6 +283,7 @@ static struct dc_plane_state *dml21_add_phantom_plane(struct dml2_context *dml_c struct dc_plane_state *main_plane, struct dml2_per_plane_programming *plane_programming) { + (void)plane_programming;struct dc_plane_state *phantom_plane; phantom_plane = dml_ctx->config.svp_pstate.callbacks.create_phantom_plane (dc, context, main_plane);
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.c +2 -0
@@ -51,6 +51,8 @@ void dml21_reinit(const struct dc *in_dc, struct dml2_context *dml_ctx, const ststatic void dml21_calculate_rq_and_dlg_params (const struct dc *dc,struct dc_state *context,struct resource_context *out_new_hw_state,struct dml2_context *in_ctx,unsigned int pipe_cnt) { + (void )out_new_hw_state; + (void )pipe_cnt;unsigned int dml_prog_idx =0 , dc_pipe_index =0 , num_dpps_required =0 ;struct dml2_per_plane_programming *pln_prog =NULL ;struct dml2_per_stream_programming *stream_prog =NULL ;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.c +1 -0
@@ -281,6 +281,7 @@ static void create_phantom_stream_from_main_stream(struct dml2_stream_parametersstatic void create_phantom_plane_from_main_plane (struct dml2_plane_parameters *phantom,const struct dml2_plane_parameters *main,const struct dml2_stream_parameters *phantom_stream,int phantom_stream_index,const struct dml2_stream_parameters *main_stream) { + (void )main_stream;memcpy (phantom, main,sizeof (struct dml2_plane_parameters )); phantom->stream_index = phantom_stream_index;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.c +23 -0
@@ -840,6 +840,7 @@ static void CalculateSwathWidth( unsigned int swath_width_luma_ub[], // per-pipe unsigned int swath_width_chroma_ub[]) // per-pipe { + (void)BytePerPixY;enum dml2_odm_mode MainSurfaceODMMode;double odm_hactive_factor =1.0 ;unsigned int req_width_horz_y;
@@ -1283,6 +1284,8 @@ static double TruncToValidBPP(// Output unsigned int *RequiredSlots) { + (void )DSCInputBitPerComponent; + (void )RequiredSlots;double MaxLinkBPP;unsigned int MinDSCBPP;double MaxDSCBPP;
@@ -1922,6 +1925,7 @@ static void CalculateRowBandwidth( double *dpte_row_bw, double *meta_row_bw) { + (void)use_one_row_for_frame;if (!DCCEnable || !mrq_present) { *meta_row_bw =0 ; }else if (dml_is_420 (SourcePixelFormat) || SourcePixelFormat == dml2_rgbe_alpha) {
@@ -2020,6 +2024,11 @@ static void CalculateDCCConfiguration(unsigned int *IndependentBlockLuma, unsigned int *IndependentBlockChroma) { + (void)SurfaceWidthChroma; + (void)SurfaceHeightChroma; + (void)TilingFormat; + (void)BytePerPixelDETY; + (void)BytePerPixelDETC; unsigned int DETBufferSizeForDCC = nomDETInKByte * 1024;unsigned int segment_order_horz_contiguous_luma;
@@ -2270,6 +2279,7 @@ static void calculate_mcache_row_bytes( struct dml2_core_internal_scratch *scratch, struct dml2_core_calcs_calculate_mcache_row_bytes_params *p) { + (void)scratch;unsigned int vmpg_bytes =0 ;unsigned int blk_bytes =0 ;float meta_per_mvmpg_per_channel =0 ;
@@ -3642,6 +3652,8 @@ static double CalculateWriteBackDelay( unsigned int WritebackSourceHeight, unsigned int HTotal) { + (void)WritebackPixelFormat; + (void)WritebackHRatio;double CalculateWriteBackDelay;double Line_length;double Output_lines_last_notclamped;
@@ -3959,6 +3971,7 @@ static enum dml2_odm_mode DecideODMMode(unsigned int HActive, double SurfaceRequiredDISPCLKWithODMCombineThreeToOne, double SurfaceRequiredDISPCLKWithODMCombineFourToOne) { + (void)SurfaceRequiredDISPCLKWithODMCombineFourToOne;enum dml2_odm_mode MinimumRequiredODMModeForMaxDispClock;enum dml2_odm_mode MinimumRequiredODMModeForMaxDSCHActive;enum dml2_odm_mode MinimumRequiredODMModeForMax420HActive;
@@ -4460,6 +4473,8 @@ static double CalculateWriteBackDISPCLK(unsigned int HTotal, unsigned int WritebackLineBufferSize) { + (void)WritebackPixelFormat; + (void)WritebackVRatio; double DISPCLK_H, DISPCLK_V, DISPCLK_HB;DISPCLK_H = PixelClock *math_ceil2 ((double )WritebackHTaps /8.0 ,1 ) / WritebackHRatio;
@@ -4561,6 +4576,10 @@ static void CalculateSurfaceSizeInMall(unsigned int SurfaceSizeInMALL[], bool *ExceededMALLSize) { + (void)Read256BytesBlockWidthY; + (void)Read256BytesBlockWidthC; + (void)Read256BytesBlockHeightY; + (void)Read256BytesBlockHeightC; unsigned int TotalSurfaceSizeInMALLForSS = 0;unsigned int TotalSurfaceSizeInMALLForSubVP =0 ;unsigned int MALLAllocatedForDCNInBytes = MALLAllocatedForDCN *1024 *1024 ;
@@ -4620,6 +4639,7 @@ static void calculate_tdlut_setting( struct dml2_core_internal_scratch *scratch, struct dml2_core_calcs_calculate_tdlut_setting_params *p) { + (void)scratch;// locals unsigned int tdlut_bpe =8 ;unsigned int tdlut_width;
@@ -6503,6 +6523,7 @@ static void CalculateFlipSchedule( double *final_flip_bw, bool *ImmediateFlipSupportedForPipe) { + (void)use_one_row_for_frame_flip;struct dml2_core_shared_CalculateFlipSchedule_locals *l = &s->CalculateFlipSchedule_locals; l->dual_plane =dml_is_420 (SourcePixelFormat) || SourcePixelFormat == dml2_rgbe_alpha;
@@ -9968,6 +9989,8 @@ static void CalculateVMGroupAndRequestTimes( double TimePerVMRequestVBlank[], double TimePerVMRequestFlip[]) { + (void)dpte_row_width_luma_ub; + (void)dpte_row_width_chroma_ub;unsigned int num_group_per_lower_vm_stage =0 ;unsigned int num_req_per_lower_vm_stage =0 ;unsigned int num_group_per_lower_vm_stage_flip;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.c +1 -0
@@ -648,6 +648,7 @@ static void create_phantom_stream_from_main_stream(struct dml2_stream_parametersstatic void create_phantom_plane_from_main_plane (struct dml2_plane_parameters *phantom,const struct dml2_plane_parameters *main,const struct dml2_stream_parameters *phantom_stream,int phantom_stream_index,const struct dml2_stream_parameters *main_stream) { + (void )main_stream;memcpy (phantom, main,sizeof (struct dml2_plane_parameters )); phantom->stream_index = phantom_stream_index;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c +1 -0
@@ -552,6 +552,7 @@ static int get_displays_without_vactive_margin_mask(struct dml2_dpmm_map_mode_tostatic int get_displays_with_fams_mask (struct dml2_dpmm_map_mode_to_soc_dpm_params_in_out *in_out,int latency_hiding_requirement_us) { + (void )latency_hiding_requirement_us;unsigned int i;int displays_with_fams_mask =0x0 ;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_factory.c +2 -0
@@ -8,11 +8,13 @@static bool dummy_map_mode_to_soc_dpm (struct dml2_dpmm_map_mode_to_soc_dpm_params_in_out *in_out) { + (void )in_out;return true; }static bool dummy_map_watermarks (struct dml2_dpmm_map_watermarks_params_in_out *in_out) { + (void )in_out;return true; }
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_factory.c +1 -0
@@ -9,6 +9,7 @@static bool dummy_build_min_clock_table (struct dml2_mcg_build_min_clock_table_params_in_out *in_out) { + (void )in_out;return true; }
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c +5 -0
@@ -428,6 +428,7 @@ static void insert_strategy_into_expanded_list( struct dml2_pmo_pstate_strategy *expanded_strategy_list, unsigned int *num_expanded_strategies) { + (void)stream_count;if (expanded_strategy_list && num_expanded_strategies) {memcpy (&expanded_strategy_list[*num_expanded_strategies], per_stream_pstate_strategy,sizeof (struct dml2_pmo_pstate_strategy ));
@@ -520,6 +521,7 @@ static bool is_variant_method_valid(const struct dml2_pmo_pstate_strategy *base_const unsigned int num_streams_per_variant_method[PMO_DCN4_MAX_DISPLAYS ], const unsigned int stream_count) { + (void)variant_strategy; bool valid = true;unsigned int i;
@@ -1180,6 +1182,7 @@ static bool all_timings_support_svp(const struct dml2_pmo_instance *pmo,static void insert_into_candidate_list (const struct dml2_pmo_pstate_strategy *pstate_strategy,int stream_count,struct dml2_pmo_scratch *scratch) { + (void )stream_count; scratch->pmo_dcn4.pstate_strategy_candidates[scratch->pmo_dcn4.num_pstate_candidates] = *pstate_strategy; scratch->pmo_dcn4.num_pstate_candidates++; }
@@ -1847,6 +1850,7 @@ static void build_subvp_meta_per_stream(struct dml2_pmo_instance *pmo, struct display_configuation_with_meta *display_config, int stream_index) { + (void)display_config;struct dml2_implicit_svp_meta *stream_svp_meta = &pmo->scratch.pmo_dcn4.stream_svp_meta[stream_index];struct dml2_pstate_meta *stream_pstate_meta = &pmo->scratch.pmo_dcn4.stream_pstate_meta[stream_index];
@@ -1990,6 +1994,7 @@ static void setup_planes_for_drr_by_mask(struct display_configuation_with_meta * struct dml2_pmo_instance *pmo, int plane_mask) { + (void)pmo;unsigned int plane_index;struct dml2_plane_parameters *plane;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_factory.c +3 -0
@@ -9,16 +9,19 @@static bool dummy_init_for_stutter (struct dml2_pmo_init_for_stutter_in_out *in_out) { + (void )in_out;return false; }static bool dummy_test_for_stutter (struct dml2_pmo_test_for_stutter_in_out *in_out) { + (void )in_out;return true; }static bool dummy_optimize_for_stutter (struct dml2_pmo_optimize_for_stutter_in_out *in_out) { + (void )in_out;return false; }
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_soc15.c +2 -0
@@ -17,6 +17,7 @@ static void setup_unoptimized_display_config_with_meta(const struct dml2_instancstatic void setup_speculative_display_config_with_meta (const struct dml2_instance *dml,struct display_configuation_with_meta *out,const struct dml2_display_cfg *display_config) { + (void )dml;memcpy (&out->display_config, display_config,sizeof (struct dml2_display_cfg )); out->stage1.min_clk_index_for_latency =0 ; }
@@ -472,6 +473,7 @@ static unsigned int count_elements_in_span(int *array, unsigned int array_size,static bool calculate_h_split_for_scaling_transform (int full_vp_width,int h_active,int num_pipes,enum dml2_scaling_transform scaling_transform,int *pipe_vp_x_start,int *pipe_vp_x_end) { + (void )h_active;int i, slice_width;const char MAX_SCL_VP_OVERLAP =3 ;bool success = false;
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c +9 -0
@@ -178,6 +178,10 @@ static unsigned int find_pipes_assigned_to_plane(struct dml2_context *ctx,static bool validate_pipe_assignment (const struct dml2_context *ctx,const struct dc_state *state,const struct dml_display_cfg_st *disp_cfg,const struct dml2_dml_to_dc_pipe_mapping *mapping) { + (void )ctx; + (void )disp_cfg; + (void )mapping; + (void )state;// int i, j, k; // // unsigned int plane_id;
@@ -292,6 +296,7 @@ static unsigned int find_last_resort_pipe_candidates(const struct dc_state *exis const unsigned int stream_id, unsigned int *last_resort_pipe_candidates) { + (void)stream_id;unsigned int num_last_resort_candidates =0 ;int i;
@@ -541,6 +546,7 @@ static void add_odm_slice_to_odm_tree(struct dml2_context *ctx, struct dc_pipe_mapping_scratch *scratch, unsigned int odm_slice_index) { + (void)ctx;struct pipe_ctx *pipe =NULL ;int i;
@@ -567,6 +573,8 @@ static struct pipe_ctx *add_plane_to_blend_tree(struct dml2_context *ctx,unsigned int odm_slice, struct pipe_ctx *top_pipe) { + (void)ctx; + (void)plane; int i;for (i =0 ; i < pipe_pool->num_pipes_assigned_to_plane_for_mpcc_combine; i++) {
@@ -722,6 +730,7 @@ static void free_unused_pipes_for_plane(struct dml2_context *ctx, struct dc_statstatic void remove_pipes_from_blend_trees (struct dml2_context *ctx,struct dc_state *state,struct dc_plane_pipe_pool *pipe_pool,unsigned int odm_slice) { + (void )ctx;struct pipe_ctx *pipe;int i;
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_translation_helper.c +6 -0
@@ -33,6 +33,7 @@void dml2_init_ip_params (struct dml2_context *dml2,const struct dc *in_dc,struct ip_params_st *out) { + (void )in_dc;switch (dml2->v20.dml_core_ctx.project) {case dml_project_dcn32:case dml_project_dcn321:
@@ -244,6 +245,7 @@ void dml2_init_ip_params(struct dml2_context *dml2, const struct dc *in_dc, struvoid dml2_init_socbb_params (struct dml2_context *dml2,const struct dc *in_dc,struct soc_bounding_box_st *out) { + (void )in_dc; out->dprefclk_mhz = dml2->config.bbox_overrides.dprefclk_mhz; out->xtalclk_mhz = dml2->config.bbox_overrides.xtalclk_mhz; out->pcierefclk_mhz =100 ;
@@ -328,6 +330,7 @@ void dml2_init_socbb_params(struct dml2_context *dml2, const struct dc *in_dc, svoid dml2_init_soc_states (struct dml2_context *dml2,const struct dc *in_dc,const struct soc_bounding_box_st *in_bbox,struct soc_states_st *out) { + (void )in_dc;struct dml2_policy_build_synthetic_soc_states_scratch *s = &dml2->v20.scratch.create_scratch.build_synthetic_socbb_scratch;struct dml2_policy_build_synthetic_soc_states_params *p = &dml2->v20.scratch.build_synthetic_socbb_params;int dcfclk_stas_mhz[NUM_DCFCLK_STAS ] = {0 };
@@ -782,6 +785,7 @@ static void populate_dml_timing_cfg_from_stream_state(struct dml_timing_cfg_st *static void populate_dml_output_cfg_from_stream_state (struct dml_output_cfg_st *out,unsigned int location,const struct dc_stream_state *in,const struct pipe_ctx *pipe,struct dml2_context *dml2) { + (void )pipe;unsigned int output_bpc; out->DSCEnable[location] = (enum dml_dsc_enable )in->timing.flags.DSC;
@@ -1133,6 +1137,7 @@ static void populate_dml_plane_cfg_from_plane_state(struct dml_plane_cfg_st *outstatic unsigned int map_stream_to_dml_display_cfg (const struct dml2_context *dml2,const struct dc_stream_state *stream,const struct dml_display_cfg_st *dml_dispcfg) { + (void )dml_dispcfg;int i =0 ;int location =-1 ;
@@ -1173,6 +1178,7 @@ static bool get_plane_id(struct dml2_context *dml2, const struct dc_state *contestatic unsigned int map_plane_to_dml_display_cfg (const struct dml2_context *dml2,const struct dc_plane_state *plane,const struct dc_state *context,const struct dml_display_cfg_st *dml_dispcfg,unsigned int stream_id,int plane_index) { + (void )dml_dispcfg;unsigned int plane_id;unsigned int i =0 ;unsigned int location =UINT_MAX ;
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_utils.c +1 -0
@@ -465,6 +465,7 @@ void dml2_initialize_det_scratch(struct dml2_context *in_ctx)static unsigned int find_planes_per_stream_and_stream_count (struct dml2_context *in_ctx,struct dml_display_cfg_st *dml_dispcfg,int *num_of_planes_per_stream) { + (void )in_ctx;unsigned int plane_index, stream_index =0 , num_of_streams;for (plane_index =0 ; plane_index < dml_dispcfg->num_surfaces; plane_index++) {
drivers/gpu/drm/amd/display/dc/dml2_0/dml_display_rq_dlg_calc.c +1 -0
@@ -563,6 +563,7 @@ void dml_rq_dlg_get_dlg_reg(dml_display_dlg_regs_st *disp_dlg_regs,void dml_rq_dlg_get_arb_params (struct display_mode_lib_st *mode_lib,dml_display_arb_params_st *arb_param) { + (void )mode_lib;memset (arb_param,0 ,sizeof (*arb_param)); arb_param->max_req_outstanding =256 ; arb_param->min_req_outstanding =256 ;// turn off the sat level feature if this set to max
Signature · 1 line
2.34.1
PATCH 2/22 drm/amd/display: Drop unused tiling formats from dml2
In reply to [email protected]From: Roman Li <[email protected]>
Remove unused legacy tiling format support from dml2. Legacy asics don't use dml2.
--- .../dml21/inc/dml_top_display_cfg_types.h | 14 ---- .../dml21/src/dml2_core/dml2_core_utils.c | 64 +------------------ .../dml21/src/dml2_core/dml2_core_utils.h | 2 - 3 files changed, 2 insertions(+), 78 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_display_cfg_types.h +0 -14
@@ -26,20 +26,6 @@ enum dml2_swizzle_mode { dml2_gfx11_sw_64kb_r_x, dml2_gfx11_sw_256kb_d_x, dml2_gfx11_sw_256kb_r_x, - - dml2_sw_linear_256b,// GFX10 SW_LINEAR only accepts 256 byte aligned pitch - dml2_gfx10_sw_64kb_r_x, - dml2_gfx102_sw_64kb_s, - dml2_gfx102_sw_64kb_s_t, - dml2_gfx102_sw_64kb_s_x, - dml2_gfx102_sw_64kb_r_x, - - dml2_linear_64elements,// GFX7 LINEAR_ALIGNED accepts pitch alignment of the maximum of 64 elements or 256 bytes - dml2_gfx7_1d_thin, - dml2_gfx7_2d_thin_gen_zero, - dml2_gfx7_2d_thin_gen_one, - dml2_gfx7_2d_thin_arlene, - dml2_gfx7_2d_thin_anubis }; enum dml2_source_format_class {
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.c +2 -62
88 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.h +0 -2
@@ -22,8 +22,6 @@ void dml2_core_utils_pipe_plane_mapping(const struct core_display_cfg_support_inbool dml2_core_utils_is_phantom_pipe (const struct dml2_plane_parameters *plane_cfg);unsigned int dml2_core_utils_get_tile_block_size_bytes (enum dml2_swizzle_mode sw_mode,unsigned int byte_per_pixel);bool dml2_core_utils_get_segment_horizontal_contiguous (enum dml2_swizzle_mode sw_mode,unsigned int byte_per_pixel); -unsigned int dml2_core_utils_get_tile_block_size_bytes_backcompat (enum dml2_swizzle_mode sw_mode,unsigned int byte_per_pixel); -bool dml2_core_utils_get_segment_horizontal_contiguous_backcompat (enum dml2_swizzle_mode sw_mode,unsigned int byte_per_pixel);bool dml2_core_utils_is_vertical_rotation (enum dml2_rotation_angle Scan);bool dml2_core_utils_is_linear (enum dml2_swizzle_mode sw_mode);int unsigned dml2_core_utils_get_gfx_version (enum dml2_swizzle_mode sw_mode);
Signature · 1 line
2.34.1
PATCH 3/22 drm/amd/display: update dcn42 bounding box
In reply to [email protected]From: Charlene Liu <[email protected]>
[why]
update according hw spec.
--- .../display/dc/dml2_0/dml21/inc/bounding_boxes/dcn42_soc_bb.h | 2 +- .../display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn42_soc_bb.h +1 -1
@@ -234,7 +234,7 @@ static const struct dml2_ip_capabilities dml2_dcn42_max_ip_caps = { .config_return_buffer_segment_size_in_kbytes = 64, .meta_fifo_size_in_kentries = 32, .compressed_buffer_segment_size_in_kbytes = 64, - .cursor_buffer_size = 24, + .cursor_buffer_size = 42, .max_flip_time_us = 110, .max_flip_time_lines = 50, .hostvm_mode = 0,
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.c +2 -2
@@ -135,7 +135,7 @@ struct dml2_core_ip_params core_dcn42_ip_caps_base = { .cursor_64bpp_support = true, .dynamic_metadata_vm_enabled = false, - .max_num_hdmi_frl_outputs = 0, + .max_num_hdmi_frl_outputs = 1, .max_num_dp2p0_outputs = 2, .max_num_dp2p0_streams = 4, .imall_supported = 1,
@@ -155,7 +155,7 @@ struct dml2_core_ip_params core_dcn42_ip_caps_base = { .min_meta_chunk_size_bytes = 256, .dchub_arb_to_ret_delay = 102, - .hostvm_mode = 1, + .hostvm_mode = 0, };static void patch_ip_caps_with_explicit_ip_params (struct dml2_ip_capabilities *ip_caps,const struct dml2_core_ip_params *ip_params)
Signature · 1 line
2.34.1
PATCH 4/22 drm/amd/display: Rework YCbCr422 DSC policy
In reply to [email protected]From: Relja Vojvodic <[email protected]>
- Reworked YCbCr4:2:2 Native/Simple policy decision making with DSC enabled based on DSC caps and stream signal type
--- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_dsc.h | 1 + drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 13 ++++++------- .../gpu/drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c | 2 +- .../gpu/drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c | 2 +- .../gpu/drm/amd/display/dc/dsc/dcn401/dcn401_dsc.c | 2 +- .../gpu/drm/amd/display/dc/link/link_detection.c | 11 +++++------ drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 3 ++- .../amd/display/dc/resource/dcn31/dcn31_resource.c | 2 ++ .../display/dc/resource/dcn315/dcn315_resource.c | 2 ++ 10 files changed, 22 insertions(+), 18 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -562,6 +562,7 @@ struct dc_config {bool frame_update_cmd_version2;struct spl_sharpness_range dcn_sharpness_range;struct spl_sharpness_range dcn_override_sharpness_range; +bool no_native422_support; };enum visual_confirm {
@@ -986,7 +987,6 @@ struct link_service;* causing an issue or not. */ struct dc_debug_options { -bool native422_support;bool disable_dsc;enum visual_confirm visual_confirm;int visual_confirm_rect_height;
drivers/gpu/drm/amd/display/dc/dc_dsc.h +1 -0
@@ -52,6 +52,7 @@ struct dc_dsc_policy {uint32_t max_target_bpp;uint32_t min_target_bpp;bool enable_dsc_when_not_needed; +bool ycbcr422_simple; };struct dc_dsc_config_options {
drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c +6 -7
@@ -680,9 +680,6 @@ static void get_dsc_enc_caps( }else {build_dsc_enc_caps (dsc, dsc_enc_caps); } - -if (dsc->ctx->dc->debug.native422_support) - dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 =1 ; }/* Returns 'false' if no intersection was found for at least one capability.
@@ -1100,13 +1097,14 @@ static bool setup_dsc_config( branch_max_throughput_mps = dsc_sink_caps->branch_overall_throughput_0_mps;break ;case PIXEL_ENCODING_YCBCR422 : - is_dsc_possible = (bool )dsc_common_caps.color_formats.bits.YCBCR_NATIVE_422; - sink_per_slice_throughput_mps = dsc_sink_caps->throughput_mode_1_mps; - branch_max_throughput_mps = dsc_sink_caps->branch_overall_throughput_1_mps; -if (!is_dsc_possible) { +if (policy.ycbcr422_simple) { is_dsc_possible = (bool )dsc_common_caps.color_formats.bits.YCBCR_SIMPLE_422; dsc_cfg->ycbcr422_simple = is_dsc_possible; sink_per_slice_throughput_mps = dsc_sink_caps->throughput_mode_0_mps; + }else { + is_dsc_possible = (bool )dsc_common_caps.color_formats.bits.YCBCR_NATIVE_422; + sink_per_slice_throughput_mps = dsc_sink_caps->throughput_mode_1_mps; + branch_max_throughput_mps = dsc_sink_caps->branch_overall_throughput_1_mps; }break ;case PIXEL_ENCODING_YCBCR420 :
@@ -1406,6 +1404,7 @@ void dc_dsc_get_policy_for_timing(const struct dc_crtc_timing *timing, policy->min_target_bpp =8 ;/* DP specs limits to 3 x bpc */ policy->max_target_bpp =3 * bpc; + policy->ycbcr422_simple = true;break ;case PIXEL_ENCODING_YCBCR420 :/* DP specs limits to 6 */
drivers/gpu/drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c +1 -1
@@ -100,7 +100,7 @@ void dsc2_get_enc_caps(struct dsc_enc_caps *dsc_enc_caps, int pixel_clock_100Hz) dsc_enc_caps->color_formats.bits.RGB =1 ; dsc_enc_caps->color_formats.bits.YCBCR_444 =1 ; dsc_enc_caps->color_formats.bits.YCBCR_SIMPLE_422 =1 ; - dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 =0 ; + dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 =1 ; dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_420 =1 ; dsc_enc_caps->color_depth.bits.COLOR_DEPTH_8_BPC =1 ;
drivers/gpu/drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c +1 -1
@@ -128,7 +128,7 @@ void dsc35_get_single_enc_caps(struct dsc_enc_caps *dsc_enc_caps, unsigned int m dsc_enc_caps->color_formats.bits.RGB =1 ; dsc_enc_caps->color_formats.bits.YCBCR_444 =1 ; dsc_enc_caps->color_formats.bits.YCBCR_SIMPLE_422 =1 ; - dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 =0 ; + dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 =1 ; dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_420 =1 ; dsc_enc_caps->color_depth.bits.COLOR_DEPTH_8_BPC =1 ;
drivers/gpu/drm/amd/display/dc/dsc/dcn401/dcn401_dsc.c +1 -1
@@ -78,7 +78,7 @@ static void dsc401_get_single_enc_caps(struct dsc_enc_caps *dsc_enc_caps, unsign dsc_enc_caps->color_formats.bits.RGB =1 ; dsc_enc_caps->color_formats.bits.YCBCR_444 =1 ; dsc_enc_caps->color_formats.bits.YCBCR_SIMPLE_422 =1 ; - dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 =0 ; + dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 =1 ; dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_420 =1 ; dsc_enc_caps->color_depth.bits.COLOR_DEPTH_8_BPC =1 ;
drivers/gpu/drm/amd/display/dc/link/link_detection.c +5 -6
@@ -781,10 +781,8 @@ static void restore_phy_clocks_for_destructive_link_verification(const struct dc }static void verify_link_capability_destructive (struct dc_link *link, -struct dc_sink *sink,enum dc_detect_reason reason) { - (void )sink;bool should_prepare_phy_clocks =should_prepare_phy_clocks_for_link_verification (link->dc, reason);
@@ -857,11 +855,11 @@ static bool should_verify_link_capability_destructively(struct dc_link *link,return destrictive; } -static void verify_link_capability (struct dc_link *link,struct dc_sink *sink, +static void verify_link_capability (struct dc_link *link,enum dc_detect_reason reason) {if (should_verify_link_capability_destructively (link, reason)) -verify_link_capability_destructive (link, sink, reason); +verify_link_capability_destructive (link, reason);else verify_link_capability_non_destructive (link); }
@@ -1455,8 +1453,9 @@ bool link_detect(struct dc_link *link, enum dc_detect_reason reason) is_local_sink_detect_success =detect_link_and_local_sink (link, reason); -if (is_local_sink_detect_success && link->local_sink) -verify_link_capability (link, link->local_sink, reason); +if (is_local_sink_detect_success && link->local_sink) { +verify_link_capability (link, reason); + }DC_LOG_DC ("%s: link_index=%d is_local_sink_detect_success=%d pre_link_type=%d link_type=%d\n" , __func__, link->link_index, is_local_sink_detect_success, pre_link_type, link->type);
drivers/gpu/drm/amd/display/dc/link/link_dpms.c +2 -1
@@ -181,7 +181,8 @@ void link_set_all_streams_dpms_off_for_link(struct dc_link *link)/* link can be also enabled by vbios. In this case it is not recorded * in pipe_ctx. Disable link phy here to make sure it is completely off */ -dp_disable_link_phy (link, &link_res, link->connector_signal); +if (dc_is_dp_signal (link->connector_signal)) +dp_disable_link_phy (link, &link_res, link->connector_signal); }void link_resume (struct dc_link *link)
drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c +2 -0
@@ -1968,6 +1968,8 @@ static bool dcn31_resource_construct( dc->config.use_pipe_ctx_sync_logic = true; dc->config.disable_hbr_audio_dp2 = true; + dc->config.no_native422_support = true; +/* read VBIOS LTTPR caps */ {if (ctx->dc_bios->funcs->get_lttpr_caps) {
drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c +2 -0
@@ -1931,6 +1931,8 @@ static bool dcn315_resource_construct( dc->caps.color.mpc.ogam_rom_caps.hlg =0 ; dc->caps.color.mpc.ocsc =1 ; + dc->config.no_native422_support = true; +/* read VBIOS LTTPR caps */ {if (ctx->dc_bios->funcs->get_lttpr_caps) {
Signature · 1 line
2.34.1
PATCH 5/22 drm/amd/display: Remove unnecessary Freesync w/a from DCN32
In reply to [email protected]From: George Shen <[email protected]>
[Why/How]
A workaround was previously used for certain Freesync cases that would override the vstartup_start value from DML to position the SDP correctly. This is no longer needed in DCN32 and above, so remove the workaround.
--- .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 37 ------------------- 1 file changed, 37 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c +0 -37
@@ -1610,38 +1610,6 @@ static bool is_dtbclk_required(struct dc *dc, struct dc_state *context)return false; } -static void dcn20_adjust_freesync_v_startup (const struct dc_crtc_timing *dc_crtc_timing,int *vstartup_start) -{ -struct dc_crtc_timing patched_crtc_timing; -uint32_t asic_blank_end =0 ; -uint32_t asic_blank_start =0 ; -uint32_t newVstartup =0 ; - - patched_crtc_timing = *dc_crtc_timing; - -if (patched_crtc_timing.flags.INTERLACE ==1 ) { -if (patched_crtc_timing.v_front_porch <2 ) - patched_crtc_timing.v_front_porch =2 ; - }else { -if (patched_crtc_timing.v_front_porch <1 ) - patched_crtc_timing.v_front_porch =1 ; - } - -/* blank_start = frame end - front porch */ - asic_blank_start = patched_crtc_timing.v_total - - patched_crtc_timing.v_front_porch; - -/* blank_end = blank_start - active */ - asic_blank_end = asic_blank_start - - patched_crtc_timing.v_border_bottom - - patched_crtc_timing.v_addressable - - patched_crtc_timing.v_border_top; - - newVstartup = asic_blank_end + (patched_crtc_timing.v_total - asic_blank_start); - - *vstartup_start = ((newVstartup > *vstartup_start) ? newVstartup : *vstartup_start); -} -static void dcn32_calculate_dlg_params (struct dc *dc,struct dc_state *context,display_e2e_pipe_params_st *pipes,int pipe_cnt,int vlevel)
@@ -1756,11 +1724,6 @@ static void dcn32_calculate_dlg_params(struct dc *dc, struct dc_state *context, } } -if (context->res_ctx.pipe_ctx[i].stream->adaptive_sync_infopacket.valid) -dcn20_adjust_freesync_v_startup ( - &context->res_ctx.pipe_ctx[i].stream->timing, - &context->res_ctx.pipe_ctx[i].pipe_dlg_param.vstartup_start); - pipe_idx++; }/* If DCN isn't making memory requests we can allow pstate change and lower clocks */
Signature · 1 line
2.34.1
PATCH 6/22 drm/amd/display: Adjust freesync pcon whitelist
In reply to [email protected]From: Wayne Lin <[email protected]>
Add more freesync supported pcon ID into the whitelist.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 ++ drivers/gpu/drm/amd/display/include/ddc_service_types.h | 1 + 2 files changed, 3 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +2 -0
@@ -1400,6 +1400,8 @@ static bool dm_is_freesync_pcon_whitelist(const uint32_t branch_dev_id)case DP_BRANCH_DEVICE_ID_0060AD :case DP_BRANCH_DEVICE_ID_00E04C :case DP_BRANCH_DEVICE_ID_90CC24 : +case DP_BRANCH_DEVICE_ID_001CF8 : +case DP_BRANCH_DEVICE_ID_001FF2 : ret_val = true;break ;default :
drivers/gpu/drm/amd/display/include/ddc_service_types.h +1 -0
@@ -36,6 +36,7 @@#define DP_BRANCH_DEVICE_ID_006037 0x006037#define DP_BRANCH_DEVICE_ID_001CF8 0x001CF8#define DP_BRANCH_DEVICE_ID_0060AD 0x0060AD +#define DP_BRANCH_DEVICE_ID_001FF2 0x001FF2#define DP_BRANCH_HW_REV_10 0x10#define DP_BRANCH_HW_REV_20 0x20
Signature · 1 line
2.34.1
PATCH 7/22 drm/amd/display: Parse freesync mccs vcp code
In reply to [email protected]From: Wayne Lin <[email protected]>
[Why & How]
DMUB supports to parse freesynce mccs vcp code now. Store it for later freesync mccs manipulation.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 45 ++++++++++++------- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 5 +++ drivers/gpu/drm/amd/display/dc/dc_types.h | 2 + 3 files changed, 35 insertions(+), 17 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +28 -17
@@ -13043,6 +13043,7 @@ static bool dm_edid_parser_send_cea(struct amdgpu_display_manager *dm, vsdb->amd_vsdb_version = output->amd_vsdb.amd_vsdb_version; vsdb->min_refresh_rate_hz = output->amd_vsdb.min_frame_rate; vsdb->max_refresh_rate_hz = output->amd_vsdb.max_frame_rate; + vsdb->freesync_mccs_vcp_code = output->amd_vsdb.freesync_mccs_vcp_code; }else {drm_warn (adev_to_drm (dm->adev),"Unknown EDID CEA parser results\n" );return false;
@@ -13077,6 +13078,8 @@ static bool parse_edid_cea_dmcu(struct amdgpu_display_manager *dm, vsdb_info->amd_vsdb_version = version; vsdb_info->min_refresh_rate_hz = min_rate; vsdb_info->max_refresh_rate_hz = max_rate; +/* Not enabled on DMCU*/ + vsdb_info->freesync_mccs_vcp_code =0 ;return true; }/* not amd vsdb */
@@ -13329,14 +13332,19 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector, }else if (drm_edid && sink->sink_signal ==SIGNAL_TYPE_HDMI_TYPE_A ) { i =parse_hdmi_amd_vsdb (amdgpu_dm_connector, edid, &vsdb_info); -if (i >=0 && vsdb_info.freesync_supported) { - amdgpu_dm_connector->min_vfreq = vsdb_info.min_refresh_rate_hz; - amdgpu_dm_connector->max_vfreq = vsdb_info.max_refresh_rate_hz; -if (amdgpu_dm_connector->max_vfreq - amdgpu_dm_connector->min_vfreq >10 ) - freesync_capable = true; +if (i >=0 ) { + amdgpu_dm_connector->vsdb_info = vsdb_info; + sink->edid_caps.freesync_vcp_code = vsdb_info.freesync_mccs_vcp_code; - connector->display_info.monitor_range.min_vfreq = vsdb_info.min_refresh_rate_hz; - connector->display_info.monitor_range.max_vfreq = vsdb_info.max_refresh_rate_hz; +if (vsdb_info.freesync_supported) { + amdgpu_dm_connector->min_vfreq = vsdb_info.min_refresh_rate_hz; + amdgpu_dm_connector->max_vfreq = vsdb_info.max_refresh_rate_hz; +if (amdgpu_dm_connector->max_vfreq - amdgpu_dm_connector->min_vfreq >10 ) + freesync_capable = true; + + connector->display_info.monitor_range.min_vfreq = vsdb_info.min_refresh_rate_hz; + connector->display_info.monitor_range.max_vfreq = vsdb_info.max_refresh_rate_hz; + } } }
@@ -13345,19 +13353,22 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,if (as_type ==FREESYNC_TYPE_PCON_IN_WHITELIST ) { i =parse_hdmi_amd_vsdb (amdgpu_dm_connector, edid, &vsdb_info); -if (i >=0 && vsdb_info.freesync_supported && vsdb_info.amd_vsdb_version >0 ) { - - amdgpu_dm_connector->pack_sdp_v1_3 = true; - amdgpu_dm_connector->as_type = as_type; +if (i >=0 ) { amdgpu_dm_connector->vsdb_info = vsdb_info; + sink->edid_caps.freesync_vcp_code = vsdb_info.freesync_mccs_vcp_code; - amdgpu_dm_connector->min_vfreq = vsdb_info.min_refresh_rate_hz; - amdgpu_dm_connector->max_vfreq = vsdb_info.max_refresh_rate_hz; -if (amdgpu_dm_connector->max_vfreq - amdgpu_dm_connector->min_vfreq >10 ) - freesync_capable = true; +if (vsdb_info.freesync_supported && vsdb_info.amd_vsdb_version >0 ) { + amdgpu_dm_connector->pack_sdp_v1_3 = true; + amdgpu_dm_connector->as_type = as_type; - connector->display_info.monitor_range.min_vfreq = vsdb_info.min_refresh_rate_hz; - connector->display_info.monitor_range.max_vfreq = vsdb_info.max_refresh_rate_hz; + amdgpu_dm_connector->min_vfreq = vsdb_info.min_refresh_rate_hz; + amdgpu_dm_connector->max_vfreq = vsdb_info.max_refresh_rate_hz; +if (amdgpu_dm_connector->max_vfreq - amdgpu_dm_connector->min_vfreq >10 ) + freesync_capable = true; + + connector->display_info.monitor_range.min_vfreq = vsdb_info.min_refresh_rate_hz; + connector->display_info.monitor_range.max_vfreq = vsdb_info.max_refresh_rate_hz; + } } }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +5 -0
@@ -772,6 +772,11 @@ struct amdgpu_hdmi_vsdb_info {*/ unsigned int max_refresh_rate_hz; +/** +* @freesync_mccs_vcp_code: MCCS VCP code for freesync state +*/ +unsigned int freesync_mccs_vcp_code; +/** * @replay_mode: Replay supported */
drivers/gpu/drm/amd/display/dc/dc_types.h +2 -0
@@ -205,6 +205,8 @@ struct dc_edid_caps {uint32_t audio_latency;uint32_t video_latency; +unsigned int freesync_vcp_code; +uint8_t qs_bit;uint8_t qy_bit;
Signature · 1 line
2.34.1
PATCH 8/22 drm/amd/display: Read sink freesync support via mccs
In reply to [email protected]From: Wayne Lin <[email protected]>
If EDID AMD VSDB declares that sink supports MCCS method for freesync usage, send mccs request to understand sink freesync current supporting state.
If sink supports freesync but user toggles OSD to turn off it, disable freesync.
If HDMI sink doesn't support MCCS method for freesync usage, disable freesync as well.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 + .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 165 ++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dc_types.h | 4 + drivers/gpu/drm/amd/display/dc/dm_helpers.h | 5 + .../drm/amd/display/dc/link/link_detection.c | 14 ++ 6 files changed, 197 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +8 -0
@@ -13372,6 +13372,14 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector, } } +/* Handle MCCS */ +dm_helpers_read_mccs_caps (adev->dm.dc->ctx, amdgpu_dm_connector->dc_link, sink); +if ((sink->sink_signal ==SIGNAL_TYPE_HDMI_TYPE_A || + as_type ==FREESYNC_TYPE_PCON_IN_WHITELIST ) && + (!sink->edid_caps.freesync_vcp_code || + (sink->edid_caps.freesync_vcp_code && !sink->mccs_caps.freesync_supported))) + freesync_capable = false; + update:if (dm_con_state) dm_con_state->freesync_capable = freesync_capable;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +165 -0
174 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -2725,6 +2725,7 @@ struct dc_sink {struct stereo_3d_features features_3d[TIMING_3D_FORMAT_MAX ];bool converter_disable_audio; +struct mccs_caps mccs_caps;struct scdc_caps scdc_caps;struct dc_sink_dsc_caps dsc_caps;struct dc_sink_fec_caps fec_caps;
drivers/gpu/drm/amd/display/dc/dc_types.h +4 -0
@@ -1315,6 +1315,10 @@ struct dc_panel_config { } rio; }; +struct mccs_caps { +bool freesync_supported; +}; +#define MAX_SINKS_PER_LINK 4/*
drivers/gpu/drm/amd/display/dc/dm_helpers.h +5 -0
@@ -181,6 +181,11 @@ enum dc_edid_status dm_helpers_read_local_edid(struct dc_link *link, struct dc_sink *sink); +void dm_helpers_read_mccs_caps ( +struct dc_context *ctx, +struct dc_link *link, +struct dc_sink *sink); + bool dm_helpers_dp_handle_test_pattern_request( struct dc_context *ctx, const struct dc_link *link,
drivers/gpu/drm/amd/display/dc/link/link_detection.c +14 -0
@@ -1234,6 +1234,20 @@ static bool detect_link_and_local_sink(struct dc_link *link,if (dc_is_hdmi_signal (link->connector_signal))read_scdc_caps (link->ddc, link->local_sink); +/* When FreeSync is toggled through OSD, +* we see same EDID no matter what. Check MCCS caps +* to see if we should update FreeSync caps now. +*/ +dm_helpers_read_mccs_caps ( + link->ctx, + link, + sink); + +if (prev_sink !=NULL ) { +if (memcmp (&sink->mccs_caps, &prev_sink->mccs_caps,sizeof (struct mccs_caps ))) + same_edid = false; + } +if (link->connector_signal ==SIGNAL_TYPE_DISPLAY_PORT && sink_caps.transaction_type ==DDC_TRANSACTION_TYPE_I2C_OVER_AUX ) {
Signature · 1 line
2.34.1
PATCH 9/22 drm/amd/display: Enable sink freesync via MCCS
In reply to [email protected]From: Wayne Lin <[email protected]>
If sink like HDMI indicates supporting freesync via MCCS, explicitly to send vcp set command on sink to enable freesync.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 + .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 74 +++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dm_helpers.h | 5 ++ 3 files changed, 81 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -0
@@ -13379,6 +13379,8 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector, (!sink->edid_caps.freesync_vcp_code || (sink->edid_caps.freesync_vcp_code && !sink->mccs_caps.freesync_supported))) freesync_capable = false; +if (sink->mccs_caps.freesync_supported && freesync_capable) +dm_helpers_mccs_vcp_set (adev->dm.dc->ctx, amdgpu_dm_connector->dc_link, sink); update:if (dm_con_state)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +74 -0
77 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dm_helpers.h +5 -0
@@ -186,6 +186,11 @@ void dm_helpers_read_mccs_caps(struct dc_link *link, struct dc_sink *sink); +void dm_helpers_mccs_vcp_set ( +struct dc_context *ctx, +struct dc_link *link, +struct dc_sink *sink); + bool dm_helpers_dp_handle_test_pattern_request( struct dc_context *ctx, const struct dc_link *link,
Signature · 1 line
2.34.1
PATCH 10/22 drm/amd/display: Avoid to do MCCS transaction if unnecessary
In reply to [email protected]From: Wayne Lin <[email protected]>
We don't have to do MCCS/DDCCI transactions with sink side every time by calling get_modes(). Limit it to be operated when hotplug occurs.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23 +++++++++++-------- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +- 3 files changed, 15 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +13 -10
@@ -3928,7 +3928,7 @@ void amdgpu_dm_update_connector_after_detect(if (sink) {if (aconnector->dc_sink) { -amdgpu_dm_update_freesync_caps (connector,NULL ); +amdgpu_dm_update_freesync_caps (connector,NULL , true);/* * retain and release below are used to * bump up refcount for sink because the link doesn't point
@@ -3940,9 +3940,9 @@ void amdgpu_dm_update_connector_after_detect( aconnector->dc_sink = sink;dc_sink_retain (aconnector->dc_sink);amdgpu_dm_update_freesync_caps (connector, - aconnector->drm_edid); + aconnector->drm_edid, true); }else { -amdgpu_dm_update_freesync_caps (connector,NULL ); +amdgpu_dm_update_freesync_caps (connector,NULL , true);if (!aconnector->dc_sink) { aconnector->dc_sink = aconnector->dc_em_sink;dc_sink_retain (aconnector->dc_sink);
@@ -3986,7 +3986,7 @@ void amdgpu_dm_update_connector_after_detect(* If yes, put it here. */ if (aconnector->dc_sink) { -amdgpu_dm_update_freesync_caps (connector,NULL ); +amdgpu_dm_update_freesync_caps (connector,NULL , true);dc_sink_release (aconnector->dc_sink); }
@@ -4019,12 +4019,12 @@ void amdgpu_dm_update_connector_after_detect( "failed to create aconnector->requested_timing\n"); } -amdgpu_dm_update_freesync_caps (connector, aconnector->drm_edid); +amdgpu_dm_update_freesync_caps (connector, aconnector->drm_edid, true);update_connector_ext_caps (aconnector); }else {hdmi_cec_unset_edid (aconnector);drm_dp_cec_unset_edid (&aconnector->dm_dp_aux.aux); -amdgpu_dm_update_freesync_caps (connector,NULL ); +amdgpu_dm_update_freesync_caps (connector,NULL , true); aconnector->num_modes =0 ;dc_sink_release (aconnector->dc_sink); aconnector->dc_sink =NULL ;
@@ -8786,7 +8786,7 @@ static void amdgpu_dm_connector_ddc_get_modes(struct drm_connector *connector,* drm_edid_connector_add_modes() and need to be * restored here. */ -amdgpu_dm_update_freesync_caps (connector, drm_edid); +amdgpu_dm_update_freesync_caps (connector, drm_edid, false); }else { amdgpu_dm_connector->num_modes =0 ; }
@@ -13266,7 +13266,7 @@ static int parse_hdmi_amd_vsdb(struct amdgpu_dm_connector *aconnector,* FreeSync parameters. */ void amdgpu_dm_update_freesync_caps (struct drm_connector *connector, -const struct drm_edid *drm_edid) +const struct drm_edid *drm_edid,bool do_mccs) {int i =0 ; struct amdgpu_dm_connector *amdgpu_dm_connector =
@@ -13373,13 +13373,16 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector, }/* Handle MCCS */ -dm_helpers_read_mccs_caps (adev->dm.dc->ctx, amdgpu_dm_connector->dc_link, sink); +if (do_mccs) +dm_helpers_read_mccs_caps (adev->dm.dc->ctx, amdgpu_dm_connector->dc_link, sink); +if ((sink->sink_signal ==SIGNAL_TYPE_HDMI_TYPE_A || as_type ==FREESYNC_TYPE_PCON_IN_WHITELIST ) && (!sink->edid_caps.freesync_vcp_code || (sink->edid_caps.freesync_vcp_code && !sink->mccs_caps.freesync_supported))) freesync_capable = false; -if (sink->mccs_caps.freesync_supported && freesync_capable) + +if (do_mccs && sink->mccs_caps.freesync_supported && freesync_capable)dm_helpers_mccs_vcp_set (adev->dm.dc->ctx, amdgpu_dm_connector->dc_link, sink); update:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +1 -1
@@ -1085,7 +1085,7 @@ void dm_restore_drm_connector_state(struct drm_device *dev, struct drm_connector *connector);void amdgpu_dm_update_freesync_caps (struct drm_connector *connector, -const struct drm_edid *drm_edid); +const struct drm_edid *drm_edid,bool do_mccs);void amdgpu_dm_trigger_timing_sync (struct drm_device *dev);
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +1 -1
@@ -474,7 +474,7 @@ static int dm_dp_mst_get_modes(struct drm_connector *connector)if (aconnector->dc_sink) {amdgpu_dm_update_freesync_caps ( - connector, aconnector->drm_edid); + connector, aconnector->drm_edid, true);#if defined(CONFIG_DRM_AMD_DC_FP )if (!validate_dsc_caps_on_connector (aconnector))
Signature · 1 line
2.34.1
PATCH 11/22 drm/amd/display: Fix HostVMMinPageSize unit mismatch in DML2.1
In reply to [email protected]From: Nicholas Kazlauskas <[email protected]>
[Why]
This was found back on DML2 but was missed when creating DML2.1.
The bottom layer calculation (CalculateHostVMDynamicLevels) expects a value in bytes, not KB, but we pass in the value in KB (eg. 4).
This causes an extra page table level to be required in the prefetch bytes which can be significant overhead - preventing some modes from being supported that should otherwise be.
[How]
Correct the units by multiplying the input and override values by 1024.
--- .../dml21/src/dml2_core/dml2_core_dcn4_calcs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.c +6 -6
@@ -7402,7 +7402,7 @@ static noinline_for_stack void dml_core_ms_prefetch_check(struct dml2_core_inter s->tdlut_bytes_per_group, s->HostVMInefficiencyFactor, s->HostVMInefficiencyFactorPrefetch, - mode_lib->soc.hostvm_min_page_size_kbytes, + mode_lib->soc.hostvm_min_page_size_kbytes *1024 , mode_lib->soc.qos_parameters.qos_type, !(display_cfg->overrides.max_outstanding_when_urgent_expected_disable), mode_lib->soc.max_outstanding_reqs,
@@ -7498,7 +7498,7 @@ static noinline_for_stack void dml_core_ms_prefetch_check(struct dml2_core_inter CalculatePrefetchSchedule_params->OutputFormat = display_cfg->stream_descriptors[display_cfg->plane_descriptors[k].stream_index].output.output_format; CalculatePrefetchSchedule_params->MaxInterDCNTileRepeaters = mode_lib->ip.max_inter_dcn_tile_repeaters; CalculatePrefetchSchedule_params->VStartup = s->MaximumVStartup[k]; - CalculatePrefetchSchedule_params->HostVMMinPageSize = mode_lib->soc.hostvm_min_page_size_kbytes; + CalculatePrefetchSchedule_params->HostVMMinPageSize = mode_lib->soc.hostvm_min_page_size_kbytes *1024 ; CalculatePrefetchSchedule_params->DynamicMetadataEnable = display_cfg->plane_descriptors[k].dynamic_meta_data.enable; CalculatePrefetchSchedule_params->DynamicMetadataVMEnabled = mode_lib->ip.dynamic_metadata_vm_enabled; CalculatePrefetchSchedule_params->DynamicMetadataLinesBeforeActiveRequired = display_cfg->plane_descriptors[k].dynamic_meta_data.lines_before_active_required;
@@ -8986,7 +8986,7 @@ static bool dml_core_mode_support(struct dml2_core_calcs_mode_support_ex *in_out CalculateVMRowAndSwath_params->MALLAllocatedForDCN = mode_lib->soc.mall_allocated_for_dcn_mbytes; CalculateVMRowAndSwath_params->SwathWidthY = mode_lib->ms.SwathWidthY; CalculateVMRowAndSwath_params->SwathWidthC = mode_lib->ms.SwathWidthC; - CalculateVMRowAndSwath_params->HostVMMinPageSize = mode_lib->soc.hostvm_min_page_size_kbytes; + CalculateVMRowAndSwath_params->HostVMMinPageSize = mode_lib->soc.hostvm_min_page_size_kbytes *1024 ; CalculateVMRowAndSwath_params->DCCMetaBufferSizeBytes = mode_lib->ip.dcc_meta_buffer_size_bytes; CalculateVMRowAndSwath_params->mrq_present = mode_lib->ip.dcn_mrq_present;
@@ -10778,7 +10778,7 @@ static bool dml_core_mode_programming(struct dml2_core_calcs_mode_programming_ex CalculateVMRowAndSwath_params->MALLAllocatedForDCN = mode_lib->soc.mall_allocated_for_dcn_mbytes; CalculateVMRowAndSwath_params->SwathWidthY = mode_lib->mp.SwathWidthY; CalculateVMRowAndSwath_params->SwathWidthC = mode_lib->mp.SwathWidthC; - CalculateVMRowAndSwath_params->HostVMMinPageSize = mode_lib->soc.hostvm_min_page_size_kbytes; + CalculateVMRowAndSwath_params->HostVMMinPageSize = mode_lib->soc.hostvm_min_page_size_kbytes *1024 ; CalculateVMRowAndSwath_params->DCCMetaBufferSizeBytes = mode_lib->ip.dcc_meta_buffer_size_bytes; CalculateVMRowAndSwath_params->mrq_present = mode_lib->ip.dcn_mrq_present;
@@ -10994,7 +10994,7 @@ static bool dml_core_mode_programming(struct dml2_core_calcs_mode_programming_ex s->tdlut_bytes_per_group, s->HostVMInefficiencyFactor, s->HostVMInefficiencyFactorPrefetch, - mode_lib->soc.hostvm_min_page_size_kbytes, + mode_lib->soc.hostvm_min_page_size_kbytes *1024 , mode_lib->soc.qos_parameters.qos_type, !(display_cfg->overrides.max_outstanding_when_urgent_expected_disable), mode_lib->soc.max_outstanding_reqs,
@@ -11287,7 +11287,7 @@ static bool dml_core_mode_programming(struct dml2_core_calcs_mode_programming_ex CalculatePrefetchSchedule_params->OutputFormat = display_cfg->stream_descriptors[display_cfg->plane_descriptors[k].stream_index].output.output_format; CalculatePrefetchSchedule_params->MaxInterDCNTileRepeaters = mode_lib->ip.max_inter_dcn_tile_repeaters; CalculatePrefetchSchedule_params->VStartup = s->MaxVStartupLines[k]; - CalculatePrefetchSchedule_params->HostVMMinPageSize = mode_lib->soc.hostvm_min_page_size_kbytes; + CalculatePrefetchSchedule_params->HostVMMinPageSize = mode_lib->soc.hostvm_min_page_size_kbytes *1024 ; CalculatePrefetchSchedule_params->DynamicMetadataEnable = display_cfg->plane_descriptors[k].dynamic_meta_data.enable; CalculatePrefetchSchedule_params->DynamicMetadataVMEnabled = mode_lib->ip.dynamic_metadata_vm_enabled; CalculatePrefetchSchedule_params->DynamicMetadataLinesBeforeActiveRequired = display_cfg->plane_descriptors[k].dynamic_meta_data.lines_before_active_required;
Signature · 1 line
2.34.1
PATCH 12/22 drm/amd/display: Correct MALL parameters for DCN42 soc bb
In reply to [email protected]From: Nicholas Kazlauskas <[email protected]>
[Why & How]
The MALL and DCC parameters were copied and pasted from a previous ASIC but the correct value per HW specification should all be 0.
If not correct this can impact urgent bandwidth calculation and PMO.
--- .../display/dc/dml2_0/dml21/inc/bounding_boxes/dcn42_soc_bb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn42_soc_bb.h +1 -1
@@ -203,7 +203,7 @@ static const struct dml2_soc_bb dml2_socbb_dcn42 = { .xtalclk_mhz = 24, .pcie_refclk_mhz = 100, .dchub_refclk_mhz = 50, - .mall_allocated_for_dcn_mbytes = 64, + .mall_allocated_for_dcn_mbytes = 0, .max_outstanding_reqs = 256, .fabric_datapath_to_dcn_data_return_bytes = 32, .return_bus_width_bytes = 64,
Signature · 1 line
2.34.1
PATCH 13/22 drm/amd/display: Pass min page size from SOC BB to dml2_1 plane config
In reply to [email protected]From: Nicholas Kazlauskas <[email protected]>
[Why]
Like dml2_0 this isn't guaranteed to be constant for every ASIC.
This can cause corruption or underflow for linear surfaces due to a wrong PTE_ROW_HEIGHT_LINEAR value if not correctly specified.
[How]
Like dml2_0 pass in the SOC bb into the plane configuration population functions.
Set both GPUVM and HostVM page sizes in the overrides.
--- .../dml2_0/dml21/dml21_translation_helper.c | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.c +15 -6
@@ -389,7 +389,9 @@ static void populate_dml21_dummy_surface_cfg(struct dml2_surface_cfg *surface, c surface->tiling = dml2_sw_64kb_2d; } -static void populate_dml21_dummy_plane_cfg (struct dml2_plane_parameters *plane,const struct dc_stream_state *stream) +static void populate_dml21_dummy_plane_cfg (struct dml2_plane_parameters *plane, +const struct dc_stream_state *stream, +const struct dml2_soc_bb *soc_bb) {unsigned int width, height;
@@ -433,7 +435,8 @@ static void populate_dml21_dummy_plane_cfg(struct dml2_plane_parameters *plane, plane->pixel_format = dml2_444_32; plane->dynamic_meta_data.enable = false; - plane->overrides.gpuvm_min_page_size_kbytes =256 ; + plane->overrides.gpuvm_min_page_size_kbytes = soc_bb->gpuvm_min_page_size_kbytes; + plane->overrides.hostvm_min_page_size_kbytes = soc_bb->hostvm_min_page_size_kbytes; } static void populate_dml21_surface_config_from_plane_state(
@@ -504,7 +507,7 @@ static const struct scaler_data *get_scaler_data_for_plane(static void populate_dml21_plane_config_from_plane_state (struct dml2_context *dml_ctx,struct dml2_plane_parameters *plane,const struct dc_plane_state *plane_state, -const struct dc_state *context,unsigned int stream_index) +const struct dc_state *context,unsigned int stream_index,const struct dml2_soc_bb *soc_bb) {const struct scaler_data *scaler_data =get_scaler_data_for_plane (dml_ctx, plane_state, context);struct dc_stream_state *stream = context->streams[stream_index];
@@ -648,7 +651,8 @@ static void populate_dml21_plane_config_from_plane_state(struct dml2_context *dm plane->composition.rotation_angle = (enum dml2_rotation_angle ) plane_state->rotation; plane->stream_index = stream_index; - plane->overrides.gpuvm_min_page_size_kbytes =256 ; + plane->overrides.gpuvm_min_page_size_kbytes = soc_bb->gpuvm_min_page_size_kbytes; + plane->overrides.hostvm_min_page_size_kbytes = soc_bb->hostvm_min_page_size_kbytes; plane->immediate_flip = plane_state->flip_immediate;
@@ -786,7 +790,9 @@ bool dml21_map_dc_state_into_dml_display_cfg(const struct dc *in_dc, struct dc_sif (context->stream_status[stream_index].plane_count ==0 ) { disp_cfg_plane_location = dml_dispcfg->num_planes++;populate_dml21_dummy_surface_cfg (&dml_dispcfg->plane_descriptors[disp_cfg_plane_location].surface, context->streams[stream_index]); -populate_dml21_dummy_plane_cfg (&dml_dispcfg->plane_descriptors[disp_cfg_plane_location], context->streams[stream_index]); +populate_dml21_dummy_plane_cfg ( + &dml_dispcfg->plane_descriptors[disp_cfg_plane_location], + context->streams[stream_index], &dml_ctx->v21.dml_init.soc_bb); dml_dispcfg->plane_descriptors[disp_cfg_plane_location].stream_index = disp_cfg_stream_location; }else {for (plane_index =0 ; plane_index < context->stream_status[stream_index].plane_count; plane_index++) {
@@ -798,7 +804,10 @@ bool dml21_map_dc_state_into_dml_display_cfg(const struct dc *in_dc, struct dc_sASSERT (disp_cfg_plane_location >=0 && disp_cfg_plane_location < __DML2_WRAPPER_MAX_STREAMS_PLANES__);populate_dml21_surface_config_from_plane_state (in_dc, &dml_dispcfg->plane_descriptors[disp_cfg_plane_location].surface, context->stream_status[stream_index].plane_states[plane_index]); -populate_dml21_plane_config_from_plane_state (dml_ctx, &dml_dispcfg->plane_descriptors[disp_cfg_plane_location], context->stream_status[stream_index].plane_states[plane_index], context, stream_index); +populate_dml21_plane_config_from_plane_state ( + dml_ctx, &dml_dispcfg->plane_descriptors[disp_cfg_plane_location], + context->stream_status[stream_index].plane_states[plane_index], + context, stream_index, &dml_ctx->v21.dml_init.soc_bb); dml_dispcfg->plane_descriptors[disp_cfg_plane_location].stream_index = disp_cfg_stream_location;if (dml21_wrapper_get_plane_id (context, context->streams[stream_index]->stream_id, context->stream_status[stream_index].plane_states[plane_index], &dml_ctx->v21.dml_to_dc_pipe_mapping.disp_cfg_to_plane_id[disp_cfg_plane_location]))
Signature · 1 line
2.34.1
PATCH 14/22 drm/amd/display: Fix DCN42 gpuvm_min_page_size_kbytes in SOC BB
In reply to [email protected]From: Nicholas Kazlauskas <[email protected]>
[Why & How]
To match the HW specification this should be 4, not 256.
--- .../display/dc/dml2_0/dml21/inc/bounding_boxes/dcn42_soc_bb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn42_soc_bb.h +1 -1
@@ -208,7 +208,7 @@ static const struct dml2_soc_bb dml2_socbb_dcn42 = { .fabric_datapath_to_dcn_data_return_bytes = 32, .return_bus_width_bytes = 64, .hostvm_min_page_size_kbytes = 4, - .gpuvm_min_page_size_kbytes = 256, + .gpuvm_min_page_size_kbytes = 4, .gpuvm_max_page_table_levels = 1, .hostvm_max_non_cached_page_table_levels = 2, .phy_downspread_percent = 0.38,
Signature · 1 line
2.34.1
PATCH 15/22 drm/amd/display: update dcn42 memory latencies
In reply to [email protected]From: Dmytro Laktyushkin <[email protected]>
Add latency update based on memory type to dml2.1
--- .../dml21/inc/bounding_boxes/dcn42_soc_bb.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn42_soc_bb.h +16 -3
@@ -68,6 +68,7 @@ static const struct dml2_soc_qos_parameters dml_dcn42_variant_a_soc_qos_params = .qos_type = dml2_qos_param_type_dcn3, }; +/* Default SOC bounding box for DCN42 based on LPDDR5/LPCAMM2 latencies*/ static const struct dml2_soc_bb dml2_socbb_dcn42 = { .clk_table = { .wck_ratio = {
@@ -185,12 +186,13 @@ static const struct dml2_soc_bb dml2_socbb_dcn42 = { .qos_type = dml2_qos_param_type_dcn3, }, +/* DCN42 params for LPDDR5/LPCAMM2 */ .power_management_parameters = { - .dram_clk_change_blackout_us = 29, + .dram_clk_change_blackout_us = 36, .fclk_change_blackout_us = 0, .g7_ppt_blackout_us = 0, - .stutter_enter_plus_exit_latency_us = 11, - .stutter_exit_latency_us = 9, + .stutter_enter_plus_exit_latency_us = 14, + .stutter_exit_latency_us = 12, .z8_stutter_enter_plus_exit_latency_us = 300, .z8_stutter_exit_latency_us = 200, },
@@ -222,6 +224,17 @@ static const struct dml2_soc_bb dml2_socbb_dcn42 = { .max_fclk_for_uclk_dpm_khz = 2200 * 1000, }; +/* DCN42 params for DDR5 */ +struct dml2_soc_power_management_parameters dcn42_ddr5_power_management_parameters = { + .dram_clk_change_blackout_us =36 , + .fclk_change_blackout_us =0 , + .g7_ppt_blackout_us =0 , + .stutter_enter_plus_exit_latency_us =23.5 , + .stutter_exit_latency_us =21.5 , + .z8_stutter_enter_plus_exit_latency_us =300 , + .z8_stutter_exit_latency_us =200 , +}; +static const struct dml2_ip_capabilities dml2_dcn42_max_ip_caps = { .pipe_count =4 , .otg_count =4 ,
Signature · 1 line
2.34.1
PATCH 16/22 drm/amd/display: Fix implicit narrowing conversions in modules
In reply to [email protected]From: Gaghik Khachatrian <[email protected]>
[Why]: Implicit narrowing of wider integer types (unsigned int, uint64_t) into narrower fields (uint8_t, uint16_t, unsigned short) has potential truncation issues.
[How]: For each warning site, added ASSERT(<value> <= 0xFFFF/0xFF) for debug-mode bounds verification followed by an explicit cast. Typed intermediate variables introduced where needed for clarity.
No functional change intended.
--- .../amd/display/modules/freesync/freesync.c | 32 +++++++----- .../amd/display/modules/power/power_helpers.c | 49 +++++++++++++------ .../gpu/drm/amd/display/modules/vmid/vmid.c | 8 ++- 3 files changed, 61 insertions(+), 28 deletions(-)
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +21 -11
@@ -153,7 +153,7 @@ unsigned int mod_freesync_calc_v_total_from_refresh(* round down the vtotal value to avoid stretching vblank over * panel's vtotal boundary. */ - v_total =div64_u64 (div64_u64 (((unsigned long long )( + v_total = (unsigned int )div64_u64 (div64_u64 (((unsigned long long )( frame_duration_in_ns) * (stream->timing.pix_clk_100hz /10 )), stream->timing.h_total),1000000 ); }else if (refresh_in_uhz >= stream->timing.max_refresh_in_uhz) {
@@ -161,11 +161,11 @@ unsigned int mod_freesync_calc_v_total_from_refresh(* round up the vtotal value to prevent off-by-one error causing * v_total_min to be below the panel's lower bound */ - v_total =div64_u64 (div64_u64 (((unsigned long long )( + v_total = (unsigned int )div64_u64 (div64_u64 (((unsigned long long )( frame_duration_in_ns) * (stream->timing.pix_clk_100hz /10 )), stream->timing.h_total) + (1000000 -1 ),1000000 ); }else { - v_total =div64_u64 (div64_u64 (((unsigned long long )( + v_total = (unsigned int )div64_u64 (div64_u64 (((unsigned long long )( frame_duration_in_ns) * (stream->timing.pix_clk_100hz /10 )), stream->timing.h_total) +500000 ,1000000 ); }
@@ -196,11 +196,11 @@ static unsigned int calc_v_total_from_duration(uint32_t h_total_up_scaled; h_total_up_scaled = stream->timing.h_total *10000 ; - v_total =div_u64 ((unsigned long long )duration_in_us + v_total = (unsigned int )div_u64 ((unsigned long long )duration_in_us * stream->timing.pix_clk_100hz + (h_total_up_scaled -1 ), h_total_up_scaled);//ceiling for MMax and MMin for MVRR }else { - v_total =div64_u64 (div64_u64 (((unsigned long long )( + v_total = (unsigned int )div64_u64 (div64_u64 (((unsigned long long )( duration_in_us) * (stream->timing.pix_clk_100hz /10 )), stream->timing.h_total),1000 ); }
@@ -232,22 +232,28 @@ static void update_v_total_for_static_ramp( target_duration_in_us;/* Calculate ratio between new and current frame duration with 3 digit */ -unsigned int frame_duration_ratio =div64_u64 (1000000 , +uint64_t frame_duration_ratio_u64 =div64_u64 (1000000 , (1000 +div64_u64 (((unsigned long long )(STATIC_SCREEN_RAMP_DELTA_REFRESH_RATE_PER_FRAME ) * current_duration_in_us),1000000 ))); +ASSERT (frame_duration_ratio_u64 <=0xFFFFFFFF ); +unsigned int frame_duration_ratio = (unsigned int )frame_duration_ratio_u64;/* Calculate delta between new and current frame duration in us */ -unsigned int frame_duration_delta =div64_u64 (((unsigned long long )( +uint64_t frame_duration_delta_u64 =div64_u64 (((unsigned long long )( current_duration_in_us) * (1000 - frame_duration_ratio)),1000 ); +ASSERT (frame_duration_delta_u64 <=0xFFFFFFFF ); +unsigned int frame_duration_delta = (unsigned int )frame_duration_delta_u64;/* Adjust frame duration delta based on ratio between current and * standard frame duration (frame duration at 60 Hz refresh rate). */ -unsigned int ramp_rate_interpolated =div64_u64 (((unsigned long long )( +uint64_t ramp_rate_interpolated_u64 =div64_u64 (((unsigned long long )( frame_duration_delta) * current_duration_in_us),16666 ); +ASSERT (ramp_rate_interpolated_u64 <=0xFFFFFFFF ); +unsigned int ramp_rate_interpolated = (unsigned int )ramp_rate_interpolated_u64;/* Going to a higher refresh rate (lower frame duration) */ if (ramp_direction_is_up) {
@@ -277,7 +283,7 @@ static void update_v_total_for_static_ramp( } } - v_total =div64_u64 (div64_u64 (((unsigned long long )( + v_total = (unsigned int )div64_u64 (div64_u64 (((unsigned long long )( current_duration_in_us) * (stream->timing.pix_clk_100hz /10 )), stream->timing.h_total),1000 );
@@ -1058,8 +1064,12 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync,else in_out_vrr->fixed_refresh_in_uhz =0 ; - refresh_range =div_u64 (in_out_vrr->max_refresh_in_uhz +500000 ,1000000 ) - -div_u64 (in_out_vrr->min_refresh_in_uhz +500000 ,1000000 ); + { +uint64_t rr_tmp =div_u64 (in_out_vrr->max_refresh_in_uhz +500000 ,1000000 ) - +div_u64 (in_out_vrr->min_refresh_in_uhz +500000 ,1000000 ); +ASSERT (rr_tmp <=0xFFFFFFFF ); + refresh_range = (unsigned int )rr_tmp; + } in_out_vrr->supported = true; }
drivers/gpu/drm/amd/display/modules/power/power_helpers.c +34 -15
100 lines not on this page · raw message
drivers/gpu/drm/amd/display/modules/vmid/vmid.c +6 -2
@@ -57,7 +57,10 @@ static void clear_entry_from_vmid_table(struct core_vmid *core_vmid, unsigned instatic void evict_vmids (struct core_vmid *core_vmid) {int i; -uint16_t ord =dc_get_vmid_use_vector (core_vmid->dc); +int ord_int =dc_get_vmid_use_vector (core_vmid->dc); + +ASSERT (ord_int >=0 && ord_int <=0xFFFF ); +uint16_t ord = (uint16_t )ord_int;// At this point any positions with value 0 are unused vmids, evict them for (i =1 ; i < core_vmid->num_vmid; i++) {
@@ -120,7 +123,8 @@ uint8_t mod_vmid_get_for_ptb(struct mod_vmid *mod_vmid, uint64_t ptb)ASSERT (0 ); } -return vmid; +ASSERT (vmid >=0 && vmid <=0xFF ); +return (uint8_t )vmid; }void mod_vmid_reset (struct mod_vmid *mod_vmid)
Signature · 1 line
2.34.1
PATCH 17/22 drm/amd/display: Restore "Move setup_stream_attribute"
In reply to [email protected]From: Charlene Liu <[email protected]>
This partially reverts commit 005452bcce65 ("Revert "drm/amd/display: Move setup_stream_attribute"").
[Why]
The original revert was applied to avoid HDMI blank screen regression. The root cause has been identified and the setup_stream_attribute call can now be moved back to enable_stream where it belongs.
--- .../display/dc/dio/virtual/virtual_stream_encoder.c | 10 ++++++++++ .../gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 2 ++ drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 3 --- 3 files changed, 12 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_stream_encoder.c +10 -0
@@ -59,6 +59,14 @@ static void virtual_stream_encoder_dvi_set_stream_attribute( (void )is_dual_link; } +static void virtual_stream_encoder_lvds_set_stream_attribute ( +struct stream_encoder *enc, +struct dc_crtc_timing *crtc_timing) +{ + (void )enc; + (void )crtc_timing; +} +static void virtual_stream_encoder_set_throttled_vcp_size (struct stream_encoder *enc,struct fixed31_32 avg_time_slots_per_mtp) {
@@ -162,6 +170,8 @@ static const struct stream_encoder_funcs virtual_str_enc_funcs = { virtual_stream_encoder_hdmi_set_stream_attribute, .dvi_set_stream_attribute = virtual_stream_encoder_dvi_set_stream_attribute, + .lvds_set_stream_attribute = + virtual_stream_encoder_lvds_set_stream_attribute, .set_throttled_vcp_size = virtual_stream_encoder_set_throttled_vcp_size, .update_hdmi_info_packets =
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c +2 -0
@@ -3064,6 +3064,8 @@ void dcn20_enable_stream(struct pipe_ctx *pipe_ctx) } } + link_hwss->setup_stream_attribute (pipe_ctx); +if (dc->res_pool->dccg->funcs->set_pixel_rate_div) dc->res_pool->dccg->funcs->set_pixel_rate_div( dc->res_pool->dccg,
drivers/gpu/drm/amd/display/dc/link/link_dpms.c +0 -3
@@ -2285,7 +2285,6 @@ void link_set_dpms_on(struct link_encoder *link_enc = pipe_ctx->link_res.dio_link_enc;enum otg_out_mux_dest otg_out_dest =OUT_MUX_DIO ;struct vpg *vpg = pipe_ctx->stream_res.stream_enc->vpg; -const struct link_hwss *link_hwss =get_link_hwss (link, &pipe_ctx->link_res);bool apply_edp_fast_boot_optimization = pipe_ctx->stream->apply_edp_fast_boot_optimization;
@@ -2331,8 +2330,6 @@ void link_set_dpms_on( pipe_ctx->stream_res.tg->funcs->set_out_mux (pipe_ctx->stream_res.tg, otg_out_dest); } - link_hwss->setup_stream_attribute (pipe_ctx); - pipe_ctx->stream->apply_edp_fast_boot_optimization = false;// Enable VPG before building infoframe
Signature · 1 line
2.34.1
Re: [PATCH 17/22] drm/amd/display: Restore "Move setup_stream_attribute"
Quoted 8 lines · On 4/2/26 20:33, [email protected] wrote:
From: Charlene Liu <[email protected]>
This partially reverts commit
005452bcce65("Revert "drm/amd/display: Movesetup_stream_attribute"").[Why]
The original revert was applied to avoid HDMI blank screen regression. The root cause has been identified and thesetup_stream_attributecall can now be moved back toenable_streamwhere it belongs.
Hold your horses.
The patch in https://gitlab.freedesktop.org/drm/amd/-/work_items/4652#note_3392278 , which is this patch plus adding a link_hwss->setup_stream_attribute call in enable_link_hdmi, still causes the blank screen regression.
P.S. Please don't try applying this change again before it's been confirmed that it no longer causes the regression. I almost missed this patch in my flood of e-mails, and I shouldn't have to watch out for it anyway.
Signature · 2 lines
Earthling Michel Dänzer \ GNOME / Xwayland / Mesa developer https://redhat.com \ Libre software enthusiast
PATCH 18/22 drm/amd/display: move memory latency update to dml for dcn42
In reply to [email protected]From: Dmytro Laktyushkin <[email protected]>
Memory latencies are soc specific and should be part of dml soc bounding box. This change removes them from clk_mgr and has latency update happen based on memory type when dml socbb is being updated.
--- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 78 ------------------- .../dcn42/dcn42_soc_and_ip_translator.c | 4 + 2 files changed, 4 insertions(+), 78 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c +0 -78
@@ -611,80 +611,6 @@ static struct clk_bw_params dcn42_bw_params = { }; -static struct wm_table ddr5_wm_table = { - .entries = { - { - .wm_inst =WM_A , - .wm_type =WM_TYPE_PSTATE_CHG , - .pstate_latency_us =11.72 , - .sr_exit_time_us =28.0 , - .sr_enter_plus_exit_time_us =30.0 , - .valid = true, - }, - { - .wm_inst =WM_B , - .wm_type =WM_TYPE_PSTATE_CHG , - .pstate_latency_us =11.72 , - .sr_exit_time_us =28.0 , - .sr_enter_plus_exit_time_us =30.0 , - .valid = true, - }, - { - .wm_inst =WM_C , - .wm_type =WM_TYPE_PSTATE_CHG , - .pstate_latency_us =11.72 , - .sr_exit_time_us =28.0 , - .sr_enter_plus_exit_time_us =30.0 , - .valid = true, - }, - { - .wm_inst =WM_D , - .wm_type =WM_TYPE_PSTATE_CHG , - .pstate_latency_us =11.72 , - .sr_exit_time_us =28.0 , - .sr_enter_plus_exit_time_us =30.0 , - .valid = true, - }, - } -}; - -static struct wm_table lpddr5_wm_table = { - .entries = { - { - .wm_inst =WM_A , - .wm_type =WM_TYPE_PSTATE_CHG , - .pstate_latency_us =11.65333 , - .sr_exit_time_us =28.0 , - .sr_enter_plus_exit_time_us =30.0 , - .valid = true, - }, - { - .wm_inst =WM_B , - .wm_type =WM_TYPE_PSTATE_CHG , - .pstate_latency_us =11.65333 , - .sr_exit_time_us =28.0 , - .sr_enter_plus_exit_time_us =30.0 , - .valid = true, - }, - { - .wm_inst =WM_C , - .wm_type =WM_TYPE_PSTATE_CHG , - .pstate_latency_us =11.65333 , - .sr_exit_time_us =28.0 , - .sr_enter_plus_exit_time_us =30.0 , - .valid = true, - }, - { - .wm_inst =WM_D , - .wm_type =WM_TYPE_PSTATE_CHG , - .pstate_latency_us =11.65333 , - .sr_exit_time_us =28.0 , - .sr_enter_plus_exit_time_us =30.0 , - .valid = true, - }, - } -}; -struct dcn42_ss_info_table dcn42_ss_info_table = { .ss_divider =1000 , .ss_percentage = {0 ,0 ,375 ,375 ,375 }
@@ -1141,10 +1067,6 @@ void dcn42_clk_mgr_construct(if (ctx->dc_bios->integrated_info) { clk_mgr->base.base.dentist_vco_freq_khz = ctx->dc_bios->integrated_info->dentist_vco_freq; -if (ctx->dc_bios->integrated_info->memory_type == LpDdr5MemType) - dcn42_bw_params.wm_table = lpddr5_wm_table; -else - dcn42_bw_params.wm_table = ddr5_wm_table; dcn42_bw_params.vram_type = ctx->dc_bios->integrated_info->memory_type; dcn42_bw_params.dram_channel_width_bytes = ctx->dc_bios->integrated_info->memory_type ==0x22 ?8 :4 ; dcn42_bw_params.num_channels = ctx->dc_bios->integrated_info->ma_channel_number ? ctx->dc_bios->integrated_info->ma_channel_number :1 ;
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.c +4 -0
@@ -155,6 +155,10 @@ static void dcn42_update_soc_bb_with_values_from_clk_mgr(struct dml2_soc_bb *socdcn42_convert_dc_clock_table_to_soc_bb_clock_table (&soc_bb->clk_table, &soc_bb->vmin_limit, dc->clk_mgr->bw_params); } + +if (dc->clk_mgr->bw_params->vram_type == Ddr5MemType) { + soc_bb->power_management_parameters = dcn42_ddr5_power_management_parameters; + } }static void apply_soc_bb_updates (struct dml2_soc_bb *soc_bb,const struct dc *dc,const struct dml2_configuration_options *config)
Signature · 1 line
2.34.1
PATCH 19/22 drm/amd/display: Add DCN42 PMO policy for DML2.1
In reply to [email protected]From: Nicholas Kazlauskas <[email protected]>
[Why]
The MinTTU policy in DML2.1 does not guarantee that we support p-state in blank. This is a delta vs dml2 and earlier revisions as the prefetch mode override has been removed in favor of a more configurable pstate optimizer.
[How]
Split off DCN42 with its own PMO helpers so that we can use a simpler strategy of only allowing the mode if we support p-state in vblank and if vactive has enough latency hiding.
The actual hookup to use these helpers in the PMO factory will be done in a later patch to satisfy build system requirements.
--- .../gpu/drm/amd/display/dc/dml2_0/Makefile | 1 + .../dml21/src/dml2_pmo/dml2_pmo_dcn42.c | 192 ++++++++++++++++++ .../dml21/src/dml2_pmo/dml2_pmo_dcn42.h | 17 ++ .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 16 +- .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.h | 10 + 5 files changed, 229 insertions(+), 7 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn42.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn42.h
drivers/gpu/drm/amd/display/dc/dml2_0/Makefile +1 -0
@@ -100,6 +100,7 @@ DML21 += src/dml2_mcg/dml2_mcg_factory.o DML21 += src/dml2_pmo/dml2_pmo_dcn3.o DML21 += src/dml2_pmo/dml2_pmo_factory.o DML21 += src/dml2_pmo/dml2_pmo_dcn4_fams2.o +DML21 += src/dml2_pmo/dml2_pmo_dcn42.o DML21 += src/dml2_standalone_libraries/lib_float_math.o DML21 += dml21_translation_helper.o DML21 += dml21_wrapper.o
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn42.c new file +192 -0
192 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn42.h new file +17 -0
@@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright 2026 Advanced Micro Devices, Inc. +*/ + +#ifndef __DML2_PMO_DCN42_H__ +#define __DML2_PMO_DCN42_H__ + +#include "dml2_internal_shared_types.h" + +struct dml2_pmo_initialize_in_out ; +struct dml2_pmo_test_for_pstate_support_in_out ; + +bool pmo_dcn42_initialize (struct dml2_pmo_initialize_in_out *in_out); +bool pmo_dcn42_test_for_pstate_support (struct dml2_pmo_test_for_pstate_support_in_out *in_out); + +#endif /* __DML2_PMO_DCN42_H__ */
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c +9 -7
@@ -1662,7 +1662,7 @@ static bool validate_pstate_support_strategy_cofunctionality(struct dml2_pmo_insreturn is_config_schedulable (pmo, display_cfg, pstate_strategy); } -static int get_vactive_pstate_margin (const struct display_configuation_with_meta *display_cfg,int plane_mask) +int dcn4_get_vactive_pstate_margin (const struct display_configuation_with_meta *display_cfg,int plane_mask) {unsigned int i;int min_vactive_margin_us =0xFFFFFFF ;
@@ -1907,7 +1907,7 @@ bool pmo_dcn4_fams2_init_for_pstate_support(struct dml2_pmo_init_for_pstate_supp// Figure out which streams can do vactive, and also build up implicit SVP and FAMS2 meta for (stream_index =0 ; stream_index < display_config->display_config.num_streams; stream_index++) { -if (get_vactive_pstate_margin (display_config, s->pmo_dcn4.stream_plane_mask[stream_index]) >= (int )(MIN_VACTIVE_MARGIN_PCT * pmo->soc_bb->power_management_parameters.dram_clk_change_blackout_us)) +if (dcn4_get_vactive_pstate_margin (display_config, s->pmo_dcn4.stream_plane_mask[stream_index]) >= (int )(MIN_VACTIVE_MARGIN_PCT * pmo->soc_bb->power_management_parameters.dram_clk_change_blackout_us))set_bit_in_bitfield (&s->pmo_dcn4.stream_vactive_capability_mask, stream_index);/* FAMS2 meta */
@@ -2182,7 +2182,9 @@ static bool setup_display_config(struct display_configuation_with_meta *display_return success; } -static int get_minimum_reserved_time_us_for_planes (struct display_configuation_with_meta *display_config,int plane_mask) +int dcn4_get_minimum_reserved_time_us_for_planes ( +const struct display_configuation_with_meta *display_config, +int plane_mask) {int min_time_us =0xFFFFFF ;unsigned int plane_index =0 ;
@@ -2222,16 +2224,16 @@ bool pmo_dcn4_fams2_test_for_pstate_support(struct dml2_pmo_test_for_pstate_suppif (s->pmo_dcn4.pstate_strategy_candidates[s->pmo_dcn4.cur_pstate_candidate].per_stream_pstate_method[stream_index] == dml2_pstate_method_vactive || s->pmo_dcn4.pstate_strategy_candidates[s->pmo_dcn4.cur_pstate_candidate].per_stream_pstate_method[stream_index] == dml2_pstate_method_fw_vactive_drr) { -if (get_vactive_pstate_margin (in_out->base_display_config, s->pmo_dcn4.stream_plane_mask[stream_index]) < (MIN_VACTIVE_MARGIN_PCT * in_out->instance->soc_bb->power_management_parameters.dram_clk_change_blackout_us) || +if (dcn4_get_vactive_pstate_margin (in_out->base_display_config, s->pmo_dcn4.stream_plane_mask[stream_index]) < (MIN_VACTIVE_MARGIN_PCT * in_out->instance->soc_bb->power_management_parameters.dram_clk_change_blackout_us) ||get_vactive_det_fill_latency_delay_us (in_out->base_display_config, s->pmo_dcn4.stream_plane_mask[stream_index]) > stream_pstate_meta->method_vactive.max_vactive_det_fill_delay_us) { p_state_supported = false;break ; } }else if (s->pmo_dcn4.pstate_strategy_candidates[s->pmo_dcn4.cur_pstate_candidate].per_stream_pstate_method[stream_index] == dml2_pstate_method_vblank || s->pmo_dcn4.pstate_strategy_candidates[s->pmo_dcn4.cur_pstate_candidate].per_stream_pstate_method[stream_index] == dml2_pstate_method_fw_vblank_drr) { -if (get_minimum_reserved_time_us_for_planes (in_out->base_display_config, s->pmo_dcn4.stream_plane_mask[stream_index]) < +if (dcn4_get_minimum_reserved_time_us_for_planes (in_out->base_display_config, s->pmo_dcn4.stream_plane_mask[stream_index]) <REQUIRED_RESERVED_TIME || -get_vactive_pstate_margin (in_out->base_display_config, s->pmo_dcn4.stream_plane_mask[stream_index]) <MIN_VACTIVE_MARGIN_VBLANK ) { +dcn4_get_vactive_pstate_margin (in_out->base_display_config, s->pmo_dcn4.stream_plane_mask[stream_index]) <MIN_VACTIVE_MARGIN_VBLANK ) { p_state_supported = false;break ; }
@@ -2243,7 +2245,7 @@ bool pmo_dcn4_fams2_test_for_pstate_support(struct dml2_pmo_test_for_pstate_supp } }else if (s->pmo_dcn4.pstate_strategy_candidates[s->pmo_dcn4.cur_pstate_candidate].per_stream_pstate_method[stream_index] == dml2_pstate_method_fw_drr) {if (!all_planes_match_method (in_out->base_display_config, s->pmo_dcn4.stream_plane_mask[stream_index], dml2_pstate_method_fw_drr) || -get_vactive_pstate_margin (in_out->base_display_config, s->pmo_dcn4.stream_plane_mask[stream_index]) <MIN_VACTIVE_MARGIN_DRR ) { +dcn4_get_vactive_pstate_margin (in_out->base_display_config, s->pmo_dcn4.stream_plane_mask[stream_index]) <MIN_VACTIVE_MARGIN_DRR ) { p_state_supported = false;break ; }
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.h +10 -0
@@ -7,6 +7,16 @@#include "dml2_internal_shared_types.h" +struct display_configuation_with_meta ; + +int dcn4_get_vactive_pstate_margin ( +const struct display_configuation_with_meta *display_cfg, +int plane_mask); + +int dcn4_get_minimum_reserved_time_us_for_planes ( +const struct display_configuation_with_meta *display_config, +int plane_mask); +bool pmo_dcn4_fams2_initialize (struct dml2_pmo_initialize_in_out *in_out);bool pmo_dcn4_fams2_optimize_dcc_mcache (struct dml2_pmo_optimize_dcc_mcache_in_out *in_out);
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 - 2e98e61beda6e3ecc365a61feb94537363a2ed63 -> drm/amdgpu: Add bounds checking to ib_{get, set}_value) 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: Thursday, April 2, 2026 2:33 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]>; Tseng, Chuan Yu (Max) <[email protected]>; Li, Roman <[email protected]>
Subject: [PATCH 00/22] DC Patches April 02, 2026
From: Roman Li <[email protected]>
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* Enable sink freesync via MCCS with pcon whitelist adjustments
* Rework YCbCr422 DSC policy
* Update DML2.1 parameters
* Fix coding style issues and compiler warnings
Charlene Liu (2):
drm/amd/display: update dcn42 bounding box drm/amd/display: Restore "Move setup_stream_attribute"
Chuanyu Tseng (1):
drm/amd/display: Fix coding style issue
Dmytro Laktyushkin (2):
drm/amd/display: update dcn42 memory latencies drm/amd/display: move memory latency update to dml for dcn42
Gaghik Khachatrian (2):
drm/amd/display: Fix unused parameters warnings in dml2_0 drm/amd/display: Fix implicit narrowing conversions in modules
George Shen (1):
drm/amd/display: Remove unnecessary Freesync w/a from DCN32
Nicholas Kazlauskas (5):
drm/amd/display: Fix HostVMMinPageSize unit mismatch in DML2.1 drm/amd/display: Correct MALL parameters for DCN42 soc bb drm/amd/display: Pass min page size from SOC BB to dml2_1 plane config drm/amd/display: Fix DCN42 gpuvm_min_page_size_kbytes in SOC BB drm/amd/display: Add DCN42 PMO policy for DML2.1
Relja Vojvodic (1):
drm/amd/display: Rework YCbCr422 DSC policy
Roman Li (1):
drm/amd/display: Drop unused tiling formats from dml2
Taimur Hassan (1):
drm/amd/display: Promote DC to 3.2.377
Wayne Lin (5):
drm/amd/display: Adjust freesync pcon whitelist drm/amd/display: Parse freesync mccs vcp code drm/amd/display: Read sink freesync support via mccs drm/amd/display: Enable sink freesync via MCCS drm/amd/display: Avoid to do MCCS transaction if unnecessary
Zheng, Austin (1):
drm/amd/display: Remove Duplicate Prefetch Parameter
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 74 ++++-- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 7 +- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 241 ++++++++++++++++++ .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 78 ------ drivers/gpu/drm/amd/display/dc/dc.h | 5 +- drivers/gpu/drm/amd/display/dc/dc_dsc.h | 1 + drivers/gpu/drm/amd/display/dc/dc_types.h | 6 + .../dc/dio/virtual/virtual_stream_encoder.c | 10 + drivers/gpu/drm/amd/display/dc/dm_helpers.h | 10 + .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 37 --- .../gpu/drm/amd/display/dc/dml2_0/Makefile | 1 + .../amd/display/dc/dml2_0/display_mode_core.c | 17 ++ .../amd/display/dc/dml2_0/display_mode_util.c | 14 + .../dml2_0/dml21/dml21_translation_helper.c | 24 +- .../amd/display/dc/dml2_0/dml21/dml21_utils.c | 2 + .../dc/dml2_0/dml21/dml21_wrapper_fpu.c | 2 + .../dml21/inc/bounding_boxes/dcn42_soc_bb.h | 25 +- .../dml21/inc/dml_top_display_cfg_types.h | 14 - .../dml21/src/dml2_core/dml2_core_dcn4.c | 5 +- .../src/dml2_core/dml2_core_dcn4_calcs.c | 37 ++- .../src/dml2_core/dml2_core_shared_types.h | 1 - .../dml21/src/dml2_core/dml2_core_utils.c | 65 +---- .../dml21/src/dml2_core/dml2_core_utils.h | 2 - .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 1 + .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 2 + .../dml21/src/dml2_mcg/dml2_mcg_factory.c | 1 + .../dml21/src/dml2_pmo/dml2_pmo_dcn42.c | 192 ++++++++++++++ .../dml21/src/dml2_pmo/dml2_pmo_dcn42.h | 17 ++ .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 21 +- .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.h | 10 + .../dml21/src/dml2_pmo/dml2_pmo_factory.c | 3 + .../dml21/src/dml2_top/dml2_top_soc15.c | 2 + .../display/dc/dml2_0/dml2_dc_resource_mgmt.c | 9 + .../dc/dml2_0/dml2_translation_helper.c | 6 + .../drm/amd/display/dc/dml2_0/dml2_utils.c | 1 + .../dc/dml2_0/dml_display_rq_dlg_calc.c | 1 + drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 13 +- .../drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c | 2 +- .../drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c | 2 +- .../amd/display/dc/dsc/dcn401/dcn401_dsc.c | 2 +- .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 2 + .../drm/amd/display/dc/link/link_detection.c | 25 +- .../gpu/drm/amd/display/dc/link/link_dpms.c | 6 +- .../dc/link/protocols/link_dp_capability.c | 5 +- .../dc/resource/dcn31/dcn31_resource.c | 2 + .../dc/resource/dcn315/dcn315_resource.c | 2 + .../dcn42/dcn42_soc_and_ip_translator.c | 4 + .../amd/display/include/ddc_service_types.h | 1 + .../amd/display/modules/freesync/freesync.c | 32 ++- .../amd/display/modules/power/power_helpers.c | 49 ++-- .../gpu/drm/amd/display/modules/vmid/vmid.c | 8 +- 52 files changed, 799 insertions(+), 302 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn42.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn42.h
--
2.34.1