1d462fcf5SBhawanpreet Lakha /*
2d462fcf5SBhawanpreet Lakha  * Copyright 2018 Advanced Micro Devices, Inc.
3d462fcf5SBhawanpreet Lakha  *
4d462fcf5SBhawanpreet Lakha  * Permission is hereby granted, free of charge, to any person obtaining a
5d462fcf5SBhawanpreet Lakha  * copy of this software and associated documentation files (the "Software"),
6d462fcf5SBhawanpreet Lakha  * to deal in the Software without restriction, including without limitation
7d462fcf5SBhawanpreet Lakha  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8d462fcf5SBhawanpreet Lakha  * and/or sell copies of the Software, and to permit persons to whom the
9d462fcf5SBhawanpreet Lakha  * Software is furnished to do so, subject to the following conditions:
10d462fcf5SBhawanpreet Lakha  *
11d462fcf5SBhawanpreet Lakha  * The above copyright notice and this permission notice shall be included in
12d462fcf5SBhawanpreet Lakha  * all copies or substantial portions of the Software.
13d462fcf5SBhawanpreet Lakha  *
14d462fcf5SBhawanpreet Lakha  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15d462fcf5SBhawanpreet Lakha  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16d462fcf5SBhawanpreet Lakha  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17d462fcf5SBhawanpreet Lakha  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18d462fcf5SBhawanpreet Lakha  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19d462fcf5SBhawanpreet Lakha  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20d462fcf5SBhawanpreet Lakha  * OTHER DEALINGS IN THE SOFTWARE.
21d462fcf5SBhawanpreet Lakha  *
22d462fcf5SBhawanpreet Lakha  * Authors: AMD
23d462fcf5SBhawanpreet Lakha  *
24d462fcf5SBhawanpreet Lakha  */
25d462fcf5SBhawanpreet Lakha 
26d462fcf5SBhawanpreet Lakha #ifndef DM_CP_PSP_IF__H
27d462fcf5SBhawanpreet Lakha #define DM_CP_PSP_IF__H
28d462fcf5SBhawanpreet Lakha 
29d462fcf5SBhawanpreet Lakha struct dc_link;
30d462fcf5SBhawanpreet Lakha 
31d462fcf5SBhawanpreet Lakha struct cp_psp_stream_config {
32d462fcf5SBhawanpreet Lakha 	uint8_t otg_inst;
33aac6d439SWenjing Liu 	uint8_t dig_be;
34aac6d439SWenjing Liu 	uint8_t dig_fe;
35bf62221eSNicholas Kazlauskas 	uint8_t link_enc_idx;
36bf62221eSNicholas Kazlauskas 	uint8_t stream_enc_idx;
37ffd89aa9SAhmad Othman 	uint8_t dio_output_idx;
38*580013b2SWenjing Liu 	uint8_t phy_idx;
39aac6d439SWenjing Liu 	uint8_t assr_enabled;
40aac6d439SWenjing Liu 	uint8_t mst_enabled;
41f01ee019SFangzhi Zuo 	uint8_t dp2_enabled;
42*580013b2SWenjing Liu 	uint8_t usb4_enabled;
43d462fcf5SBhawanpreet Lakha 	void *dm_stream_ctx;
44d462fcf5SBhawanpreet Lakha 	bool dpms_off;
45d462fcf5SBhawanpreet Lakha };
46d462fcf5SBhawanpreet Lakha 
47d462fcf5SBhawanpreet Lakha struct cp_psp_funcs {
48ef9de187SBhawanpreet Lakha 	bool (*enable_assr)(void *handle, struct dc_link *link);
49d462fcf5SBhawanpreet Lakha 	void (*update_stream_config)(void *handle, struct cp_psp_stream_config *config);
50d462fcf5SBhawanpreet Lakha };
51d462fcf5SBhawanpreet Lakha 
52d462fcf5SBhawanpreet Lakha struct cp_psp {
53d462fcf5SBhawanpreet Lakha 	void *handle;
54d462fcf5SBhawanpreet Lakha 	struct cp_psp_funcs funcs;
55d462fcf5SBhawanpreet Lakha };
56d462fcf5SBhawanpreet Lakha 
57d462fcf5SBhawanpreet Lakha 
58d462fcf5SBhawanpreet Lakha #endif /* DM_CP_PSP_IF__H */
59