DC Patches August 25, 2025
Subsystems (3)
cover DC Patches August 25, 2025
Summary:
* DC version 3.2.348
* Remove state/param from check update
* Refactor bounding box values handling
* Fix incorrect condition to fail dto clk calculation
* Skip check downlink setting for a certain MST branch device
* Fix double cursor issue on dcn314
Austin Zheng (1):
drm/amd/display: Add Component To Handle Bounding Box Values and IP
Caps
Clay King (1):
drm/amd/display: incorrect conditions for failing dto calculations
Fangzhi Zuo (1):
drm/amd/display: Skip Check Runtime Link Setting for Specific Branch
Device
Ivan Lipski (1):
drm/amd/display: Clear the CUR_ENABLE register on DCN314 w/out DPP PG
Mario Limonciello (1):
drm/amd/display: Optimize custom brightness curve interpolation
Relja Vojvodic (1):
drm/amd/display: Increase minimum clock for TMDS 420 with pipe
splitting
Taimur Hassan (2):
drm/amd/display: [FW Promotion] Release 0.1.25.0 drm/amd/display: Promote DC to 3.2.348
drivers/gpu/drm/amd/display/Makefile | 1 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 64 +-- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 3 + .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 40 +- drivers/gpu/drm/amd/display/dc/Makefile | 1 + drivers/gpu/drm/amd/display/dc/core/dc.c | 8 +- drivers/gpu/drm/amd/display/dc/dc.h | 4 +- .../amd/display/dc/dccg/dcn401/dcn401_dccg.c | 2 +- .../dc/dml2/dml21/dml21_translation_helper.c | 368 +----------------- .../amd/display/dc/dml2/dml21/dml21_wrapper.c | 2 +- .../src/dml2_core/dml2_core_dcn4_calcs.c | 28 +- .../drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c | 9 + .../drm/amd/display/dc/dpp/dcn10/dcn10_dpp.h | 2 + .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c | 1 + .../amd/display/dc/hwss/dcn314/dcn314_hwseq.c | 72 ++++ .../amd/display/dc/hwss/dcn314/dcn314_hwseq.h | 2 + .../amd/display/dc/hwss/dcn314/dcn314_init.c | 1 + drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 3 + .../display/dc/inc/soc_and_ip_translator.h | 24 ++ .../display/dc/soc_and_ip_translator/Makefile | 19 + .../dcn401/dcn401_soc_and_ip_translator.c | 304 +++++++++++++++ .../dcn401/dcn401_soc_and_ip_translator.h | 22 ++ .../dcn42/dcn42_soc_and_ip_translator.c | 27 ++ .../dcn42/dcn42_soc_and_ip_translator.h | 16 + .../soc_and_ip_translator.c | 37 ++ .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 13 +- 26 files changed, 672 insertions(+), 401 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/inc/soc_and_ip_translator.h create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/Makefile create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.c create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.h create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.c create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.h create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/soc_and_ip_translator.c
Signature · 1 line
2.43.0
PATCH 1/8 drm/amd/display: Increase minimum clock for TMDS 420 with pipe splitting
From: Relja Vojvodic <[email protected]>
[Why]
-Pipe splitting allows for clocks to be reduced, but when using TMDS 420, reduced clocks lead to missed clocks cycles on clock resyncing
[How]
-Impose a minimum clock when using TMDS 420
--- .../src/dml2_core/dml2_core_dcn4_calcs.c | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c +19 -9
@@ -1238,18 +1238,27 @@ static void CalculateDETBufferSize(static double CalculateRequiredDispclk (enum dml2_odm_mode ODMMode, -double PixelClock) +double PixelClock, +bool isTMDS420) { +double DispClk;if (ODMMode == dml2_odm_mode_combine_4to1) { -return PixelClock /4.0 ; + DispClk = PixelClock /4.0 ; }else if (ODMMode == dml2_odm_mode_combine_3to1) { -return PixelClock /3.0 ; + DispClk = PixelClock /3.0 ; }else if (ODMMode == dml2_odm_mode_combine_2to1) { -return PixelClock /2.0 ; + DispClk = PixelClock /2.0 ; }else { -return PixelClock; + DispClk = PixelClock; + } + +if (isTMDS420) { +double TMDS420MinPixClock = PixelClock /2.0 ; + DispClk =math_max2 (DispClk, TMDS420MinPixClock); } + +return DispClk; } static double TruncToValidBPP(
@@ -4122,11 +4131,12 @@ static noinline_for_stack void CalculateODMMode(bool success;bool UseDSC = DSCEnable && (NumberOfDSCSlices >0 );enum dml2_odm_mode DecidedODMMode; +bool isTMDS420 = (OutFormat == dml2_420 && Output == dml2_hdmi); - SurfaceRequiredDISPCLKWithoutODMCombine =CalculateRequiredDispclk (dml2_odm_mode_bypass, PixelClock); - SurfaceRequiredDISPCLKWithODMCombineTwoToOne =CalculateRequiredDispclk (dml2_odm_mode_combine_2to1, PixelClock); - SurfaceRequiredDISPCLKWithODMCombineThreeToOne =CalculateRequiredDispclk (dml2_odm_mode_combine_3to1, PixelClock); - SurfaceRequiredDISPCLKWithODMCombineFourToOne =CalculateRequiredDispclk (dml2_odm_mode_combine_4to1, PixelClock); + SurfaceRequiredDISPCLKWithoutODMCombine =CalculateRequiredDispclk (dml2_odm_mode_bypass, PixelClock, isTMDS420); + SurfaceRequiredDISPCLKWithODMCombineTwoToOne =CalculateRequiredDispclk (dml2_odm_mode_combine_2to1, PixelClock, isTMDS420); + SurfaceRequiredDISPCLKWithODMCombineThreeToOne =CalculateRequiredDispclk (dml2_odm_mode_combine_3to1, PixelClock, isTMDS420); + SurfaceRequiredDISPCLKWithODMCombineFourToOne =CalculateRequiredDispclk (dml2_odm_mode_combine_4to1, PixelClock, isTMDS420);#ifdef __DML_VBA_DEBUG__DML_LOG_VERBOSE ("DML::%s: ODMUse = %d\n" , __func__, ODMUse);DML_LOG_VERBOSE ("DML::%s: Output = %d\n" , __func__, Output);
Signature · 1 line
2.43.0
PATCH 2/8 drm/amd/display: Optimize custom brightness curve interpolation
In reply to Fangzhi ZuoFrom: Mario Limonciello <[email protected]>
[Why]
Custom brightness curve works by walking through all data points one by one. When the brightness value is at either extreme this is a lot of data points to walk. This is especially noticeable when moving a brightness slider around how it can lag.
[How]
Bisect the data points to find the closest for interpolation.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 64 +++++++++++-------- 1 file changed, 38 insertions(+), 26 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +38 -26
@@ -4817,8 +4817,8 @@ static void convert_custom_brightness(const struct amdgpu_dm_backlight_caps *cap uint32_t *user_brightness) {u32 brightness =scale_input_to_fw (min, max, *user_brightness); -u8 prev_signal =0 , prev_lum =0 ; -int i =0 ; +u8 lower_signal, upper_signal, upper_lum, lower_lum, lum; +int left, right;if (amdgpu_dc_debug_mask &DC_DISABLE_CUSTOM_BRIGHTNESS_CURVE )return ;
@@ -4826,32 +4826,44 @@ static void convert_custom_brightness(const struct amdgpu_dm_backlight_caps *capif (!caps->data_points)return ; -/* choose start to run less interpolation steps */ -if (caps->luminance_data[caps->data_points/2 ].input_signal > brightness) - i = caps->data_points/2 ; -do { -u8 signal = caps->luminance_data[i].input_signal; -u8 lum = caps->luminance_data[i].luminance; + left =0 ; + right = caps->data_points -1 ; +while (left <= right) { +int mid = left + (right - left) /2 ; +u8 signal = caps->luminance_data[mid].input_signal; -/* -* brightness == signal: luminance is percent numerator -* brightness < signal: interpolate between previous and current luminance numerator -* brightness > signal: find next data point -*/ -if (brightness > signal) { - prev_signal = signal; - prev_lum = lum; - i++; -continue ; +/* Exact match found */ +if (signal == brightness) { + lum = caps->luminance_data[mid].luminance; + goto scale; } -if (brightness < signal) - lum = prev_lum +DIV_ROUND_CLOSEST ((lum - prev_lum) * - (brightness - prev_signal), - signal - prev_signal); - *user_brightness =scale_fw_to_input (min, max, -DIV_ROUND_CLOSEST (lum * brightness,101 )); -return ; - }while (i < caps->data_points); + +if (signal < brightness) + left = mid +1 ; +else + right = mid -1 ; + } + +/* verify bound */ +if (left >= caps->data_points) + left = caps->data_points -1 ; + +/* At this point, left > right */ + lower_signal = caps->luminance_data[right].input_signal; + upper_signal = caps->luminance_data[left].input_signal; + lower_lum = caps->luminance_data[right].luminance; + upper_lum = caps->luminance_data[left].luminance; + +/* interpolate */ +if (right == left || !lower_lum) + lum = upper_lum; +else + lum = lower_lum +DIV_ROUND_CLOSEST ((upper_lum - lower_lum) * + (brightness - lower_signal), + upper_signal - lower_signal); +scale: + *user_brightness =scale_fw_to_input (min, max, +DIV_ROUND_CLOSEST (lum * brightness,101 )); } static u32 convert_brightness_from_user(const struct amdgpu_dm_backlight_caps *caps,
Signature · 1 line
2.43.0
PATCH 3/8 drm/amd/display: Add Component To Handle Bounding Box Values and IP Caps
In reply to Fangzhi ZuoFrom: Austin Zheng <[email protected]>
[Why]
Bounding box values can be stored in multiple locations. (e.g. PMFW, VBIOS, DMUB). The source and interpretation of these values can vary with DCN revision so there should be a component that can gather these values and translate them accordingly
[How]
Have component start with the statically defined values as a base. Then update them as needed with DCN-specific logic
Guard this component with FPU flags since values need to be in float point.
--- drivers/gpu/drm/amd/display/Makefile | 1 + drivers/gpu/drm/amd/display/dc/Makefile | 1 + drivers/gpu/drm/amd/display/dc/core/dc.c | 8 +- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- .../dc/dml2/dml21/dml21_translation_helper.c | 368 +----------------- .../amd/display/dc/dml2/dml21/dml21_wrapper.c | 2 +- .../display/dc/inc/soc_and_ip_translator.h | 24 ++ .../display/dc/soc_and_ip_translator/Makefile | 19 + .../dcn401/dcn401_soc_and_ip_translator.c | 304 +++++++++++++++ .../dcn401/dcn401_soc_and_ip_translator.h | 22 ++ .../dcn42/dcn42_soc_and_ip_translator.c | 27 ++ .../dcn42/dcn42_soc_and_ip_translator.h | 16 + .../soc_and_ip_translator.c | 37 ++ 13 files changed, 475 insertions(+), 356 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/inc/soc_and_ip_translator.h create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/Makefile create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.c create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.h create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.c create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.h create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/soc_and_ip_translator.c
drivers/gpu/drm/amd/display/Makefile +1 -0
@@ -44,6 +44,7 @@ subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/mmhubbub subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/mpc subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/opp subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/pg +subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/soc_and_ip_translator subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/inc subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/freesync subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/color
drivers/gpu/drm/amd/display/dc/Makefile +1 -0
@@ -37,6 +37,7 @@ DC_LIBS += dcn301 DC_LIBS += dcn31 DC_LIBS += dml DC_LIBS += dml2 +DC_LIBS += soc_and_ip_translator endif DC_LIBS += dce120
drivers/gpu/drm/amd/display/dc/core/dc.c +7 -1
@@ -84,6 +84,7 @@#if defined(CONFIG_DRM_AMD_DC_FP )#include "dml2/dml2_internal_types.h" +#include "soc_and_ip_translator.h" #endif #include "dce/dmub_outbox.h"
@@ -949,7 +950,9 @@ static void dc_destruct(struct dc *dc) }dc_destroy_resource_pool (dc); - +#ifdef CONFIG_DRM_AMD_DC_FP +dc_destroy_soc_and_ip_translator (&dc->soc_and_ip_translator); +#endif if (dc->link_srv)link_destroy_link_service (&dc->link_srv);
@@ -1153,6 +1156,9 @@ static bool dc_construct(struct dc *dc, dc->res_pool->funcs->update_bw_bounding_box (dc, dc->clk_mgr->bw_params); DC_FP_END(); } + dc->soc_and_ip_translator =dc_create_soc_and_ip_translator (dc_ctx->dce_version); +if (!dc->soc_and_ip_translator) + goto fail;#endif if (!create_links (dc, init_params->num_virtual_links))
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -1776,7 +1776,7 @@ struct dc {struct dml2_configuration_options dml2_options;struct dml2_configuration_options dml2_dc_power_options;enum dc_acpi_cm_power_state power_state; - +struct soc_and_ip_translator *soc_and_ip_translator; };struct dc_scaling_info {
drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c +15 -353
397 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c +1 -1
@@ -60,7 +60,7 @@ static void dml21_init(const struct dc *in_dc, struct dml2_context *dml_ctx, conDC_FP_START (); -dml21_populate_dml_init_params (&dml_ctx->v21.dml_init, config, in_dc); +dml21_populate_dml_init_params (&dml_ctx->v21.dml_init, &dml_ctx->config, in_dc);dml2_initialize_instance (&dml_ctx->v21.dml_init);
drivers/gpu/drm/amd/display/dc/inc/soc_and_ip_translator.h new file +24 -0
@@ -0,0 +1,24 @@ +// SPDX-License-Identifier: MIT +// +// Copyright 2025 Advanced Micro Devices, Inc. + +#ifndef __SOC_AND_IP_TRANSLATOR_H__ +#define __SOC_AND_IP_TRANSLATOR_H__ + +#include "dc.h" +#include "dml_top_soc_parameter_types.h" + +struct soc_and_ip_translator_funcs { +void (*get_soc_bb)(struct dml2_soc_bb *soc_bb,const struct dc *dc,const struct dml2_configuration_options *config); +void (*get_ip_caps)(struct dml2_ip_capabilities *dml_ip_caps); +}; + +struct soc_and_ip_translator { +const struct soc_and_ip_translator_funcs *translator_funcs; +}; + +struct soc_and_ip_translator *dc_create_soc_and_ip_translator (enum dce_version dc_version); +void dc_destroy_soc_and_ip_translator (struct soc_and_ip_translator **soc_and_ip_translator); + + +#endif // __SOC_AND_IP_TRANSLATOR_H__
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/Makefile new file +19 -0
@@ -0,0 +1,19 @@ +# SPDX-License-Identifier: MIT +# +# Copyright 2025 Advanced Micro Devices, Inc. +# Makefile for bounding box component. +# Floating point required due to nature of bounding box values + +soc_and_ip_translator_ccflags := $(CC_FLAGS_FPU) +soc_and_ip_translator_rcflags := $(CC_FLAGS_NO_FPU) + +CFLAGS_$(AMDDALPATH)/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.o := $(soc_and_ip_translator_ccflags) + +CFLAGS_REMOVE_$(AMDDALPATH)/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.o := $(soc_and_ip_translator_rcflags) + +soc_and_ip_translator := soc_and_ip_translator.o +soc_and_ip_translator += dcn401/dcn401_soc_and_ip_translator.o + +AMD_DAL_soc_and_ip_translator := $(addprefix $(AMDDALPATH)/dc/soc_and_ip_translator/, $(soc_and_ip_translator)) + +AMD_DISPLAY_FILES += $(AMD_DAL_soc_and_ip_translator)
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.c new file +304 -0
304 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.h new file +22 -0
@@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +// +// Copyright 2025 Advanced Micro Devices, Inc. + +#ifndef _DCN401_SOC_AND_IP_TRANSLATOR_H_ +#define _DCN401_SOC_AND_IP_TRANSLATOR_H_ + +#include "core_types.h" +#include "dc.h" +#include "clk_mgr.h" +#include "soc_and_ip_translator.h" +#include "dml2/dml21/inc/dml_top_soc_parameter_types.h" + +void dcn401_construct_soc_and_ip_translator (struct soc_and_ip_translator *soc_and_ip_translator); + +/* Functions that can be re-used by higher DCN revisions of this component */ +void dcn401_get_soc_bb (struct dml2_soc_bb *soc_bb,const struct dc *dc,const struct dml2_configuration_options *config); +void dcn401_update_soc_bb_with_values_from_clk_mgr (struct dml2_soc_bb *soc_bb,const struct dc *dc,const struct dml2_configuration_options *config); +void dcn401_update_soc_bb_with_values_from_vbios (struct dml2_soc_bb *soc_bb,const struct dc *dc); +void dcn401_update_soc_bb_with_values_from_software_policy (struct dml2_soc_bb *soc_bb,const struct dc *dc); + +#endif /* _DCN401_SOC_AND_IP_TRANSLATOR_H_ */
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.c new file +27 -0
@@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +// +// Copyright 2025 Advanced Micro Devices, Inc. + +#include "dcn42_soc_and_ip_translator.h" +#include "soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.h" +#include "bounding_boxes/dcn42_soc_bb.h" + +/* soc_and_ip_translator component used to get up-to-date values for bounding box. +* Bounding box values are stored in several locations and locations can vary with DCN revision. +* This component provides an interface to get DCN-specific bounding box values. +*/ + +static void dcn42_get_ip_caps (struct dml2_ip_capabilities *ip_caps) +{ + *ip_caps = dml2_dcn42_max_ip_caps; +} + +static struct soc_and_ip_translator_funcs dcn42_translator_funcs = { + .get_soc_bb = dcn401_get_soc_bb, + .get_ip_caps = dcn42_get_ip_caps, +}; + +void dcn42_construct_soc_and_ip_translator (struct soc_and_ip_translator *soc_and_ip_translator) +{ + soc_and_ip_translator->translator_funcs = &dcn42_translator_funcs; +}
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.h new file +16 -0
@@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +// +// Copyright 2025 Advanced Micro Devices, Inc. + +#ifndef _DCN42_SOC_AND_IP_TRANSLATOR_H_ +#define _DCN42_SOC_AND_IP_TRANSLATOR_H_ + +#include "core_types.h" +#include "dc.h" +#include "clk_mgr.h" +#include "dml_top_soc_parameter_types.h" +#include "soc_and_ip_translator.h" + +void dcn42_construct_soc_and_ip_translator (struct soc_and_ip_translator *soc_and_ip_translator); + +#endif /* _DCN42_SOC_AND_IP_TRANSLATOR_H_ */
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/soc_and_ip_translator.c new file +37 -0
@@ -0,0 +1,37 @@ +// SPDX-License-Identifier: MIT +// +// Copyright 2025 Advanced Micro Devices, Inc. + +#include "soc_and_ip_translator.h" +#include "soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.h" + +static void dc_construct_soc_and_ip_translator (struct soc_and_ip_translator *soc_and_ip_translator, +enum dce_version dc_version) +{ +switch (dc_version) { +case DCN_VERSION_4_01 : +dcn401_construct_soc_and_ip_translator (soc_and_ip_translator); +break ; +default : +break ; + } +} + +struct soc_and_ip_translator *dc_create_soc_and_ip_translator (enum dce_version dc_version) +{ +struct soc_and_ip_translator *soc_and_ip_translator; + + soc_and_ip_translator =kzalloc (sizeof (*soc_and_ip_translator),GFP_KERNEL ); +if (!soc_and_ip_translator) +return NULL ; + +dc_construct_soc_and_ip_translator (soc_and_ip_translator, dc_version); + +return soc_and_ip_translator; +} + +void dc_destroy_soc_and_ip_translator (struct soc_and_ip_translator **soc_and_ip_translator) +{ +kfree (*soc_and_ip_translator); + *soc_and_ip_translator =NULL ; +}
Signature · 1 line
2.43.0
PATCH 4/8 drm/amd/display: incorrect conditions for failing dto calculations
In reply to Fangzhi ZuoFrom: Clay King <[email protected]>
[Why & How]
Previously, when calculating dto phase, we would incorrectly fail when phase <=0 without additionally checking for the integer value. This meant that calculations would incorrectly fail when the desired pixel clock was an exact multiple of the reference clock.
--- drivers/gpu/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c +1 -1
@@ -619,7 +619,7 @@ void dccg401_set_dp_dto( dto_integer =div_u64 (params->pixclk_hz, dto_modulo_hz); dto_phase_hz = params->pixclk_hz - dto_integer * dto_modulo_hz; -if (dto_phase_hz <=0 ) { +if (dto_phase_hz <=0 && dto_integer <=0 ) {/* negative pixel rate should never happen */ BREAK_TO_DEBUGGER ();return ;
Signature · 1 line
2.43.0
PATCH 5/8 drm/amd/display: Clear the CUR_ENABLE register on DCN314 w/out DPP PG
In reply to Fangzhi ZuoFrom: Ivan Lipski <[email protected]>
[Why&How]
ON DCN314, clearing DPP SW structure without power gating it can cause a double cursor in full screen with non-native scaling.
A W/A that clears CURSOR0_CONTROL cursor_enable flag if dcn10_plane_atomic_power_down is called and DPP power gating is disabled.
--- .../drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c | 9 +++ .../drm/amd/display/dc/dpp/dcn10/dcn10_dpp.h | 2 + .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c | 1 + .../amd/display/dc/hwss/dcn314/dcn314_hwseq.c | 72 +++++++++++++++++++ .../amd/display/dc/hwss/dcn314/dcn314_hwseq.h | 2 + .../amd/display/dc/hwss/dcn314/dcn314_init.c | 1 + drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 3 + 7 files changed, 90 insertions(+)
drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c +9 -0
@@ -520,6 +520,15 @@ void dpp1_dppclk_control(REG_UPDATE (DPP_CONTROL ,DPP_CLOCK_ENABLE ,0 ); } +void dpp_force_disable_cursor (struct dpp *dpp_base) +{ +struct dcn10_dpp *dpp =TO_DCN10_DPP (dpp_base); + +/* Force disable cursor */ +REG_UPDATE (CURSOR0_CONTROL ,CUR0_ENABLE ,0 ); + dpp_base->pos.cur0_ctl.bits.cur0_enable =0 ; +} +static const struct dpp_funcs dcn10_dpp_funcs = { .dpp_read_state = dpp_read_state, .dpp_reset = dpp_reset,
drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.h +2 -0
@@ -1525,4 +1525,6 @@ void dpp1_construct(struct dcn10_dpp *dpp1,void dpp1_cm_get_gamut_remap (struct dpp *dpp_base,struct dpp_grph_csc_adjustment *adjust); +void dpp_force_disable_cursor (struct dpp *dpp_base); +#endif
drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c +1 -0
@@ -1494,6 +1494,7 @@ static struct dpp_funcs dcn30_dpp_funcs = { .dpp_dppclk_control = dpp1_dppclk_control, .dpp_set_hdr_multiplier = dpp3_set_hdr_multiplier, .dpp_get_gamut_remap = dpp3_cm_get_gamut_remap, + .dpp_force_disable_cursor = dpp_force_disable_cursor, };
drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c +72 -0
75 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.h +2 -0
@@ -47,4 +47,6 @@ void dcn314_dpp_root_clock_control(struct dce_hwseq *hws, unsigned int dpp_inst,void dcn314_disable_link_output (struct dc_link *link,const struct link_resource *link_res,enum signal_type signal); +void dcn314_dpp_pg_control (struct dce_hwseq *hws,unsigned int dpp_inst,bool power_on); +#endif /* __DC_HWSS_DCN314_H__ */
drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_init.c +1 -0
@@ -142,6 +142,7 @@ static const struct hwseq_private_funcs dcn314_private_funcs = { .enable_power_gating_plane = dcn314_enable_power_gating_plane, .dpp_root_clock_control = dcn314_dpp_root_clock_control, .hubp_pg_control = dcn31_hubp_pg_control, + .dpp_pg_control = dcn314_dpp_pg_control, .program_all_writeback_pipes_in_tree = dcn30_program_all_writeback_pipes_in_tree, .update_odm = dcn314_update_odm, .dsc_pg_control = dcn314_dsc_pg_control,
drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h +3 -0
@@ -349,6 +349,9 @@ struct dpp_funcs {struct dpp *dpp_base, enum dc_color_space color_space, struct dc_csc_transform cursor_csc_color_matrix); + +void (*dpp_force_disable_cursor)(struct dpp *dpp_base); + };
Signature · 1 line
2.43.0
PATCH 6/8 drm/amd/display: Skip Check Runtime Link Setting for Specific Branch Device
In reply to Fangzhi Zuo[why]
Read link setting inside mode validation is not always the final downlink setting. It is found true in Synaptics branch device.
At bootup, the preferred mode being set right after 1080p is set. It occurred before graphic load. That modeset switch in a short period of time makes the branch device switch back and forth from lower and higher link rate, observed at Synaptics branch device.
DP2 RTK hub on the other hand, sticks to highest available downlink rate after bootup.
Existing check of runtime downlink setting in mode validation shows asynchronous at branch device link switch, i.e., downlink switch to higher link rate not yet complete when the mode validation tries to probe the downlink setting. That makes mode validation checking downlink setting making wrong decision by pruning modes that should pass the validation after the downlink setting switch is complete.
[how]
If Synaptics is found at the last branch, skip checking downlink setting at mode validation.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 3 ++ .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 40 ++++++++++++++++++- 2 files changed, 41 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +3 -0
@@ -768,6 +768,9 @@ struct amdgpu_dm_connector {uint16_t vc_full_pbn;struct mutex handle_mst_msg_ready; +/* branch device specific data */ +uint32_t branch_ieee_oui; +/* TODO see if we can merge with ddc_bus or make a dm_connector */ struct amdgpu_i2c_adapter *i2c;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +38 -2
@@ -330,6 +330,34 @@ static bool retrieve_downstream_port_device(struct amdgpu_dm_connector *aconnectreturn true; } +static bool retrieve_branch_specific_data (struct amdgpu_dm_connector *aconnector) +{ +struct drm_connector *connector = &aconnector->base; +struct drm_dp_mst_port *port = aconnector->mst_output_port; +struct drm_dp_mst_port *port_parent; +struct drm_dp_aux *immediate_upstream_aux; +struct drm_dp_desc branch_desc; + +if (!port->parent) +return false; + + port_parent = port->parent->port_parent; + + immediate_upstream_aux = port_parent ? &port_parent->aux : port->mgr->aux; + +if (drm_dp_read_desc (immediate_upstream_aux, &branch_desc, true)) +return false; + + aconnector->branch_ieee_oui = (branch_desc.ident.oui[0 ] <<16 ) + + (branch_desc.ident.oui[1 ] <<8 ) + + (branch_desc.ident.oui[2 ]); + +drm_dbg_dp (port->aux.drm_dev,"MST branch oui 0x%x detected at %s\n" , + aconnector->branch_ieee_oui, connector->name); + +return true; +} +static int dm_dp_mst_get_modes (struct drm_connector *connector) {struct amdgpu_dm_connector *aconnector =to_amdgpu_dm_connector (connector);
@@ -669,6 +697,9 @@ dm_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,drm_connector_set_path_property (connector, pathprop); +if (!retrieve_branch_specific_data (aconnector)) + aconnector->branch_ieee_oui =0 ; +/* * Initialize connector state before adding the connectror to drm and * framebuffer lists
@@ -1774,6 +1805,9 @@ static bool dp_get_link_current_set_bw(struct drm_dp_aux *aux, uint32_t *cur_lin link_bw_set = data[DP_LINK_BW_SET -DP_LINK_BW_SET ]; lane_count.raw = data[DP_LANE_COUNT_SET -DP_LINK_BW_SET ]; +drm_dbg_dp (aux->drm_dev,"MST_DSC downlink setting: %d, 0x%x x %d\n" , + dp_link_encoding, link_bw_set, lane_count.bits.LANE_COUNT_SET); +switch (dp_link_encoding) {case DP_8b_10b_ENCODING: link_rate = link_bw_set;
@@ -1870,8 +1904,10 @@ enum dc_status dm_dp_mst_is_port_support_mode( end_link_bw = aconnector->mst_local_bw; } -if (end_link_bw >0 && stream_kbps > end_link_bw) { -DRM_DEBUG_DRIVER ("MST_DSC dsc decode at last link." +if (end_link_bw >0 && + stream_kbps > end_link_bw && + aconnector->branch_ieee_oui !=DP_BRANCH_DEVICE_ID_90CC24 ) { +DRM_DEBUG_DRIVER ("MST_DSC dsc decode at last link. " "Mode required bw can't fit into last link\n" );return DC_FAIL_BANDWIDTH_VALIDATE ; }
Signature · 1 line
2.43.0
PATCH 7/8 drm/amd/display: [FW Promotion] Release 0.1.25.0
In reply to Fangzhi ZuoFrom: Taimur Hassan <[email protected]>
--- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +7 -6
@@ -2364,6 +2364,7 @@ struct dmub_cmd_fams2_global_config {union dmub_fams2_global_feature_config features;uint32_t recovery_timeout_us;uint32_t hwfq_flip_programming_delay_us; +uint32_t max_allow_to_target_delta_us;// how early DCN could assert P-State allow compared to the P-State target };union dmub_cmd_fams2_config {
@@ -4170,6 +4171,12 @@ enum replay_version {* Data passed from driver to FW in a DMUB_CMD___SET_REPLAY_VERSION command. */ struct dmub_cmd_replay_set_version_data { +/** +* Panel Instance. +* Panel instance to identify which psr_state to use +* Currently the support is only for 0 or 1 +*/ +uint8_t panel_inst;/** * PSR version that FW should implement. */
@@ -4178,12 +4185,6 @@ struct dmub_cmd_replay_set_version_data {* PSR control version. */ uint8_t cmd_version; -/** -* Panel Instance. -* Panel instance to identify which psr_state to use -* Currently the support is only for 0 or 1 -*/ -uint8_t panel_inst;/** * Explicit padding to 4 byte boundary. */
Signature · 1 line
2.43.0
PATCH 8/8 drm/amd/display: Promote DC to 3.2.348
In reply to Fangzhi ZuoFrom: Taimur Hassan <[email protected]>
Summary:
* Refactor bounding box values handling
* Fix incorrect condition to fail dto clk calculation
* Skip check downlink setting for a certain MST branch device
* Fix double cursor issue on dcn314
--- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -55,7 +55,7 @@ struct aux_payload;struct set_config_cmd_payload ;struct dmub_notification ; -#define DC_VER "3.2.347" +#define DC_VER "3.2.348"/** * MAX_SURFACES - representative of the upper bound of surfaces that can be piped to a single CRTC
Signature · 1 line
2.43.0
[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 - 944b2e39077bc733746de7714e0262f83a696c3b -> drm/amd/display: DC v3.2.347) with new patches added on top of it.
Tested on Ubuntu 24.04.3, on Wayland and X11, using KDE Plasma and Gnome.
Thank you,
Dan Wheeler
Sr. Technologist | AMD
SW Display
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
amd.com
-----Original Message-----
From: Fangzhi Zuo <[email protected]>
Sent: Tuesday, September 2, 2025 9:33 AM
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]>; Zuo, Jerry <[email protected]>
Subject: [PATCH 0/8] DC Patches August 25, 2025
Summary:
* DC version 3.2.348
* Remove state/param from check update
* Refactor bounding box values handling
* Fix incorrect condition to fail dto clk calculation
* Skip check downlink setting for a certain MST branch device
* Fix double cursor issue on dcn314
Austin Zheng (1):
drm/amd/display: Add Component To Handle Bounding Box Values and IP
Caps
Clay King (1):
drm/amd/display: incorrect conditions for failing dto calculations
Fangzhi Zuo (1):
drm/amd/display: Skip Check Runtime Link Setting for Specific Branch
Device
Ivan Lipski (1):
drm/amd/display: Clear the CUR_ENABLE register on DCN314 w/out DPP PG
Mario Limonciello (1):
drm/amd/display: Optimize custom brightness curve interpolation
Relja Vojvodic (1):
drm/amd/display: Increase minimum clock for TMDS 420 with pipe
splitting
Taimur Hassan (2):
drm/amd/display: [FW Promotion] Release 0.1.25.0 drm/amd/display: Promote DC to 3.2.348
drivers/gpu/drm/amd/display/Makefile | 1 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 64 +-- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 3 + .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 40 +- drivers/gpu/drm/amd/display/dc/Makefile | 1 + drivers/gpu/drm/amd/display/dc/core/dc.c | 8 +- drivers/gpu/drm/amd/display/dc/dc.h | 4 +- .../amd/display/dc/dccg/dcn401/dcn401_dccg.c | 2 +- .../dc/dml2/dml21/dml21_translation_helper.c | 368 +----------------- .../amd/display/dc/dml2/dml21/dml21_wrapper.c | 2 +- .../src/dml2_core/dml2_core_dcn4_calcs.c | 28 +- .../drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c | 9 + .../drm/amd/display/dc/dpp/dcn10/dcn10_dpp.h | 2 + .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c | 1 + .../amd/display/dc/hwss/dcn314/dcn314_hwseq.c | 72 ++++ .../amd/display/dc/hwss/dcn314/dcn314_hwseq.h | 2 + .../amd/display/dc/hwss/dcn314/dcn314_init.c | 1 + drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 3 + .../display/dc/inc/soc_and_ip_translator.h | 24 ++ .../display/dc/soc_and_ip_translator/Makefile | 19 + .../dcn401/dcn401_soc_and_ip_translator.c | 304 +++++++++++++++ .../dcn401/dcn401_soc_and_ip_translator.h | 22 ++ .../dcn42/dcn42_soc_and_ip_translator.c | 27 ++ .../dcn42/dcn42_soc_and_ip_translator.h | 16 + .../soc_and_ip_translator.c | 37 ++ .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 13 +- 26 files changed, 672 insertions(+), 401 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/inc/soc_and_ip_translator.h create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/Makefile create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.c create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.h create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.c create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.h create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/soc_and_ip_translator.c
--
2.43.0