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
128 drm_dp_encode_sideband_req(in, &txmsg); in sideband_msg_req_encode_decode()
136 if (!sideband_msg_req_equal(in, &out)) { in sideband_msg_req_encode_decode()
138 drm_dp_dump_sideband_msg_req_body(in, 1, &p); in sideband_msg_req_encode_decode()
144 switch (in->req_type) { in sideband_msg_req_encode_decode()
158 memset(&in->u, 0, sizeof(in->u)); in sideband_msg_req_encode_decode()
165 struct drm_dp_sideband_msg_req_body in = { 0 }; in igt_dp_mst_sideband_msg_req_decode() local
169 #define DO_TEST() FAIL_ON(!sideband_msg_req_encode_decode(&in)) in igt_dp_mst_sideband_msg_req_decode()
171 in.req_type = DP_ENUM_PATH_RESOURCES; in igt_dp_mst_sideband_msg_req_decode()
172 in.u.port_num.port_number = 5; in igt_dp_mst_sideband_msg_req_decode()
175 in.req_type = DP_POWER_UP_PHY; in igt_dp_mst_sideband_msg_req_decode()
176 in.u.port_num.port_number = 5; in igt_dp_mst_sideband_msg_req_decode()
179 in.req_type = DP_POWER_DOWN_PHY; in igt_dp_mst_sideband_msg_req_decode()
180 in.u.port_num.port_number = 5; in igt_dp_mst_sideband_msg_req_decode()
183 in.req_type = DP_ALLOCATE_PAYLOAD; in igt_dp_mst_sideband_msg_req_decode()
184 in.u.allocate_payload.number_sdp_streams = 3; in igt_dp_mst_sideband_msg_req_decode()
185 for (i = 0; i < in.u.allocate_payload.number_sdp_streams; i++) in igt_dp_mst_sideband_msg_req_decode()
186 in.u.allocate_payload.sdp_stream_sink[i] = i + 1; in igt_dp_mst_sideband_msg_req_decode()
188 in.u.allocate_payload.port_number = 0xf; in igt_dp_mst_sideband_msg_req_decode()
190 in.u.allocate_payload.vcpi = 0x7f; in igt_dp_mst_sideband_msg_req_decode()
192 in.u.allocate_payload.pbn = U16_MAX; in igt_dp_mst_sideband_msg_req_decode()
195 in.req_type = DP_QUERY_PAYLOAD; in igt_dp_mst_sideband_msg_req_decode()
196 in.u.query_payload.port_number = 0xf; in igt_dp_mst_sideband_msg_req_decode()
198 in.u.query_payload.vcpi = 0x7f; in igt_dp_mst_sideband_msg_req_decode()
201 in.req_type = DP_REMOTE_DPCD_READ; in igt_dp_mst_sideband_msg_req_decode()
202 in.u.dpcd_read.port_number = 0xf; in igt_dp_mst_sideband_msg_req_decode()
204 in.u.dpcd_read.dpcd_address = 0xfedcb; in igt_dp_mst_sideband_msg_req_decode()
206 in.u.dpcd_read.num_bytes = U8_MAX; in igt_dp_mst_sideband_msg_req_decode()
209 in.req_type = DP_REMOTE_DPCD_WRITE; in igt_dp_mst_sideband_msg_req_decode()
210 in.u.dpcd_write.port_number = 0xf; in igt_dp_mst_sideband_msg_req_decode()
212 in.u.dpcd_write.dpcd_address = 0xfedcb; in igt_dp_mst_sideband_msg_req_decode()
214 in.u.dpcd_write.num_bytes = ARRAY_SIZE(data); in igt_dp_mst_sideband_msg_req_decode()
215 in.u.dpcd_write.bytes = data; in igt_dp_mst_sideband_msg_req_decode()
218 in.req_type = DP_REMOTE_I2C_READ; in igt_dp_mst_sideband_msg_req_decode()
219 in.u.i2c_read.port_number = 0xf; in igt_dp_mst_sideband_msg_req_decode()
221 in.u.i2c_read.read_i2c_device_id = 0x7f; in igt_dp_mst_sideband_msg_req_decode()
223 in.u.i2c_read.num_transactions = 3; in igt_dp_mst_sideband_msg_req_decode()
224 in.u.i2c_read.num_bytes_read = ARRAY_SIZE(data) * 3; in igt_dp_mst_sideband_msg_req_decode()
225 for (i = 0; i < in.u.i2c_read.num_transactions; i++) { in igt_dp_mst_sideband_msg_req_decode()
226 in.u.i2c_read.transactions[i].bytes = data; in igt_dp_mst_sideband_msg_req_decode()
227 in.u.i2c_read.transactions[i].num_bytes = ARRAY_SIZE(data); in igt_dp_mst_sideband_msg_req_decode()
228 in.u.i2c_read.transactions[i].i2c_dev_id = 0x7f & ~i; in igt_dp_mst_sideband_msg_req_decode()
229 in.u.i2c_read.transactions[i].i2c_transaction_delay = 0xf & ~i; in igt_dp_mst_sideband_msg_req_decode()
233 in.req_type = DP_REMOTE_I2C_WRITE; in igt_dp_mst_sideband_msg_req_decode()
234 in.u.i2c_write.port_number = 0xf; in igt_dp_mst_sideband_msg_req_decode()
236 in.u.i2c_write.write_i2c_device_id = 0x7f; in igt_dp_mst_sideband_msg_req_decode()
238 in.u.i2c_write.num_bytes = ARRAY_SIZE(data); in igt_dp_mst_sideband_msg_req_decode()
239 in.u.i2c_write.bytes = data; in igt_dp_mst_sideband_msg_req_decode()
242 in.req_type = DP_QUERY_STREAM_ENC_STATUS; in igt_dp_mst_sideband_msg_req_decode()
243 in.u.enc_status.stream_id = 1; in igt_dp_mst_sideband_msg_req_decode()
245 get_random_bytes(in.u.enc_status.client_id, in igt_dp_mst_sideband_msg_req_decode()
246 sizeof(in.u.enc_status.client_id)); in igt_dp_mst_sideband_msg_req_decode()
248 in.u.enc_status.stream_event = 3; in igt_dp_mst_sideband_msg_req_decode()
250 in.u.enc_status.valid_stream_event = 0; in igt_dp_mst_sideband_msg_req_decode()
252 in.u.enc_status.stream_behavior = 3; in igt_dp_mst_sideband_msg_req_decode()
254 in.u.enc_status.valid_stream_behavior = 1; in igt_dp_mst_sideband_msg_req_decode()