• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2012-15 Advanced Micro Devices, Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20  * OTHER DEALINGS IN THE SOFTWARE.
21  *
22  * Authors: AMD
23  *
24  */
25 #ifndef __DAL_DDC_SERVICE_TYPES_H__
26 #define __DAL_DDC_SERVICE_TYPES_H__
27 
28 /* 0010FA dongles (ST Micro) external converter chip id */
29 #define DP_BRANCH_DEVICE_ID_0010FA 0x0010FA
30 /* 0022B9 external converter chip id */
31 #define DP_BRANCH_DEVICE_ID_0022B9 0x0022B9
32 #define DP_BRANCH_DEVICE_ID_00001A 0x00001A
33 #define DP_BRANCH_DEVICE_ID_0080E1 0x0080e1
34 #define DP_BRANCH_DEVICE_ID_90CC24 0x90CC24
35 #define DP_BRANCH_DEVICE_ID_00E04C 0x00E04C
36 #define DP_BRANCH_DEVICE_ID_006037 0x006037
37 
38 enum ddc_result {
39 	DDC_RESULT_UNKNOWN = 0,
40 	DDC_RESULT_SUCESSFULL,
41 	DDC_RESULT_FAILED_CHANNEL_BUSY,
42 	DDC_RESULT_FAILED_TIMEOUT,
43 	DDC_RESULT_FAILED_PROTOCOL_ERROR,
44 	DDC_RESULT_FAILED_NACK,
45 	DDC_RESULT_FAILED_INCOMPLETE,
46 	DDC_RESULT_FAILED_OPERATION,
47 	DDC_RESULT_FAILED_INVALID_OPERATION,
48 	DDC_RESULT_FAILED_BUFFER_OVERFLOW,
49 	DDC_RESULT_FAILED_HPD_DISCON
50 };
51 
52 enum ddc_service_type {
53 	DDC_SERVICE_TYPE_CONNECTOR,
54 	DDC_SERVICE_TYPE_DISPLAY_PORT_MST,
55 };
56 
57 /**
58  * display sink capability
59  */
60 struct display_sink_capability {
61 	/* dongle type (DP converter, CV smart dongle) */
62 	enum display_dongle_type dongle_type;
63 
64 	/**********************************************************
65 	 capabilities going INTO SINK DEVICE (stream capabilities)
66 	 **********************************************************/
67 	/* Dongle's downstream count. */
68 	uint32_t downstrm_sink_count;
69 	/* Is dongle's downstream count info field (downstrm_sink_count)
70 	 * valid. */
71 	bool downstrm_sink_count_valid;
72 
73 	/* Maximum additional audio delay in microsecond (us) */
74 	uint32_t additional_audio_delay;
75 	/* Audio latency value in microsecond (us) */
76 	uint32_t audio_latency;
77 	/* Interlace video latency value in microsecond (us) */
78 	uint32_t video_latency_interlace;
79 	/* Progressive video latency value in microsecond (us) */
80 	uint32_t video_latency_progressive;
81 	/* Dongle caps: Maximum pixel clock supported over dongle for HDMI */
82 	uint32_t max_hdmi_pixel_clock;
83 	/* Dongle caps: Maximum deep color supported over dongle for HDMI */
84 	enum dc_color_depth max_hdmi_deep_color;
85 
86 	/************************************************************
87 	 capabilities going OUT OF SOURCE DEVICE (link capabilities)
88 	 ************************************************************/
89 	/* support for Spread Spectrum(SS) */
90 	bool ss_supported;
91 	/* DP link settings (laneCount, linkRate, Spread) */
92 	uint32_t dp_link_lane_count;
93 	uint32_t dp_link_rate;
94 	uint32_t dp_link_spead;
95 
96 	/* If dongle_type == DISPLAY_DONGLE_DP_HDMI_CONVERTER,
97 	indicates 'Frame Sequential-to-lllFrame Pack' conversion capability.*/
98 	bool is_dp_hdmi_s3d_converter;
99 	/* to check if we have queried the display capability
100 	 * for eDP panel already. */
101 	bool is_edp_sink_cap_valid;
102 
103 	enum ddc_transaction_type transaction_type;
104 	enum signal_type signal;
105 };
106 
107 struct av_sync_data {
108 	uint8_t av_granularity;/* DPCD 00023h */
109 	uint8_t aud_dec_lat1;/* DPCD 00024h */
110 	uint8_t aud_dec_lat2;/* DPCD 00025h */
111 	uint8_t aud_pp_lat1;/* DPCD 00026h */
112 	uint8_t aud_pp_lat2;/* DPCD 00027h */
113 	uint8_t vid_inter_lat;/* DPCD 00028h */
114 	uint8_t vid_prog_lat;/* DPCD 00029h */
115 	uint8_t aud_del_ins1;/* DPCD 0002Bh */
116 	uint8_t aud_del_ins2;/* DPCD 0002Ch */
117 	uint8_t aud_del_ins3;/* DPCD 0002Dh */
118 };
119 
120 #endif /* __DAL_DDC_SERVICE_TYPES_H__ */
121