]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: write segment pointer with mot enabled for mst
authorMeenakshikumar Somasundaram <meenakshikumar.somasundaram@amd.com>
Wed, 8 Oct 2025 17:35:07 +0000 (13:35 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 20 Oct 2025 22:26:36 +0000 (18:26 -0400)
[Why]
Some mst branches NAK's segment pointer writes with mot disabled.
So reset of segment pointer to 0 should be performed with mot enabled.

[How]
Write segment pointer of mst branch devices with mot enabled.

Reviewed-by: Cruise Hung <cruise.hung@amd.com>
Signed-off-by: Meenakshikumar Somasundaram <meenakshikumar.somasundaram@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/link/link_factory.c
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c

index 31a73867cd4cf527f593e90dcd7431fdcd5ce77a..f06af98d46ee867bd702842face7ad08d70cbeff 100644 (file)
@@ -817,9 +817,6 @@ static bool construct_dpia(struct dc_link *link,
 
        link->psr_settings.psr_version = DC_PSR_VERSION_UNSUPPORTED;
 
-       /* Some docks seem to NAK I2C writes to segment pointer with mot=0. */
-       link->wa_flags.dp_mot_reset_segment = true;
-
        return true;
 
 ddc_create_fail:
index 701afd2d4ab1207aba6422a01f60244c59317fac..750147c52c8af77012795f90792ed2cbe0ee36a0 100644 (file)
@@ -1867,6 +1867,12 @@ static bool retrieve_link_cap(struct dc_link *link)
        link->dpcd_caps.is_mst_capable = read_is_mst_supported(link);
        DC_LOG_DC("%s: MST_Support: %s\n", __func__, str_yes_no(link->dpcd_caps.is_mst_capable));
 
+       /* Some MST docks seem to NAK I2C writes to segment pointer with mot=0. */
+       if (link->dpcd_caps.is_mst_capable)
+               link->wa_flags.dp_mot_reset_segment = true;
+       else
+               link->wa_flags.dp_mot_reset_segment = false;
+
        get_active_converter_info(ds_port.byte, link);
 
        dp_wa_power_up_0010FA(link, dpcd_data, sizeof(dpcd_data));