Commit 5ab991ba authored by Yi-Ling Chen's avatar Yi-Ling Chen Committed by Alex Deucher

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: default avatarYi-Ling Chen <Yi-Ling.Chen2@amd.com>
Reviewed-by: default avatarAric Cyr <Aric.Cyr@amd.com>
Acked-by: default avatarAnson Jacob <Anson.Jacob@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2631ac1a
...@@ -904,9 +904,10 @@ static bool dc_link_detect_helper(struct dc_link *link, ...@@ -904,9 +904,10 @@ static bool dc_link_detect_helper(struct dc_link *link,
if (dc_is_virtual_signal(link->connector_signal)) if (dc_is_virtual_signal(link->connector_signal))
return false; return false;
if ((link->connector_signal == SIGNAL_TYPE_LVDS || if (((link->connector_signal == SIGNAL_TYPE_LVDS ||
link->connector_signal == SIGNAL_TYPE_EDP) && link->connector_signal == SIGNAL_TYPE_EDP) &&
link->local_sink) { (!link->dc->config.allow_edp_hotplug_detection)) &&
link->local_sink) {
// need to re-write OUI and brightness in resume case // need to re-write OUI and brightness in resume case
if (link->connector_signal == SIGNAL_TYPE_EDP) { if (link->connector_signal == SIGNAL_TYPE_EDP) {
dpcd_set_source_specific_data(link); dpcd_set_source_specific_data(link);
...@@ -1501,7 +1502,8 @@ static bool dc_link_construct(struct dc_link *link, ...@@ -1501,7 +1502,8 @@ static bool dc_link_construct(struct dc_link *link,
link->connector_signal = SIGNAL_TYPE_EDP; link->connector_signal = SIGNAL_TYPE_EDP;
if (link->hpd_gpio) { if (link->hpd_gpio) {
link->irq_source_hpd = DC_IRQ_SOURCE_INVALID; if (!link->dc->config.allow_edp_hotplug_detection)
link->irq_source_hpd = DC_IRQ_SOURCE_INVALID;
link->irq_source_hpd_rx = link->irq_source_hpd_rx =
dal_irq_get_rx_source(link->hpd_gpio); dal_irq_get_rx_source(link->hpd_gpio);
} }
......
...@@ -303,6 +303,7 @@ struct dc_config { ...@@ -303,6 +303,7 @@ struct dc_config {
bool multi_mon_pp_mclk_switch; bool multi_mon_pp_mclk_switch;
bool disable_dmcu; bool disable_dmcu;
bool enable_4to1MPC; bool enable_4to1MPC;
bool allow_edp_hotplug_detection;
#if defined(CONFIG_DRM_AMD_DC_DCN) #if defined(CONFIG_DRM_AMD_DC_DCN)
bool clamp_min_dcfclk; bool clamp_min_dcfclk;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment