<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:11pt;color:#0078D7;margin:5pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Patch is missing your signed-off-by. Please also give some details as to the regression (blank screen, segfault, etc.) and affected platforms.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Alex</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Anson Jacob <Anson.Jacob@amd.com><br>
<b>Sent:</b> Monday, February 8, 2021 2:25 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Brol, Eryk <Eryk.Brol@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; Zhuo, Qingqing <Qingqing.Zhuo@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Jacob, Anson <Anson.Jacob@amd.com>; Pillai, Aurabindo
<Aurabindo.Pillai@amd.com>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; R, Bindu <Bindu.R@amd.com><br>
<b>Subject:</b> [PATCH] Revert "drm/amd/display: move edp sink present detection to hw init"</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">This reverts commit de6571ecbb88643fa4bb4172e65c12795a2f3124.<br>
<br>
Patch causes regression in resume time.<br>
---<br>
drivers/gpu/drm/amd/display/dc/core/dc.c | 40 +++++++++++-------------<br>
drivers/gpu/drm/amd/display/dc/dc_link.h | 2 --<br>
2 files changed, 18 insertions(+), 24 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c<br>
index c9aede2f783d..8d5378f53243 100644<br>
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c<br>
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c<br>
@@ -205,9 +205,27 @@ static bool create_links(<br>
link = link_create(&link_init_params);<br>
<br>
if (link) {<br>
+ bool should_destory_link = false;<br>
+<br>
+ if (link->connector_signal == SIGNAL_TYPE_EDP) {<br>
+ if (dc->config.edp_not_connected) {<br>
+ if (!IS_DIAG_DC(dc->ctx->dce_environment))<br>
+ should_destory_link = true;<br>
+ } else {<br>
+ enum dc_connection_type type;<br>
+ dc_link_detect_sink(link, &type);<br>
+ if (type == dc_connection_none)<br>
+ should_destory_link = true;<br>
+ }<br>
+ }<br>
+<br>
+ if (dc->config.force_enum_edp || !should_destory_link) {<br>
dc->links[dc->link_count] = link;<br>
link->dc = dc;<br>
++dc->link_count;<br>
+ } else {<br>
+ link_destroy(&link);<br>
+ }<br>
}<br>
}<br>
<br>
@@ -998,30 +1016,8 @@ struct dc *dc_create(const struct dc_init_data *init_params)<br>
return NULL;<br>
}<br>
<br>
-static void detect_edp_presence(struct dc *dc)<br>
-{<br>
- struct dc_link *edp_link = get_edp_link(dc);<br>
- bool edp_sink_present = true;<br>
-<br>
- if (!edp_link)<br>
- return;<br>
-<br>
- if (dc->config.edp_not_connected) {<br>
- edp_sink_present = false;<br>
- } else {<br>
- enum dc_connection_type type;<br>
- dc_link_detect_sink(edp_link, &type);<br>
- if (type == dc_connection_none)<br>
- edp_sink_present = false;<br>
- }<br>
-<br>
- edp_link->edp_sink_present = edp_sink_present;<br>
-}<br>
-<br>
void dc_hardware_init(struct dc *dc)<br>
{<br>
-<br>
- detect_edp_presence(dc);<br>
if (dc->ctx->dce_environment != DCE_ENV_VIRTUAL_HW)<br>
dc->hwss.init_hw(dc);<br>
}<br>
diff --git a/drivers/gpu/drm/amd/display/dc/dc_link.h b/drivers/gpu/drm/amd/display/dc/dc_link.h<br>
index e189f16bc026..d5d8f0ad9233 100644<br>
--- a/drivers/gpu/drm/amd/display/dc/dc_link.h<br>
+++ b/drivers/gpu/drm/amd/display/dc/dc_link.h<br>
@@ -103,8 +103,6 @@ struct dc_link {<br>
bool lttpr_non_transparent_mode;<br>
bool is_internal_display;<br>
<br>
- bool edp_sink_present;<br>
-<br>
/* caps is the same as reported_link_cap. link_traing use<br>
* reported_link_cap. Will clean up. TODO<br>
*/<br>
-- <br>
2.25.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Calexander.deucher%40amd.com%7C330474ac8a4246a1246e08d8cc676331%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637484091731093304%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=V%2FXbCLY8Vr%2BwEFQ4xE07QQBRNwXE9xKQY4Wnv%2B5PLCI%3D&reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Calexander.deucher%40amd.com%7C330474ac8a4246a1246e08d8cc676331%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637484091731093304%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=V%2FXbCLY8Vr%2BwEFQ4xE07QQBRNwXE9xKQY4Wnv%2B5PLCI%3D&reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>