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

drm/amd/display: add config option for eDP hotplug detection

[Why]
Some custom platforms use eDP hotplug events to notify panel
capability changes that should be reported

[How]
Add a DC config option that unblocks eDP hotplug events

Signed-off-by: Yi-Ling Chen <Yi-Ling.Chen2@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Anson Jacob <Anson.Jacob@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Yi-Ling Chen and committed by
Alex Deucher
5ab991ba 2631ac1a

+7 -4
+6 -4
drivers/gpu/drm/amd/display/dc/core/dc_link.c
··· 904 904 if (dc_is_virtual_signal(link->connector_signal)) 905 905 return false; 906 906 907 - if ((link->connector_signal == SIGNAL_TYPE_LVDS || 908 - link->connector_signal == SIGNAL_TYPE_EDP) && 909 - link->local_sink) { 907 + if (((link->connector_signal == SIGNAL_TYPE_LVDS || 908 + link->connector_signal == SIGNAL_TYPE_EDP) && 909 + (!link->dc->config.allow_edp_hotplug_detection)) && 910 + link->local_sink) { 910 911 // need to re-write OUI and brightness in resume case 911 912 if (link->connector_signal == SIGNAL_TYPE_EDP) { 912 913 dpcd_set_source_specific_data(link); ··· 1502 1501 link->connector_signal = SIGNAL_TYPE_EDP; 1503 1502 1504 1503 if (link->hpd_gpio) { 1505 - link->irq_source_hpd = DC_IRQ_SOURCE_INVALID; 1504 + if (!link->dc->config.allow_edp_hotplug_detection) 1505 + link->irq_source_hpd = DC_IRQ_SOURCE_INVALID; 1506 1506 link->irq_source_hpd_rx = 1507 1507 dal_irq_get_rx_source(link->hpd_gpio); 1508 1508 }
+1
drivers/gpu/drm/amd/display/dc/dc.h
··· 303 303 bool multi_mon_pp_mclk_switch; 304 304 bool disable_dmcu; 305 305 bool enable_4to1MPC; 306 + bool allow_edp_hotplug_detection; 306 307 #if defined(CONFIG_DRM_AMD_DC_DCN) 307 308 bool clamp_min_dcfclk; 308 309 #endif