Hi,

On Wed, 2025-10-29 at 11:02 +0800, Ray Wu wrote:
> From: Alex Hung <[email protected]>
> 
> [Why & How]
> This fixes the black screen issue on certain APUs with HDMI,
> accompanied by the following messages:
> 
> amdgpu 0000:c4:00.0: amdgpu: [drm] Failed to setup vendor info
>                      frame on connector DP-1: -22
> amdgpu 0000:c4:00.0: [drm] Cannot find any crtc or sizes [drm]
>                      Cannot find any crtc or sizes
> 
> Fixes: 99ff9bc57b02 ("drm/amd/display: Fix DVI-D/HDMI adapters")
> Suggested-by: Timur Kristóf <[email protected]>
> Reviewed-by: Harry Wentland <[email protected]>
> Signed-off-by: Alex Hung <[email protected]>
> Signed-off-by: Ray Wu <[email protected]>
> ---
>  drivers/gpu/drm/amd/display/dc/link/link_detection.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/link/link_detection.c
> b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
> index c417780f37bc..e8566a5218fc 100644
> --- a/drivers/gpu/drm/amd/display/dc/link/link_detection.c
> +++ b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
> @@ -1252,11 +1252,16 @@ static bool detect_link_and_local_sink(struct
> dc_link *link,
>                       sink->edid_caps.analog)
>                       sink->sink_signal = SIGNAL_TYPE_RGB;
>  
> +             if (sink->sink_signal != link->connector_signal)
> +                     DC_LOG_WARNING("sink_signal (%d) does not
> match connector_signal (%d)\n",
> +                                     sink->sink_signal, link-
> >connector_signal);
> +


We should not print warnings for things that occur during normal
operation. Warning is incorrect because the different signal type is
normal and expected on certain connectors, for example:

- DVI-I: the signal type may be DVI (dual or single link) or RGB
- DP: the signal type may be DP, DVI or HDMI (for dongles)
- HDMI: the signal type may be HDMI or DVI (without native audio)

My recommendation is the following:
1. Change the warning to a debug message (DC_LOG_DC)
2. Move it a few lines below where the sink_signal is determined.

Thanks & best regards,
Timur

>               /* HDMI-DVI Dongle */
>               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) &&
> +                      dc_is_dvi_signal(link->connector_signal) &&
>                        aud_support->hdmi_audio_native &&
>                        sink->edid_caps.edid_hdmi)
>                       sink->sink_signal = SIGNAL_TYPE_HDMI_TYPE_A;

Reply via email to