Revert "drm/amd/display: move edp sink present detection to hw init"
Subsystems (3)
PATCH 1/1 Revert "drm/amd/display: move edp sink present detection to hw init"
This reverts commit de6571ecbb88643fa4bb4172e65c12795a2f3124.
Patch causes regression in resume time.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 40 +++++++++++------------- drivers/gpu/drm/amd/display/dc/dc_link.h | 2 -- 2 files changed, 18 insertions(+), 24 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +18 -22
@@ -205,9 +205,27 @@ static bool create_links( link =link_create (&link_init_params);if (link) { +bool should_destory_link = false; + +if (link->connector_signal ==SIGNAL_TYPE_EDP ) { +if (dc->config.edp_not_connected) { +if (!IS_DIAG_DC (dc->ctx->dce_environment)) + should_destory_link = true; + }else { +enum dc_connection_type type; +dc_link_detect_sink (link, &type); +if (type == dc_connection_none) + should_destory_link = true; + } + } + +if (dc->config.force_enum_edp || !should_destory_link) { dc->links[dc->link_count] = link; link->dc = dc; ++dc->link_count; + }else { +link_destroy (&link); + } } }
@@ -998,30 +1016,8 @@ struct dc *dc_create(const struct dc_init_data *init_params)return NULL ; } -static void detect_edp_presence (struct dc *dc) -{ -struct dc_link *edp_link =get_edp_link (dc); -bool edp_sink_present = true; - -if (!edp_link) -return ; - -if (dc->config.edp_not_connected) { - edp_sink_present = false; - }else { -enum dc_connection_type type; -dc_link_detect_sink (edp_link, &type); -if (type == dc_connection_none) - edp_sink_present = false; - } - - edp_link->edp_sink_present = edp_sink_present; -} -void dc_hardware_init (struct dc *dc) { - -detect_edp_presence (dc);if (dc->ctx->dce_environment !=DCE_ENV_VIRTUAL_HW ) dc->hwss.init_hw (dc); }
drivers/gpu/drm/amd/display/dc/dc_link.h +0 -2
@@ -103,8 +103,6 @@ struct dc_link {bool lttpr_non_transparent_mode;bool is_internal_display; -bool edp_sink_present; -/* caps is the same as reported_link_cap. link_traing use * reported_link_cap. Will clean up. TODO */
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 3 lines · Anson Jacob
This reverts commit
de6571ecbb88643fa4bb4172e65c12795a2f3124.Patch causes regression in resume time.
Shouldn't affect any system that has an eDP connector on the board since it's expected to be present in end user configuration.
If we want to replicate the same behavior we had before for eDP connector + eDP disconnected then we'd want to make sure we're skipping the registration for the connector in DM.
Regards,
Nicholas Kazlauskas
Quoted 74 lines
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 40 +++++++++++------------- drivers/gpu/drm/amd/display/dc/dc_link.h | 2 -- 2 files changed, 18 insertions(+), 24 deletions(-)drivers/gpu/drm/amd/display/dc/core/dc.c +18
-22@@ -205,9 +205,27 @@ static bool create_links( link =link_create (&link_init_params);if (link) { +bool should_destory_link = false; + +if (link->connector_signal ==SIGNAL_TYPE_EDP ) { +if (dc->config.edp_not_connected) { +if (!IS_DIAG_DC (dc->ctx->dce_environment)) + should_destory_link = true; + }else { +enum dc_connection_type type; +dc_link_detect_sink (link, &type); +if (type == dc_connection_none) + should_destory_link = true; + } + } + +if (dc->config.force_enum_edp || !should_destory_link) { dc->links[dc->link_count] = link; link->dc = dc; ++dc->link_count; + }else { +link_destroy (&link); + } } }@@ -998,30 +1016,8 @@ struct dc *dc_create(const struct dc_init_data *init_params)return NULL ; } -static void detect_edp_presence (struct dc *dc) -{ -struct dc_link *edp_link =get_edp_link (dc); -bool edp_sink_present = true; - -if (!edp_link) -return ; - -if (dc->config.edp_not_connected) { - edp_sink_present = false; - }else { -enum dc_connection_type type; -dc_link_detect_sink (edp_link, &type); -if (type == dc_connection_none) - edp_sink_present = false; - } - - edp_link->edp_sink_present = edp_sink_present; -} -void dc_hardware_init (struct dc *dc) { - -detect_edp_presence (dc);if (dc->ctx->dce_environment !=DCE_ENV_VIRTUAL_HW ) dc->hwss.init_hw (dc); }drivers/gpu/drm/amd/display/dc/dc_link.h +0
-0
drivers/gpu/drm/amd/display/dc/dc_link.h struct dc_link { · line 108
Quoted 8 lines
drivers/gpu/drm/amd/display/dc/dc_link.h +0
-2@@ -103,8 +103,6 @@ struct dc_link {bool lttpr_non_transparent_mode;bool is_internal_display; -bool edp_sink_present; -/* caps is the same as reported_link_cap. link_traing use * reported_link_cap. Will clean up. TODO */
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deucher, Alexander
maintainer[AMD Official Use Only - Internal Distribution Only]
Patch is missing your signed-off-by. Please also give some details as to the regression (blank screen, segfault, etc.) and affected platforms.
Alex
________________________________
From: amd-gfx <[email protected]> on behalf of Anson Jacob <[email protected]>
Sent: Monday, February 8, 2021 2:25 PM
To: [email protected] <[email protected]>
Cc: Brol, Eryk <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Wentland, Harry <[email protected]>; Zhuo, Qingqing <[email protected]>; Siqueira, Rodrigo <[email protected]>; Jacob, Anson <[email protected]>; Pillai, Aurabindo <[email protected]>; Lakha, Bhawanpreet <[email protected]>; R, Bindu <[email protected]>
Subject: [PATCH] Revert "drm/amd/display: move edp sink present detection to hw init"
This reverts commit de6571ecbb88643fa4bb4172e65c12795a2f3124.
Patch causes regression in resume time.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 40 +++++++++++------------- drivers/gpu/drm/amd/display/dc/dc_link.h | 2 -- 2 files changed, 18 insertions(+), 24 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +18 -22
@@ -205,9 +205,27 @@ static bool create_links( link =link_create (&link_init_params);if (link) { +bool should_destory_link = false; + +if (link->connector_signal ==SIGNAL_TYPE_EDP ) { +if (dc->config.edp_not_connected) { +if (!IS_DIAG_DC (dc->ctx->dce_environment)) + should_destory_link = true; + }else { +enum dc_connection_type type; +dc_link_detect_sink (link, &type); +if (type == dc_connection_none) + should_destory_link = true; + } + } + +if (dc->config.force_enum_edp || !should_destory_link) { dc->links[dc->link_count] = link; link->dc = dc; ++dc->link_count; + }else { +link_destroy (&link); + } } }
@@ -998,30 +1016,8 @@ struct dc *dc_create(const struct dc_init_data *init_params)return NULL ; } -static void detect_edp_presence (struct dc *dc) -{ -struct dc_link *edp_link =get_edp_link (dc); -bool edp_sink_present = true; - -if (!edp_link) -return ; - -if (dc->config.edp_not_connected) { - edp_sink_present = false; - }else { -enum dc_connection_type type; -dc_link_detect_sink (edp_link, &type); -if (type == dc_connection_none) - edp_sink_present = false; - } - - edp_link->edp_sink_present = edp_sink_present; -} -void dc_hardware_init (struct dc *dc) { - -detect_edp_presence (dc);if (dc->ctx->dce_environment !=DCE_ENV_VIRTUAL_HW ) dc->hwss.init_hw (dc); }
drivers/gpu/drm/amd/display/dc/dc_link.h +0 -2
@@ -103,8 +103,6 @@ struct dc_link {bool lttpr_non_transparent_mode;bool is_internal_display; -bool edp_sink_present; -/* caps is the same as reported_link_cap. link_traing use * reported_link_cap. Will clean up. TODO */
--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
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
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Public Use]
Hi Alex,
Thanks for catching it.
But, please discard this patch as it was send out incorrectly.
-- Anson
________________________________
From: Deucher, Alexander <[email protected]>
Sent: Monday, February 8, 2021 2:58 PM
To: Jacob, Anson <[email protected]>; [email protected] <[email protected]>
Cc: Brol, Eryk <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Wentland, Harry <[email protected]>; Zhuo, Qingqing <[email protected]>; Siqueira, Rodrigo <[email protected]>; Pillai, Aurabindo <[email protected]>; Lakha, Bhawanpreet <[email protected]>; R, Bindu <[email protected]>
Subject: Re: [PATCH] Revert "drm/amd/display: move edp sink present detection to hw init"
[AMD Official Use Only - Internal Distribution Only]
Patch is missing your signed-off-by. Please also give some details as to the regression (blank screen, segfault, etc.) and affected platforms.
Alex
________________________________
From: amd-gfx <[email protected]> on behalf of Anson Jacob <[email protected]>
Sent: Monday, February 8, 2021 2:25 PM
To: [email protected] <[email protected]>
Cc: Brol, Eryk <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Wentland, Harry <[email protected]>; Zhuo, Qingqing <[email protected]>; Siqueira, Rodrigo <[email protected]>; Jacob, Anson <[email protected]>; Pillai, Aurabindo <[email protected]>; Lakha, Bhawanpreet <[email protected]>; R, Bindu <[email protected]>
Subject: [PATCH] Revert "drm/amd/display: move edp sink present detection to hw init"
This reverts commit de6571ecbb88643fa4bb4172e65c12795a2f3124.
Patch causes regression in resume time.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 40 +++++++++++------------- drivers/gpu/drm/amd/display/dc/dc_link.h | 2 -- 2 files changed, 18 insertions(+), 24 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +18 -22
@@ -205,9 +205,27 @@ static bool create_links( link =link_create (&link_init_params);if (link) { +bool should_destory_link = false; + +if (link->connector_signal ==SIGNAL_TYPE_EDP ) { +if (dc->config.edp_not_connected) { +if (!IS_DIAG_DC (dc->ctx->dce_environment)) + should_destory_link = true; + }else { +enum dc_connection_type type; +dc_link_detect_sink (link, &type); +if (type == dc_connection_none) + should_destory_link = true; + } + } + +if (dc->config.force_enum_edp || !should_destory_link) { dc->links[dc->link_count] = link; link->dc = dc; ++dc->link_count; + }else { +link_destroy (&link); + } } }
@@ -998,30 +1016,8 @@ struct dc *dc_create(const struct dc_init_data *init_params)return NULL ; } -static void detect_edp_presence (struct dc *dc) -{ -struct dc_link *edp_link =get_edp_link (dc); -bool edp_sink_present = true; - -if (!edp_link) -return ; - -if (dc->config.edp_not_connected) { - edp_sink_present = false; - }else { -enum dc_connection_type type; -dc_link_detect_sink (edp_link, &type); -if (type == dc_connection_none) - edp_sink_present = false; - } - - edp_link->edp_sink_present = edp_sink_present; -} -void dc_hardware_init (struct dc *dc) { - -detect_edp_presence (dc);if (dc->ctx->dce_environment !=DCE_ENV_VIRTUAL_HW ) dc->hwss.init_hw (dc); }
drivers/gpu/drm/amd/display/dc/dc_link.h +0 -2
@@ -103,8 +103,6 @@ struct dc_link {bool lttpr_non_transparent_mode;bool is_internal_display; -bool edp_sink_present; -/* caps is the same as reported_link_cap. link_traing use * reported_link_cap. Will clean up. TODO */
--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
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
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx