]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: Fix DVI-D/HDMI adapters
authorTimur Kristóf <timur.kristof@gmail.com>
Mon, 25 Aug 2025 21:33:33 +0000 (23:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:23 +0000 (15:37 -0500)
[ Upstream commit 489f0f600ce2c0dae640df9035e1d82677d2580f ]

When the EDID has the HDMI bit, we should simply select
the HDMI signal type even on DVI ports.

For reference see, the legacy amdgpu display code:
amdgpu_atombios_encoder_get_encoder_mode
which selects ATOM_ENCODER_MODE_HDMI for the same case.

This commit fixes DVI connectors to work with DVI-D/HDMI
adapters so that they can now produce output over these
connectors for HDMI monitors with higher bandwidth modes.
With this change, even HDMI audio works through DVI.

For testing, I used a CAA-DMDHFD3 DVI-D/HDMI adapter
with the following GPUs:

Tahiti (DCE 6) - DC can now output 4K 30 Hz over DVI
Polaris 10 (DCE 11.2) - DC can now output 4K 60 Hz over DVI

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dc/link/link_detection.c

index 827b630daf49a4002dcd6a5748315c0271df9d07..18d0ef40f23fb07ca6ab176acdf3cf46e7f8601b 100644 (file)
@@ -1140,6 +1140,10 @@ static bool detect_link_and_local_sink(struct dc_link *link,
                if (sink->sink_signal == SIGNAL_TYPE_HDMI_TYPE_A &&
                    !sink->edid_caps.edid_hdmi)
                        sink->sink_signal = SIGNAL_TYPE_DVI_SINGLE_LINK;
+               else if (dc_is_dvi_signal(sink->sink_signal) &&
+                        aud_support->hdmi_audio_native &&
+                        sink->edid_caps.edid_hdmi)
+                       sink->sink_signal = SIGNAL_TYPE_HDMI_TYPE_A;
 
                if (link->local_sink && dc_is_dp_signal(sink_caps.signal))
                        dp_trace_init(link);