drm/amd/display: fix dp kvm can't light up
Subsystems (3)
PATCH 1/1 drm/amd/display: fix dp kvm can't light up
From: "Tianci.Yin" <[email protected]>
[why]
The DP KVM failed to light up, since the lttpr_mode is not reset to default value when failed to read LTTPR capabilities, and the variable max_link_rate retains a initial value zero, this cause variable link_rate be assigned to an error value zero, consquently pixel_clock get wrong value zero, and kvm can't light up.
[how]
Reset lttpr_mode to default value when failed to read LTTPR capabilities, so that the link_rate fallbacks to the minimum rate that supported by link encoder and sink.
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1 -0
@@ -5101,6 +5101,7 @@ bool dp_retrieve_lttpr_cap(struct dc_link *link) sizeof(lttpr_dpcd_data));if (status !=DC_OK ) {DC_LOG_DP2 ("%s: Read LTTPR caps data failed.\n" , __func__); + link->lttpr_mode =LTTPR_MODE_NON_LTTPR ;return false; }
Signature · 1 line
2.25.1
Quoted 9 lines · Tianci Yin
From: "Tianci.Yin" <[email protected]>
[why]
The DP KVM failed to light up, since thelttpr_modeis not reset to default value when failed to read LTTPR capabilities, and the variablemax_link_rateretains a initial value zero, this cause variablelink_ratebe assigned to an error value zero, consquentlypixel_clockget wrong value zero, and kvm can't light up.
Quoted 6 lines
[how]
Resetlttpr_modeto default value when failed to read LTTPR capabilities, so that thelink_ratefallbacks to the minimum rate that supported by link encoder and sink.Signed-off-by Tianci.Yin <[email protected]>
Harry
Quoted 16 lines
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1
-0@@ -5101,6 +5101,7 @@ bool dp_retrieve_lttpr_cap(struct dc_link *link) sizeof(lttpr_dpcd_data));if (status !=DC_OK ) {DC_LOG_DP2 ("%s: Read LTTPR caps data failed.\n" , __func__); + link->lttpr_mode =LTTPR_MODE_NON_LTTPR ;return false; }
Yin, Tianci (Rico)
Reviewed-by Harry Wentland[AMD Official Use Only]
Thank you very much Harry!
Regards,
Rico
________________________________
From: Wentland, Harry <[email protected]>
Sent: Tuesday, March 8, 2022 21:55
To: Yin, Tianci (Rico) <[email protected]>; [email protected] <[email protected]>
Cc: Wang, Yu (Charlie) <[email protected]>; Zhuo, Qingqing (Lillian) <[email protected]>; Liu, Wenjing <[email protected]>; Chen, Guchun <[email protected]>
Subject: Re: [PATCH] drm/amd/display: fix dp kvm can't light up
Quoted 9 lines · Tianci Yin
From: "Tianci.Yin" <[email protected]>
[why]
The DP KVM failed to light up, since thelttpr_modeis not reset to default value when failed to read LTTPR capabilities, and the variablemax_link_rateretains a initial value zero, this cause variablelink_ratebe assigned to an error value zero, consquentlypixel_clockget wrong value zero, and kvm can't light up.
Quoted 6 lines
[how]
Resetlttpr_modeto default value when failed to read LTTPR capabilities, so that thelink_ratefallbacks to the minimum rate that supported by link encoder and sink.Signed-off-by Tianci.Yin <[email protected]>
Harry
Quoted 16 lines
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1
-0@@ -5101,6 +5101,7 @@ bool dp_retrieve_lttpr_cap(struct dc_link *link) sizeof(lttpr_dpcd_data));if (status !=DC_OK ) {DC_LOG_DP2 ("%s: Read LTTPR caps data failed.\n" , __func__); + link->lttpr_mode =LTTPR_MODE_NON_LTTPR ;return false; }