Lines Matching +full:- +full:u
1 // SPDX-License-Identifier: GPL-2.0-only
14 #include "test-drm_modeset_common.h"
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()
63 #define OUT out->u.i2c_read in sideband_msg_req_equal()
74 if (txin->i2c_dev_id != txout->i2c_dev_id || in sideband_msg_req_equal()
75 txin->no_stop_bit != txout->no_stop_bit || in sideband_msg_req_equal()
76 txin->num_bytes != txout->num_bytes || in sideband_msg_req_equal()
77 txin->i2c_transaction_delay != in sideband_msg_req_equal()
78 txout->i2c_transaction_delay) in sideband_msg_req_equal()
81 if (memcmp(txin->bytes, txout->bytes, in sideband_msg_req_equal()
82 txin->num_bytes) != 0) in sideband_msg_req_equal()
90 #define IN in->u.dpcd_write in sideband_msg_req_equal()
91 #define OUT out->u.dpcd_write in sideband_msg_req_equal()
102 #define IN in->u.i2c_write in sideband_msg_req_equal()
103 #define OUT out->u.i2c_write in sideband_msg_req_equal()
144 switch (in->req_type) { in sideband_msg_req_encode_decode()
146 kfree(out.u.dpcd_write.bytes); in sideband_msg_req_encode_decode()
149 for (i = 0; i < out.u.i2c_read.num_transactions; i++) in sideband_msg_req_encode_decode()
150 kfree(out.u.i2c_read.transactions[i].bytes); in sideband_msg_req_encode_decode()
153 kfree(out.u.i2c_write.bytes); in sideband_msg_req_encode_decode()
158 memset(&in->u, 0, sizeof(in->u)); in sideband_msg_req_encode_decode()
172 in.u.port_num.port_number = 5; in igt_dp_mst_sideband_msg_req_decode()
176 in.u.port_num.port_number = 5; in igt_dp_mst_sideband_msg_req_decode()
180 in.u.port_num.port_number = 5; 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()
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()
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()
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()
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()
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()
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()