]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Add disconnect case on dongle check
authorJingwen Zhu <Jingwen.Zhu@amd.com>
Thu, 8 May 2025 03:19:49 +0000 (11:19 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 3 Jun 2025 19:35:40 +0000 (15:35 -0400)
[why]
In the case of an external monitor disconnection,
the kernel mode will attempt to post new timing
validation with two path counts (eDP + external
monitor removed to virtual).

[how]
Skip validating color depth and pixel encoding in the
scenario involving a DP to HDMI active converter dongle.

Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Jingwen Zhu <Jingwen.Zhu@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@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_validation.c

index 29606fda029d6bb6777aa46ec45a06fbc1594afe..e2235fd32998c94eb6716995092db83c2e9bde50 100644 (file)
@@ -86,6 +86,10 @@ static bool dp_active_dongle_validate_timing(
                        if (!dongle_caps->is_dp_hdmi_ycbcr420_pass_through)
                                return false;
                        break;
+               case PIXEL_ENCODING_UNDEFINED:
+                       /* These color depths are currently not supported */
+                       ASSERT(false);
+                       break;
                default:
                        /* Invalid Pixel Encoding*/
                        return false;
@@ -104,6 +108,10 @@ static bool dp_active_dongle_validate_timing(
                        if (dongle_caps->dp_hdmi_max_bpc < 12)
                                return false;
                        break;
+               case COLOR_DEPTH_UNDEFINED:
+                       /* These color depths are currently not supported */
+                       ASSERT(false);
+                       break;
                case COLOR_DEPTH_141414:
                case COLOR_DEPTH_161616:
                default: