summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/inc
diff options
context:
space:
mode:
authorWenjing Liu <wenjing.liu@amd.com>2022-01-28 17:04:06 +0300
committerAlex Deucher <alexander.deucher@amd.com>2022-02-03 02:26:32 +0300
commit2750caffa7a9ae82824d7ac3ab0fee65181c4126 (patch)
tree79326568052206d5e18da48e3dcaef6031db3927 /drivers/gpu/drm/amd/display/dc/inc
parentdfabe59797799bb500897ab4064f8a76aae4026a (diff)
downloadlinux-2750caffa7a9ae82824d7ac3ab0fee65181c4126.tar.xz
drm/amd/display: move get_link_hwss to dc_resource
[why] Isolate the way to obtain link_hwss from the actual implemenation of link_hwss. So the caller can call link_hwss without knowing the implementation detail of link_hwss. Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Jun Lei <Jun.Lei@amd.com> Acked-by: Stylon Wang <stylon.wang@amd.com> Signed-off-by: Wenjing Liu <wenjing.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/inc')
-rw-r--r--drivers/gpu/drm/amd/display/dc/inc/link_hwss.h17
-rw-r--r--drivers/gpu/drm/amd/display/dc/inc/resource.h3
2 files changed, 19 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/inc/link_hwss.h b/drivers/gpu/drm/amd/display/dc/inc/link_hwss.h
index 43c6c0e0ddd9..fd4bfa22eda8 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/link_hwss.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/link_hwss.h
@@ -75,6 +75,21 @@ struct link_hwss {
void (*reset_stream_encoder)(struct pipe_ctx *pipe_ctx);
};
-const struct link_hwss *get_link_hwss(const struct dc_link *link, const struct link_resource *link_res);
+
+/*********************** below goes to virtual_link_hwss **********************/
+const struct link_hwss *get_virtual_link_hwss(void);
+/*********************** below goes to dpia_link_hwss *************************/
+bool can_use_dpia_link_hwss(const struct dc_link *link,
+ const struct link_resource *link_res);
+const struct link_hwss *get_dpia_link_hwss(void);
+/*********************** below goes to hpo_dp_link_hwss ***********************/
+bool can_use_hpo_dp_link_hwss(const struct dc_link *link,
+ const struct link_resource *link_res);
+const struct link_hwss *get_hpo_dp_link_hwss(void);
+/************************* below goes to dio_link_hwss ************************/
+bool can_use_dio_link_hwss(const struct dc_link *link,
+ const struct link_resource *link_res);
+const struct link_hwss *get_dio_link_hwss(void);
#endif /* __DC_LINK_HWSS_H__ */
+
diff --git a/drivers/gpu/drm/amd/display/dc/inc/resource.h b/drivers/gpu/drm/amd/display/dc/inc/resource.h
index a02887f644b0..63ed28cbf873 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/resource.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/resource.h
@@ -213,4 +213,7 @@ void check_syncd_pipes_for_disabled_master_pipe(struct dc *dc,
uint8_t disabled_master_pipe_idx);
uint8_t resource_transmitter_to_phy_idx(const struct dc *dc, enum transmitter transmitter);
+const struct link_hwss *get_link_hwss(const struct dc_link *link,
+ const struct link_resource *link_res);
+
#endif /* DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_RESOURCE_H_ */