Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: Create dc_sink when EDID fail

[Why]
While reading remote EDID via Startech 1-to-4 hub, occasionally we
won't get response in time and won't light up corresponding monitor.

Ideally, we can still add generic modes for userspace to choose to try
to light up the monitor and which is done in
drm_helper_probe_single_connector_modes(). So the main problem here is
that we fail .mode_valid since we don't create remote dc_sink for this
case.

[How]
Also add default dc_sink if we can't get the EDID.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@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>

authored by

Wayne Lin and committed by
Alex Deucher
58de0ef2 b64625a3

+23
+23
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
··· 213 213 drm_connector_update_edid_property( 214 214 &aconnector->base, 215 215 NULL); 216 + 217 + DRM_DEBUG_KMS("Can't get EDID of %s. Add default remote sink.", connector->name); 218 + if (!aconnector->dc_sink) { 219 + struct dc_sink *dc_sink; 220 + struct dc_sink_init_data init_params = { 221 + .link = aconnector->dc_link, 222 + .sink_signal = SIGNAL_TYPE_DISPLAY_PORT_MST }; 223 + 224 + dc_sink = dc_link_add_remote_sink( 225 + aconnector->dc_link, 226 + NULL, 227 + 0, 228 + &init_params); 229 + 230 + if (!dc_sink) { 231 + DRM_ERROR("Unable to add a remote sink\n"); 232 + return 0; 233 + } 234 + 235 + dc_sink->priv = aconnector; 236 + aconnector->dc_sink = dc_sink; 237 + } 238 + 216 239 return ret; 217 240 } 218 241