aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/link/link_detection.c
diff options
context:
space:
mode:
authorWenjing Liu <[email protected]>2023-02-01 16:07:35 -0500
committerAlex Deucher <[email protected]>2023-02-14 16:06:28 -0500
commit5ca38a18b5a47017d0e9a016661dad12322767fa (patch)
tree858aa9202442aefdffa9ddd64b6559c4f797c625 /drivers/gpu/drm/amd/display/dc/link/link_detection.c
parent9b0f51e8449f6f76170fda6a8dd9c417a43ce270 (diff)
drm/amd/display: move public dc link function implementation to dc_link_exports
[why] Link is a subcomponent in dc. DM should be aware of dc link structure as one of the abstracted objects maintained by dc. However it should have no idea of the existence of a link component in dc dedicated to maintain the states of dc link structure. As such we are moving link interfaces out of dc_link.h and directly added to dc.h. We are grandually fading out the explicit inclusion of dc_link header and eventually delete it. On dc side, since link is a subcomponent behind dc interfaces, it is not a good idea to implement dc interfaces in each individual subcomponent of link which is already a subcomponent of dc. So we are decoupling it by implementing a dc_link_exports in dc. This file will be a thin translation layer that breaks the dependency so link is able to make interface changes without breaking DM. Reviewed-by: Jun Lei <[email protected]> Acked-by: Qingqing Zhuo <[email protected]> Signed-off-by: Wenjing Liu <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/link/link_detection.c')
-rw-r--r--drivers/gpu/drm/amd/display/dc/link/link_detection.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/link/link_detection.c b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
index 29cdb61d66c8..38216c789d77 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_detection.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
@@ -714,7 +714,7 @@ static bool discover_dp_mst_topology(struct dc_link *link, enum dc_detect_reason
return link->type == dc_connection_mst_branch;
}
-static bool reset_cur_dp_mst_topology(struct dc_link *link)
+bool link_reset_cur_dp_mst_topology(struct dc_link *link)
{
DC_LOGGER_INIT(link->ctx->logger);
@@ -725,10 +725,6 @@ static bool reset_cur_dp_mst_topology(struct dc_link *link)
return dm_helpers_dp_mst_stop_top_mgr(link->ctx, link);
}
-bool dc_link_reset_cur_dp_mst_topology(struct dc_link *link)
-{
- return reset_cur_dp_mst_topology(link);
-}
static bool should_prepare_phy_clocks_for_link_verification(const struct dc *dc,
enum dc_detect_reason reason)
{
@@ -1199,7 +1195,7 @@ static bool detect_link_and_local_sink(struct dc_link *link,
* Does not detect downstream devices, such as MST sinks
* or display connected through active dongles
*/
-bool dc_link_detect_connection_type(struct dc_link *link, enum dc_connection_type *type)
+bool link_detect_connection_type(struct dc_link *link, enum dc_connection_type *type)
{
uint32_t is_hpd_high = 0;
@@ -1242,7 +1238,7 @@ hpd_gpio_failure:
return false;
}
-bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
+bool link_detect(struct dc_link *link, enum dc_detect_reason reason)
{
bool is_local_sink_detect_success;
bool is_delegated_to_mst_top_mgr = false;
@@ -1261,18 +1257,18 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
if (is_local_sink_detect_success &&
pre_link_type == dc_connection_mst_branch &&
link->type != dc_connection_mst_branch)
- is_delegated_to_mst_top_mgr = reset_cur_dp_mst_topology(link);
+ is_delegated_to_mst_top_mgr = link_reset_cur_dp_mst_topology(link);
return is_local_sink_detect_success && !is_delegated_to_mst_top_mgr;
}
-void dc_link_clear_dprx_states(struct dc_link *link)
+void link_clear_dprx_states(struct dc_link *link)
{
memset(&link->dprx_states, 0, sizeof(link->dprx_states));
}
#if defined(CONFIG_DRM_AMD_DC_HDCP)
-bool dc_link_is_hdcp14(struct dc_link *link, enum signal_type signal)
+bool link_is_hdcp14(struct dc_link *link, enum signal_type signal)
{
bool ret = false;
@@ -1296,7 +1292,7 @@ bool dc_link_is_hdcp14(struct dc_link *link, enum signal_type signal)
return ret;
}
-bool dc_link_is_hdcp22(struct dc_link *link, enum signal_type signal)
+bool link_is_hdcp22(struct dc_link *link, enum signal_type signal)
{
bool ret = false;
@@ -1320,7 +1316,7 @@ bool dc_link_is_hdcp22(struct dc_link *link, enum signal_type signal)
}
#endif // CONFIG_DRM_AMD_DC_HDCP
-const struct dc_link_status *dc_link_get_status(const struct dc_link *link)
+const struct dc_link_status *link_get_status(const struct dc_link *link)
{
return &link->link_status;
}