Lines Matching full:in
46 sideband_msg_req_equal(const struct drm_dp_sideband_msg_req_body *in, in sideband_msg_req_equal() argument
52 if (in->req_type != out->req_type) in sideband_msg_req_equal()
55 switch (in->req_type) { in sideband_msg_req_equal()
62 #define IN in->u.i2c_read in sideband_msg_req_equal() macro
64 if (IN.num_bytes_read != OUT.num_bytes_read || in sideband_msg_req_equal()
65 IN.num_transactions != OUT.num_transactions || in sideband_msg_req_equal()
66 IN.port_number != OUT.port_number || in sideband_msg_req_equal()
67 IN.read_i2c_device_id != OUT.read_i2c_device_id) in sideband_msg_req_equal()
70 for (i = 0; i < IN.num_transactions; i++) { in sideband_msg_req_equal()
71 txin = &IN.transactions[i]; in sideband_msg_req_equal()
86 #undef IN in sideband_msg_req_equal()
90 #define IN in->u.dpcd_write in sideband_msg_req_equal() macro
92 if (IN.dpcd_address != OUT.dpcd_address || in sideband_msg_req_equal()
93 IN.num_bytes != OUT.num_bytes || in sideband_msg_req_equal()
94 IN.port_number != OUT.port_number) in sideband_msg_req_equal()
97 return memcmp(IN.bytes, OUT.bytes, IN.num_bytes) == 0; in sideband_msg_req_equal()
98 #undef IN in sideband_msg_req_equal()
102 #define IN in->u.i2c_write in sideband_msg_req_equal() macro
104 if (IN.port_number != OUT.port_number || in sideband_msg_req_equal()
105 IN.write_i2c_device_id != OUT.write_i2c_device_id || in sideband_msg_req_equal()
106 IN.num_bytes != OUT.num_bytes) in sideband_msg_req_equal()
109 return memcmp(IN.bytes, OUT.bytes, IN.num_bytes) == 0; in sideband_msg_req_equal()
110 #undef IN in sideband_msg_req_equal()
114 return memcmp(in, out, sizeof(*in)) == 0; in sideband_msg_req_equal()
121 sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in) in sideband_msg_req_encode_decode() argument
137 drm_dp_encode_sideband_req(in, txmsg); in sideband_msg_req_encode_decode()
146 if (!sideband_msg_req_equal(in, out)) { in sideband_msg_req_encode_decode()
148 drm_dp_dump_sideband_msg_req_body(in, 1, &p); in sideband_msg_req_encode_decode()
155 switch (in->req_type) { in sideband_msg_req_encode_decode()
169 memset(&in->u, 0, sizeof(in->u)); in sideband_msg_req_encode_decode()
179 struct drm_dp_sideband_msg_req_body in = { 0 }; in igt_dp_mst_sideband_msg_req_decode() local
183 #define DO_TEST() FAIL_ON(!sideband_msg_req_encode_decode(&in)) in igt_dp_mst_sideband_msg_req_decode()
185 in.req_type = DP_ENUM_PATH_RESOURCES; in igt_dp_mst_sideband_msg_req_decode()
186 in.u.port_num.port_number = 5; in igt_dp_mst_sideband_msg_req_decode()
189 in.req_type = DP_POWER_UP_PHY; in igt_dp_mst_sideband_msg_req_decode()
190 in.u.port_num.port_number = 5; in igt_dp_mst_sideband_msg_req_decode()
193 in.req_type = DP_POWER_DOWN_PHY; in igt_dp_mst_sideband_msg_req_decode()
194 in.u.port_num.port_number = 5; in igt_dp_mst_sideband_msg_req_decode()
197 in.req_type = DP_ALLOCATE_PAYLOAD; in igt_dp_mst_sideband_msg_req_decode()
198 in.u.allocate_payload.number_sdp_streams = 3; in igt_dp_mst_sideband_msg_req_decode()
199 for (i = 0; i < in.u.allocate_payload.number_sdp_streams; i++) in igt_dp_mst_sideband_msg_req_decode()
200 in.u.allocate_payload.sdp_stream_sink[i] = i + 1; in igt_dp_mst_sideband_msg_req_decode()
202 in.u.allocate_payload.port_number = 0xf; in igt_dp_mst_sideband_msg_req_decode()
204 in.u.allocate_payload.vcpi = 0x7f; in igt_dp_mst_sideband_msg_req_decode()
206 in.u.allocate_payload.pbn = U16_MAX; in igt_dp_mst_sideband_msg_req_decode()
209 in.req_type = DP_QUERY_PAYLOAD; in igt_dp_mst_sideband_msg_req_decode()
210 in.u.query_payload.port_number = 0xf; in igt_dp_mst_sideband_msg_req_decode()
212 in.u.query_payload.vcpi = 0x7f; in igt_dp_mst_sideband_msg_req_decode()
215 in.req_type = DP_REMOTE_DPCD_READ; in igt_dp_mst_sideband_msg_req_decode()
216 in.u.dpcd_read.port_number = 0xf; in igt_dp_mst_sideband_msg_req_decode()
218 in.u.dpcd_read.dpcd_address = 0xfedcb; in igt_dp_mst_sideband_msg_req_decode()
220 in.u.dpcd_read.num_bytes = U8_MAX; in igt_dp_mst_sideband_msg_req_decode()
223 in.req_type = DP_REMOTE_DPCD_WRITE; in igt_dp_mst_sideband_msg_req_decode()
224 in.u.dpcd_write.port_number = 0xf; in igt_dp_mst_sideband_msg_req_decode()
226 in.u.dpcd_write.dpcd_address = 0xfedcb; in igt_dp_mst_sideband_msg_req_decode()
228 in.u.dpcd_write.num_bytes = ARRAY_SIZE(data); in igt_dp_mst_sideband_msg_req_decode()
229 in.u.dpcd_write.bytes = data; in igt_dp_mst_sideband_msg_req_decode()
232 in.req_type = DP_REMOTE_I2C_READ; in igt_dp_mst_sideband_msg_req_decode()
233 in.u.i2c_read.port_number = 0xf; in igt_dp_mst_sideband_msg_req_decode()
235 in.u.i2c_read.read_i2c_device_id = 0x7f; in igt_dp_mst_sideband_msg_req_decode()
237 in.u.i2c_read.num_transactions = 3; in igt_dp_mst_sideband_msg_req_decode()
238 in.u.i2c_read.num_bytes_read = ARRAY_SIZE(data) * 3; in igt_dp_mst_sideband_msg_req_decode()
239 for (i = 0; i < in.u.i2c_read.num_transactions; i++) { in igt_dp_mst_sideband_msg_req_decode()
240 in.u.i2c_read.transactions[i].bytes = data; in igt_dp_mst_sideband_msg_req_decode()
241 in.u.i2c_read.transactions[i].num_bytes = ARRAY_SIZE(data); in igt_dp_mst_sideband_msg_req_decode()
242 in.u.i2c_read.transactions[i].i2c_dev_id = 0x7f & ~i; in igt_dp_mst_sideband_msg_req_decode()
243 in.u.i2c_read.transactions[i].i2c_transaction_delay = 0xf & ~i; in igt_dp_mst_sideband_msg_req_decode()
247 in.req_type = DP_REMOTE_I2C_WRITE; in igt_dp_mst_sideband_msg_req_decode()
248 in.u.i2c_write.port_number = 0xf; in igt_dp_mst_sideband_msg_req_decode()
250 in.u.i2c_write.write_i2c_device_id = 0x7f; in igt_dp_mst_sideband_msg_req_decode()
252 in.u.i2c_write.num_bytes = ARRAY_SIZE(data); in igt_dp_mst_sideband_msg_req_decode()
253 in.u.i2c_write.bytes = data; in igt_dp_mst_sideband_msg_req_decode()
256 in.req_type = DP_QUERY_STREAM_ENC_STATUS; in igt_dp_mst_sideband_msg_req_decode()
257 in.u.enc_status.stream_id = 1; in igt_dp_mst_sideband_msg_req_decode()
259 get_random_bytes(in.u.enc_status.client_id, in igt_dp_mst_sideband_msg_req_decode()
260 sizeof(in.u.enc_status.client_id)); in igt_dp_mst_sideband_msg_req_decode()
262 in.u.enc_status.stream_event = 3; in igt_dp_mst_sideband_msg_req_decode()
264 in.u.enc_status.valid_stream_event = 0; in igt_dp_mst_sideband_msg_req_decode()
266 in.u.enc_status.stream_behavior = 3; in igt_dp_mst_sideband_msg_req_decode()
268 in.u.enc_status.valid_stream_behavior = 1; in igt_dp_mst_sideband_msg_req_decode()