xref: /openbsd-src/sys/dev/pci/drm/amd/display/dc/link/link_detection.h (revision f005ef32267c16bdb134f0e9fa4477dbe07c263a)
1*f005ef32Sjsg /*
2*f005ef32Sjsg  * Copyright 2023 Advanced Micro Devices, Inc.
3*f005ef32Sjsg  *
4*f005ef32Sjsg  * Permission is hereby granted, free of charge, to any person obtaining a
5*f005ef32Sjsg  * copy of this software and associated documentation files (the "Software"),
6*f005ef32Sjsg  * to deal in the Software without restriction, including without limitation
7*f005ef32Sjsg  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8*f005ef32Sjsg  * and/or sell copies of the Software, and to permit persons to whom the
9*f005ef32Sjsg  * Software is furnished to do so, subject to the following conditions:
10*f005ef32Sjsg  *
11*f005ef32Sjsg  * The above copyright notice and this permission notice shall be included in
12*f005ef32Sjsg  * all copies or substantial portions of the Software.
13*f005ef32Sjsg  *
14*f005ef32Sjsg  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15*f005ef32Sjsg  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16*f005ef32Sjsg  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17*f005ef32Sjsg  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18*f005ef32Sjsg  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19*f005ef32Sjsg  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20*f005ef32Sjsg  * OTHER DEALINGS IN THE SOFTWARE.
21*f005ef32Sjsg  *
22*f005ef32Sjsg  * Authors: AMD
23*f005ef32Sjsg  *
24*f005ef32Sjsg  */
25*f005ef32Sjsg 
26*f005ef32Sjsg #ifndef __DC_LINK_DETECTION_H__
27*f005ef32Sjsg #define __DC_LINK_DETECTION_H__
28*f005ef32Sjsg #include "link.h"
29*f005ef32Sjsg bool link_detect(struct dc_link *link, enum dc_detect_reason reason);
30*f005ef32Sjsg bool link_detect_connection_type(struct dc_link *link,
31*f005ef32Sjsg 		enum dc_connection_type *type);
32*f005ef32Sjsg struct dc_sink *link_add_remote_sink(
33*f005ef32Sjsg 		struct dc_link *link,
34*f005ef32Sjsg 		const uint8_t *edid,
35*f005ef32Sjsg 		int len,
36*f005ef32Sjsg 		struct dc_sink_init_data *init_data);
37*f005ef32Sjsg void link_remove_remote_sink(struct dc_link *link, struct dc_sink *sink);
38*f005ef32Sjsg bool link_reset_cur_dp_mst_topology(struct dc_link *link);
39*f005ef32Sjsg const struct dc_link_status *link_get_status(const struct dc_link *link);
40*f005ef32Sjsg bool link_is_hdcp14(struct dc_link *link, enum amd_signal_type signal);
41*f005ef32Sjsg bool link_is_hdcp22(struct dc_link *link, enum amd_signal_type signal);
42*f005ef32Sjsg void link_clear_dprx_states(struct dc_link *link);
43*f005ef32Sjsg #endif /* __DC_LINK_DETECTION_H__ */
44