DC Patches for 13 April 2026
Subsystems (5)
cover DC Patches for 13 April 2026
DC v3.2.378 summary:
New:
- Add p-state schedule admissibility flags and frame-time utility
Fixes:
- Fixed incorrect math_mod() result due to wrong variable in fmod implementation (Cc: stable)
- Use overlay cursor when a color pipeline is active to avoid incorrect rendering
- Constrain vblank_nom to bounding box value instead of entire blank
Cleanups:
- Add const qualifiers to watermark params struct
- Fix C4242 narrowing-conversion warnings
---
Alex Hung (1):
drm/amd/display: Use overlay cursor when color pipeline is active
Gaghik Khachatrian (1):
drm/amd/display: Fix compiler warnings
Taimur Hassan (1):
drm/amd/display: Promote DC to 3.2.378
Wenjing Liu (3):
drm/amd/display: fix math_mod() using arg1 instead of arg2 drm/amd/display: add const qualifiers to watermark params struct drm/amd/display: add pstate schedule admissibility flags and
frame-time utility
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 53 +++++++++++++++++-- drivers/gpu/drm/amd/display/dc/dc.h | 10 ++-- drivers/gpu/drm/amd/display/dc/dc_stream.h | 4 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 2 +- .../src/dml2_core/dml2_core_shared_types.h | 39 ++++++++------ .../dml21/src/dml2_core/dml2_core_utils.c | 8 +++ .../dml21/src/dml2_core/dml2_core_utils.h | 1 + .../lib_float_math.c | 2 +- 8 files changed, 90 insertions(+), 29 deletions(-)
Signature · 1 line
2.53.0
PATCH 1/6 drm/amd/display: Fix compiler warnings
From: Gaghik Khachatrian <[email protected]>
[Why] Implicit conversions from wider integer types to byte-sized fields were generating compiler warnings. These warnings hide intentional protocol /storage boundaries and reduce signal quality during builds. Making conversion intent explicit improves readability and warning hygiene without changing behavior.
[How] Added explicit, type-safe casts at intentional narrow-storage boundaries. Kept data models & runtime logic unchanged, only clarifying conversion intent.
Functionality and behavior is unchanged; only type intent is explicit. Aligned warning cleanup with existing coding standards for explicit boundary conversions.
--- drivers/gpu/drm/amd/display/dc/dc.h | 8 +++++--- drivers/gpu/drm/amd/display/dc/dc_stream.h | 4 ++-- drivers/gpu/drm/amd/display/dc/dc_types.h | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +5 -3
@@ -1061,9 +1061,11 @@ struct dc_debug_options {bool hdmi20_disable;bool skip_detection_link_training;uint32_t edid_read_retry_times; -unsigned int force_odm_combine;//bit vector based on otg inst -unsigned int seamless_boot_odm_combine; -unsigned int force_odm_combine_4to1;//bit vector based on otg inst + +uint8_t force_odm_combine;//bit vector based on otg inst +uint8_t seamless_boot_odm_combine; +uint8_t force_odm_combine_4to1;//bit vector based on otg inst +int minimum_z8_residency_time;int minimum_z10_residency_time;bool disable_z9_mpc;
drivers/gpu/drm/amd/display/dc/dc_stream.h +2 -2
@@ -162,13 +162,13 @@ struct test_pattern {#define SUBVP_DRR_MARGIN_US 100 // 100us for DRR margin (SubVP + DRR)struct dc_stream_debug_options { -char force_odm_combine_segments; +uint8_t force_odm_combine_segments;/* * When force_odm_combine_segments is non zero, allow dc to * temporarily transition to ODM bypass when minimal transition state * is required to prevent visual glitches showing on the screen */ -char allow_transition_for_forced_odm; +uint8_t allow_transition_for_forced_odm; };#define LUMINANCE_DATA_TABLE_SIZE 10
drivers/gpu/drm/amd/display/dc/dc_types.h +1 -1
@@ -205,7 +205,7 @@ struct dc_edid_caps {uint32_t audio_latency;uint32_t video_latency; -unsigned int freesync_vcp_code; +unsigned char freesync_vcp_code;uint8_t qs_bit;uint8_t qy_bit;
Signature · 1 line
2.53.0
PATCH 2/6 drm/amd/display: Use overlay cursor when color pipeline is active
In reply to Aurabindo PillaiFrom: Alex Hung <[email protected]>
Force overlay cursor mode when an underlying plane has a non-bypassed color pipeline to avoid incorrect cursor transformation.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 53 +++++++++++++++++-- 1 file changed, 49 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +49 -4
@@ -95,6 +95,7 @@#include <drm/drm_utils.h> #include <drm/drm_vblank.h> #include <drm/drm_audio_component.h> +#include <drm/drm_colorop.h> #include <drm/drm_gem_atomic_helper.h> #include <media/cec-notifier.h>
@@ -12325,6 +12326,38 @@ static int add_affected_mst_dsc_crtcs(struct drm_atomic_state *state, struct drm* available. */ +/** +* dm_plane_color_pipeline_active() - Check if a plane's color pipeline active. +* @state: DRM atomic state +* @plane: DRM plane to check +* @use_old: if true, inspect the old colorop states; otherwise the new ones +* +* A color pipeline may be selected (color_pipeline != NULL) but still is +* inactive if every colorop in the chain is bypassed. Only return +* true when at least one colorop has bypass == false, meaning the cursor +* would be subjected to the transformation in native mode. +* +* Return: true if the pipeline modifies pixels, false otherwise. +*/ +static bool dm_plane_color_pipeline_active (struct drm_atomic_state *state, +struct drm_plane *plane, +bool use_old) +{ +struct drm_colorop *colorop; +struct drm_colorop_state *old_colorop_state, *new_colorop_state; +int i; + +for_each_oldnew_colorop_in_state (state, colorop, old_colorop_state, new_colorop_state, i) { +struct drm_colorop_state *cstate = use_old ? old_colorop_state : new_colorop_state; + +if (cstate->colorop->plane != plane) +continue ; +if (!cstate->bypass) +return true; + } +return false; +} +/** * dm_crtc_get_cursor_mode() - Determine the required cursor mode on crtc * @adev: amdgpu device
@@ -12336,8 +12369,8 @@ static int add_affected_mst_dsc_crtcs(struct drm_atomic_state *state, struct drm* the dm_crtc_state. * * The cursor should be enabled in overlay mode if there exists an underlying -* plane - on which the cursor may be blended - that is either YUV formatted, or -* scaled differently from the cursor. +* plane - on which the cursor may be blended - that is either YUV formatted, +* scaled differently from the cursor, or has a color pipeline active. * * Since zpos info is required, drm_atomic_normalize_zpos must be called before * calling this function.
@@ -12375,7 +12408,7 @@ static int dm_crtc_get_cursor_mode(struct amdgpu_device *adev,/* * Cursor mode can change if a plane's format changes, scale changes, is -* enabled/disabled, or z-order changes. +* enabled/disabled, z-order changes, or color management properties change. */ for_each_oldnew_plane_in_state (state, plane, old_plane_state, plane_state, i) {int new_scale_w, new_scale_h, old_scale_w, old_scale_h;
@@ -12400,6 +12433,12 @@ static int dm_crtc_get_cursor_mode(struct amdgpu_device *adev, consider_mode_change = true;break ; } + +if (dm_plane_color_pipeline_active (state, plane, true) != +dm_plane_color_pipeline_active (state, plane, false)) { + consider_mode_change = true; +break ; + } }if (!consider_mode_change && !crtc_state->zpos_changed)
@@ -12440,6 +12479,12 @@ static int dm_crtc_get_cursor_mode(struct amdgpu_device *adev,return 0 ; } +/* Underlying plane has an active color pipeline - cursor would be transformed */ +if (dm_plane_color_pipeline_active (state, plane, false)) { + *cursor_mode =DM_CURSOR_OVERLAY_MODE ; +return 0 ; + } +dm_get_plane_scale (plane_state, &underlying_scale_w, &underlying_scale_h); dm_get_plane_scale(cursor_state,
@@ -12819,7 +12864,7 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev, goto fail; }else if (required_cursor_mode ==DM_CURSOR_OVERLAY_MODE ) {drm_dbg_driver (crtc->dev, -"[CRTC:%d:%s] Cannot enable native cursor due to scaling or YUV restrictions\n" , +"[CRTC:%d:%s] Cannot enable native cursor due to scaling, YUV, or color pipeline restrictions\n" , crtc->base.id, crtc->name); ret = -EINVAL ; goto fail;
Signature · 1 line
2.53.0
PATCH 3/6 drm/amd/display: fix math_mod() using arg1 instead of arg2
In reply to Aurabindo PillaiFrom: Wenjing Liu <[email protected]>
[Why]math_mod() multiplied by arg1 instead of arg2, returning a wrong result for any non-trivial modulo operation.
[How]
Replace arg1 with arg2 in the subtraction term to correctly implement fmod(arg1, arg2).
--- .../dml2_0/dml21/src/dml2_standalone_libraries/lib_float_math.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_libraries/lib_float_math.c +1 -1
@@ -23,7 +23,7 @@ double math_mod(const double arg1, const double arg2)return arg2;if (isNaN (arg2))return arg1; -return arg1 - arg1 * ((int )(arg1 / arg2)); +return arg1 - arg2 * ((int )(arg1 / arg2)); }double math_min2 (const double arg1,const double arg2)
Signature · 1 line
2.53.0
PATCH 4/6 drm/amd/display: add const qualifiers to watermark params struct
In reply to Aurabindo PillaiFrom: Wenjing Liu <[email protected]>
[why]
There are few non const input pointer fields. Setting them to const to prevent future modification of read-only data.
--- .../src/dml2_core/dml2_core_shared_types.h | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_shared_types.h +17 -17
@@ -1721,30 +1721,30 @@ struct dml2_core_calcs_CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport_paramdouble ReturnBW;bool SynchronizeTimings;bool SynchronizeDRRDisplaysForUCLKPStateChange; -unsigned int *dpte_group_bytes; +const unsigned int *dpte_group_bytes;struct dml2_core_internal_SOCParametersList mmSOCParameters;unsigned int WritebackChunkSize;double SOCCLK ;double DCFClkDeepSleep; -unsigned int *DETBufferSizeY; -unsigned int *DETBufferSizeC; -unsigned int *SwathHeightY; -unsigned int *SwathHeightC; -unsigned int *SwathWidthY; -unsigned int *SwathWidthC; -unsigned int *DPPPerSurface; -double *BytePerPixelDETY; -double *BytePerPixelDETC; -unsigned int *DSTXAfterScaler; -unsigned int *DSTYAfterScaler; +const unsigned int *DETBufferSizeY; +const unsigned int *DETBufferSizeC; +const unsigned int *SwathHeightY; +const unsigned int *SwathHeightC; +const unsigned int *SwathWidthY; +const unsigned int *SwathWidthC; +const unsigned int *DPPPerSurface; +const double *BytePerPixelDETY; +const double *BytePerPixelDETC; +const unsigned int *DSTXAfterScaler; +const unsigned int *DSTYAfterScaler;bool UnboundedRequestEnabled;unsigned int CompressedBufferSizeInkByte;bool max_outstanding_when_urgent_expected; -unsigned int max_outstanding_requests; -unsigned int max_request_size_bytes; -unsigned int *meta_row_height_l; -unsigned int *meta_row_height_c; -enum dml2_pstate_method *uclk_pstate_switch_modes; +const unsigned int max_outstanding_requests; +const unsigned int max_request_size_bytes; +const unsigned int *meta_row_height_l; +const unsigned int *meta_row_height_c; +const enum dml2_pstate_method *uclk_pstate_switch_modes;// Output struct dml2_core_internal_watermarks *Watermark;
Signature · 1 line
2.53.0
PATCH 5/6 drm/amd/display: add pstate schedule admissibility flags and frame-time utility
In reply to Aurabindo PillaiFrom: Wenjing Liu <[email protected]>
[Why]
Core needs to track pstate schedule admissibility for different global change scenarios (fclk, temp read, PPT) and requires a reusable way to compute per-stream frame time from timing parameters.
[How]
Extend dml2_core_internal_mode_support_info with:fclk_pstate_schedule_admissible temp_read_pstate_schedule_admissible ppt_pstate_schedule_admissible
Add dummy_double_array[3][DML2_MAX_PLANES] to dml2_core_calcs_mode_support_locals.
Introduce dml2_core_utils_get_frame_time_us() in dml2_core_utils.c and export it in dml2_core_utils.h to compute frame time in microseconds from stream timing (vline time * (vactive + vblank)).
--- .../dml2_0/dml21/src/dml2_core/dml2_core_shared_types.h | 5 +++++ .../dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.c | 8 ++++++++ .../dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.h | 1 + 3 files changed, 14 insertions(+)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_shared_types.h +5 -0
@@ -269,6 +269,9 @@ struct dml2_core_internal_mode_support_info {bool global_dram_clock_change_supported;bool global_fclk_change_supported;bool global_temp_read_or_ppt_supported; +bool fclk_pstate_schedule_admissible; +bool temp_read_pstate_schedule_admissible; +bool ppt_pstate_schedule_admissible;bool USRRetrainingSupport;bool AvgBandwidthSupport;bool UrgVactiveBandwidthSupport;
@@ -1063,6 +1066,8 @@ struct dml2_core_calcs_mode_support_locals {bool dummy_boolean_array[2 ][DML2_MAX_PLANES ];double dummy_single[3 ];double dummy_single_array[DML2_MAX_PLANES ]; +double dummy_double_array[3 ][DML2_MAX_PLANES ]; +enum dml2_pstate_method dummy_pstate_method_array[DML2_MAX_PLANES ];struct dml2_core_internal_watermarks dummy_watermark;double dummy_bw[dml2_core_internal_soc_state_max][dml2_core_internal_bw_max];double surface_dummy_bw[dml2_core_internal_soc_state_max][dml2_core_internal_bw_max][DML2_MAX_PLANES ];
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.c +8 -0
@@ -786,3 +786,11 @@ bool dml2_core_utils_is_odm_split(enum dml2_odm_mode odm_mode)return false; } } + +double dml2_core_utils_get_frame_time_us (const struct dml2_stream_parameters *stream) +{ +double otg_vline_time_us = (double )stream->timing.h_total / (double )stream->timing.pixel_clock_khz *1000.0 ; +double non_vtotal = stream->timing.vblank_nom + stream->timing.v_active; +double frame_time_us = non_vtotal * otg_vline_time_us; +return frame_time_us; +}
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.h +1 -0
@@ -39,5 +39,6 @@ bool dml2_core_utils_is_hpo_dp_encoder(const struct dml2_stream_parameters *strebool dml2_core_utils_is_dp_8b_10b_link_rate (enum dml2_output_link_dp_rate rate);bool dml2_core_utils_is_dp_128b_132b_link_rate (enum dml2_output_link_dp_rate rate);bool dml2_core_utils_is_odm_split (enum dml2_odm_mode odm_mode); +double dml2_core_utils_get_frame_time_us (const struct dml2_stream_parameters *stream);#endif /* __DML2_CORE_UTILS_H__ */
Signature · 1 line
2.53.0
PATCH 6/6 drm/amd/display: Promote DC to 3.2.378
In reply to Aurabindo PillaiFrom: Taimur Hassan <[email protected]>
DC v3.2.378 summary:
New:
- Add p-state schedule admissibility flags and frame-time utility
Fixes:
- Fixed incorrect math_mod() result due to wrong variable in fmod implementation (Cc: stable)
- Use overlay cursor when a color pipeline is active to avoid incorrect rendering
- Constrain vblank_nom to bounding box value instead of entire blank
Cleanups:
- Add const qualifiers to watermark params struct
- Fix C4242 narrowing-conversion warnings
--- 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
@@ -63,7 +63,7 @@ struct dcn_dsc_reg_state;struct dcn_optc_reg_state ;struct dcn_dccg_reg_state ; -#define DC_VER "3.2.377" +#define DC_VER "3.2.378"/** * MAX_SURFACES - representative of the upper bound of surfaces that can be piped to a single CRTC
Signature · 1 line
2.53.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 -> b787d21fab08ddebc308b1c8b4baece1eb81243d -> drm/amd/pm: fix incorrect FeatureCtrlMask setting on smu v14.0.x) 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: Aurabindo Pillai <[email protected]>
Sent: Thursday, April 9, 2026 11:03 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]>; Tseng, Chuan Yu (Max) <[email protected]>
Subject: [PATCH 0/6] DC Patches for 13 April 2026
DC v3.2.378 summary:
New:
- Add p-state schedule admissibility flags and frame-time utility
Fixes:
- Fixed incorrect math_mod() result due to wrong variable in fmod implementation (Cc: stable)
- Use overlay cursor when a color pipeline is active to avoid incorrect rendering
- Constrain vblank_nom to bounding box value instead of entire blank
Cleanups:
- Add const qualifiers to watermark params struct
- Fix C4242 narrowing-conversion warnings
---
Alex Hung (1):
drm/amd/display: Use overlay cursor when color pipeline is active
Gaghik Khachatrian (1):
drm/amd/display: Fix compiler warnings
Taimur Hassan (1):
drm/amd/display: Promote DC to 3.2.378
Wenjing Liu (3):
drm/amd/display: fix math_mod() using arg1 instead of arg2 drm/amd/display: add const qualifiers to watermark params struct drm/amd/display: add pstate schedule admissibility flags and
frame-time utility
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 53 +++++++++++++++++-- drivers/gpu/drm/amd/display/dc/dc.h | 10 ++-- drivers/gpu/drm/amd/display/dc/dc_stream.h | 4 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 2 +- .../src/dml2_core/dml2_core_shared_types.h | 39 ++++++++------ .../dml21/src/dml2_core/dml2_core_utils.c | 8 +++ .../dml21/src/dml2_core/dml2_core_utils.h | 1 + .../lib_float_math.c | 2 +- 8 files changed, 90 insertions(+), 29 deletions(-)
--
2.53.0