21 #include <linux/types.h>
23 #define MDDI_CMD 0x0000
24 #define MDDI_VERSION 0x0004
25 #define MDDI_PRI_PTR 0x0008
26 #define MDDI_SEC_PTR 0x000c
27 #define MDDI_BPS 0x0010
28 #define MDDI_SPM 0x0014
29 #define MDDI_INT 0x0018
30 #define MDDI_INTEN 0x001c
31 #define MDDI_REV_PTR 0x0020
32 #define MDDI_REV_SIZE 0x0024
33 #define MDDI_STAT 0x0028
34 #define MDDI_REV_RATE_DIV 0x002c
35 #define MDDI_REV_CRC_ERR 0x0030
36 #define MDDI_TA1_LEN 0x0034
37 #define MDDI_TA2_LEN 0x0038
38 #define MDDI_TEST_BUS 0x003c
39 #define MDDI_TEST 0x0040
40 #define MDDI_REV_PKT_CNT 0x0044
41 #define MDDI_DRIVE_HI 0x0048
42 #define MDDI_DRIVE_LO 0x004c
43 #define MDDI_DISP_WAKE 0x0050
44 #define MDDI_REV_ENCAP_SZ 0x0054
45 #define MDDI_RTD_VAL 0x0058
46 #define MDDI_PAD_CTL 0x0068
47 #define MDDI_DRIVER_START_CNT 0x006c
48 #define MDDI_NEXT_PRI_PTR 0x0070
49 #define MDDI_NEXT_SEC_PTR 0x0074
50 #define MDDI_MISR_CTL 0x0078
51 #define MDDI_MISR_DATA 0x007c
52 #define MDDI_SF_CNT 0x0080
53 #define MDDI_MF_CNT 0x0084
54 #define MDDI_CURR_REV_PTR 0x0088
55 #define MDDI_CORE_VER 0x008c
57 #define MDDI_INT_PRI_PTR_READ 0x0001
58 #define MDDI_INT_SEC_PTR_READ 0x0002
59 #define MDDI_INT_REV_DATA_AVAIL 0x0004
60 #define MDDI_INT_DISP_REQ 0x0008
61 #define MDDI_INT_PRI_UNDERFLOW 0x0010
62 #define MDDI_INT_SEC_UNDERFLOW 0x0020
63 #define MDDI_INT_REV_OVERFLOW 0x0040
64 #define MDDI_INT_CRC_ERROR 0x0080
65 #define MDDI_INT_MDDI_IN 0x0100
66 #define MDDI_INT_PRI_OVERWRITE 0x0200
67 #define MDDI_INT_SEC_OVERWRITE 0x0400
68 #define MDDI_INT_REV_OVERWRITE 0x0800
69 #define MDDI_INT_DMA_FAILURE 0x1000
70 #define MDDI_INT_LINK_ACTIVE 0x2000
71 #define MDDI_INT_IN_HIBERNATION 0x4000
72 #define MDDI_INT_PRI_LINK_LIST_DONE 0x8000
73 #define MDDI_INT_SEC_LINK_LIST_DONE 0x10000
74 #define MDDI_INT_NO_CMD_PKTS_PEND 0x20000
75 #define MDDI_INT_RTD_FAILURE 0x40000
76 #define MDDI_INT_REV_PKT_RECEIVED 0x80000
77 #define MDDI_INT_REV_PKTS_AVAIL 0x100000
79 #define MDDI_INT_NEED_CLEAR ( \
80 MDDI_INT_REV_DATA_AVAIL | \
81 MDDI_INT_PRI_UNDERFLOW | \
82 MDDI_INT_SEC_UNDERFLOW | \
83 MDDI_INT_REV_OVERFLOW | \
84 MDDI_INT_CRC_ERROR | \
85 MDDI_INT_REV_PKT_RECEIVED)
88 #define MDDI_STAT_LINK_ACTIVE 0x0001
89 #define MDDI_STAT_NEW_REV_PTR 0x0002
90 #define MDDI_STAT_NEW_PRI_PTR 0x0004
91 #define MDDI_STAT_NEW_SEC_PTR 0x0008
92 #define MDDI_STAT_IN_HIBERNATION 0x0010
93 #define MDDI_STAT_PRI_LINK_LIST_DONE 0x0020
94 #define MDDI_STAT_SEC_LINK_LIST_DONE 0x0040
95 #define MDDI_STAT_PENDING_TIMING_PKT 0x0080
96 #define MDDI_STAT_PENDING_REV_ENCAP 0x0100
97 #define MDDI_STAT_PENDING_POWERDOWN 0x0200
98 #define MDDI_STAT_RTD_MEAS_FAIL 0x0800
99 #define MDDI_STAT_CLIENT_WAKEUP_REQ 0x1000
102 #define MDDI_CMD_POWERDOWN 0x0100
103 #define MDDI_CMD_POWERUP 0x0200
104 #define MDDI_CMD_HIBERNATE 0x0300
105 #define MDDI_CMD_RESET 0x0400
106 #define MDDI_CMD_DISP_IGNORE 0x0501
107 #define MDDI_CMD_DISP_LISTEN 0x0500
108 #define MDDI_CMD_SEND_REV_ENCAP 0x0600
109 #define MDDI_CMD_GET_CLIENT_CAP 0x0601
110 #define MDDI_CMD_GET_CLIENT_STATUS 0x0602
111 #define MDDI_CMD_SEND_RTD 0x0700
112 #define MDDI_CMD_LINK_ACTIVE 0x0900
113 #define MDDI_CMD_PERIODIC_REV_ENCAP 0x0A00
114 #define MDDI_CMD_FORCE_NEW_REV_PTR 0x0C00
118 #define MDDI_VIDEO_REV_PKT_SIZE 0x40
119 #define MDDI_CLIENT_CAPABILITY_REV_PKT_SIZE 0x60
120 #define MDDI_MAX_REV_PKT_SIZE 0x60
123 #define MDDI_REV_BUFFER_SIZE (MDDI_MAX_REV_PKT_SIZE * 4)
127 #define MDDI_HOST_BYTES_PER_SUBFRAME 0x3C00
128 #define MDDI_HOST_TA2_LEN 0x000c
129 #define MDDI_HOST_REV_RATE_DIV 0x0002
157 uint8_t Interface_Type_Capability;
158 uint8_t Number_of_Alt_Displays;
172 uint32_t Client_Feature_Capability_Indicators;
173 uint8_t Maximum_Video_Frame_Rate_Capability;
174 uint8_t Minimum_Video_Frame_Rate_Capability;
178 uint16_t Audio_Sample_Rate_Capability;
179 uint8_t Audio_Sample_Resolution;
180 uint8_t Mic_Audio_Sample_Resolution;
181 uint16_t Mic_Sample_Rate_Capability;
183 uint8_t pointing_device_data_format;
201 uint16_t video_data_format_descriptor;
260 #define TYPE_VIDEO_STREAM 16
261 #define TYPE_CLIENT_CAPS 66
262 #define TYPE_REGISTER_ACCESS 146
263 #define TYPE_CLIENT_STATUS 70
278 #define MDDI_WRITE (0 << 14)
279 #define MDDI_READ (2 << 14)
280 #define MDDI_READ_RESP (3 << 14)
296 struct mddi_llentry *
next;
299 struct mddi_video_stream
v;
300 struct mddi_register_access
r;