tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.19 head: 9e0a13e7641ee6031e5d210f1f81fd731a3bf3e1 commit: 5c0689c225f4f4a0bf5be276da11799f31f9e237 [183/184] drm/dp_mst: Increase ACT retry timeout to 3s config: i386-randconfig-s001-20200622 (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.2-dirty git checkout 5c0689c225f4f4a0bf5be276da11799f31f9e237 # save the attached .config to linux build tree make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All error/warnings (new ones prefixed by >>): 46 | static void drm_dp_put_port(struct drm_dp_mst_port *port); | ^~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:50:17: warning: 'struct drm_dp_payload' declared inside parameter list will not be visible outside of this definition or declaration 50 | struct drm_dp_payload *payload); | ^~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:48:45: warning: 'struct drm_dp_mst_topology_mgr' declared inside parameter list will not be visible outside of this definition or declaration 48 | static int drm_dp_dpcd_write_payload(struct drm_dp_mst_topology_mgr *mgr, | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:53:14: warning: 'struct drm_dp_mst_port' declared inside parameter list will not be visible outside of this definition or declaration 53 | struct drm_dp_mst_port *port, | ^~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:52:42: warning: 'struct drm_dp_mst_topology_mgr' declared inside parameter list will not be visible outside of this definition or declaration 52 | static int drm_dp_send_dpcd_write(struct drm_dp_mst_topology_mgr *mgr, | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:57:17: warning: 'struct drm_dp_mst_branch' declared inside parameter list will not be visible outside of this definition or declaration 57 | struct drm_dp_mst_branch *mstb); | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:56:45: warning: 'struct drm_dp_mst_topology_mgr' declared inside parameter list will not be visible outside of this definition or declaration 56 | static void drm_dp_send_link_address(struct drm_dp_mst_topology_mgr *mgr, | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:60:16: warning: 'struct drm_dp_mst_port' declared inside parameter list will not be visible outside of this definition or declaration 60 | struct drm_dp_mst_port *port); | ^~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:59:16: warning: 'struct drm_dp_mst_branch' declared inside parameter list will not be visible outside of this definition or declaration 59 | struct drm_dp_mst_branch *mstb, | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:58:51: warning: 'struct drm_dp_mst_topology_mgr' declared inside parameter list will not be visible outside of this definition or declaration 58 | static int drm_dp_send_enum_path_resources(struct drm_dp_mst_topology_mgr *mgr, | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:61:41: warning: 'struct drm_dp_mst_topology_mgr' declared inside parameter list will not be visible outside of this definition or declaration 61 | static bool drm_dp_validate_guid(struct drm_dp_mst_topology_mgr *mgr, | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:64:47: warning: 'struct drm_dp_aux' declared inside parameter list will not be visible outside of this definition or declaration 64 | static int drm_dp_mst_register_i2c_bus(struct drm_dp_aux *aux); | ^~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:65:50: warning: 'struct drm_dp_aux' declared inside parameter list will not be visible outside of this definition or declaration 65 | static void drm_dp_mst_unregister_i2c_bus(struct drm_dp_aux *aux); | ^~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:66:39: warning: 'struct drm_dp_mst_topology_mgr' declared inside parameter list will not be visible outside of this definition or declaration 66 | static void drm_dp_mst_kick_tx(struct drm_dp_mst_topology_mgr *mgr); | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:135:49: warning: 'struct drm_dp_sideband_msg_hdr' declared inside parameter list will not be visible outside of this definition or declaration 135 | static inline u8 drm_dp_calc_sb_hdr_size(struct drm_dp_sideband_msg_hdr *hdr) | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_calc_sb_hdr_size': drivers/gpu/drm/drm_dp_mst_topology.c:138:14: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_hdr' 138 | size += (hdr->lct / 2); | ^~ drivers/gpu/drm/drm_dp_mst_topology.c: At top level: drivers/gpu/drm/drm_dp_mst_topology.c:142:51: warning: 'struct drm_dp_sideband_msg_hdr' declared inside parameter list will not be visible outside of this definition or declaration 142 | static void drm_dp_encode_sideband_msg_hdr(struct drm_dp_sideband_msg_hdr *hdr, | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_encode_sideband_msg_hdr': drivers/gpu/drm/drm_dp_mst_topology.c:148:20: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_hdr' 148 | buf[idx++] = ((hdr->lct & 0xf) << 4) | (hdr->lcr & 0xf); | ^~ drivers/gpu/drm/drm_dp_mst_topology.c: At top level: drivers/gpu/drm/drm_dp_mst_topology.c:161:51: warning: 'struct drm_dp_sideband_msg_hdr' declared inside parameter list will not be visible outside of this definition or declaration 161 | static bool drm_dp_decode_sideband_msg_hdr(struct drm_dp_sideband_msg_hdr *hdr, | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_decode_sideband_msg_hdr': drivers/gpu/drm/drm_dp_mst_topology.c:181:5: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_hdr' 181 | hdr->lct = (buf[0] & 0xf0) >> 4; | ^~ drivers/gpu/drm/drm_dp_mst_topology.c: At top level: drivers/gpu/drm/drm_dp_mst_topology.c:199:19: warning: 'struct drm_dp_sideband_msg_tx' declared inside parameter list will not be visible outside of this definition or declaration 199 | struct drm_dp_sideband_msg_tx *raw) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:198:47: warning: 'struct drm_dp_sideband_msg_req_body' declared inside parameter list will not be visible outside of this definition or declaration 198 | static void drm_dp_encode_sideband_req(struct drm_dp_sideband_msg_req_body *req, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_encode_sideband_req': drivers/gpu/drm/drm_dp_mst_topology.c:203:15: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_tx' 203 | u8 *buf = raw->msg; | ^~ drivers/gpu/drm/drm_dp_mst_topology.c:204:18: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_req_body' 204 | buf[idx++] = req->req_type & 0x7f; | ^~ drivers/gpu/drm/drm_dp_mst_topology.c:207:7: error: 'DP_ENUM_PATH_RESOURCES' undeclared (first use in this function) 207 | case DP_ENUM_PATH_RESOURCES: | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:207:7: note: each undeclared identifier is reported only once for each function it appears in drivers/gpu/drm/drm_dp_mst_topology.c:211:7: error: 'DP_ALLOCATE_PAYLOAD' undeclared (first use in this function) 211 | case DP_ALLOCATE_PAYLOAD: | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:232:7: error: 'DP_QUERY_PAYLOAD' undeclared (first use in this function) 232 | case DP_QUERY_PAYLOAD: | ^~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:238:7: error: 'DP_REMOTE_DPCD_READ' undeclared (first use in this function) 238 | case DP_REMOTE_DPCD_READ: | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:250:7: error: 'DP_REMOTE_DPCD_WRITE' undeclared (first use in this function) 250 | case DP_REMOTE_DPCD_WRITE: | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:263:7: error: 'DP_REMOTE_I2C_READ' undeclared (first use in this function) 263 | case DP_REMOTE_I2C_READ: | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:285:7: error: 'DP_REMOTE_I2C_WRITE' undeclared (first use in this function) 285 | case DP_REMOTE_I2C_WRITE: | ^~~~~~~~~~~~~~~~~~~ >> drivers/gpu/drm/drm_dp_mst_topology.c:296:7: error: 'DP_POWER_DOWN_PHY' undeclared (first use in this function) 296 | case DP_POWER_DOWN_PHY: | ^~~~~~~~~~~~~~~~~ >> drivers/gpu/drm/drm_dp_mst_topology.c:297:7: error: 'DP_POWER_UP_PHY' undeclared (first use in this function) 297 | case DP_POWER_UP_PHY: | ^~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: At top level: drivers/gpu/drm/drm_dp_mst_topology.c:313:14: warning: 'struct drm_dp_sideband_msg_tx' declared inside parameter list will not be visible outside of this definition or declaration 313 | struct drm_dp_sideband_msg_tx *raw) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:312:49: warning: 'struct drm_dp_sideband_msg_reply_body' declared inside parameter list will not be visible outside of this definition or declaration 312 | static void drm_dp_encode_sideband_reply(struct drm_dp_sideband_msg_reply_body *rep, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_encode_sideband_reply': drivers/gpu/drm/drm_dp_mst_topology.c:316:15: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_tx' 316 | u8 *buf = raw->msg; | ^~ drivers/gpu/drm/drm_dp_mst_topology.c:318:19: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_reply_body' 318 | buf[idx++] = (rep->reply_type & 0x1) << 7 | (rep->req_type & 0x7f); | ^~ drivers/gpu/drm/drm_dp_mst_topology.c: At top level: drivers/gpu/drm/drm_dp_mst_topology.c:324:46: warning: 'struct drm_dp_sideband_msg_rx' declared inside parameter list will not be visible outside of this definition or declaration 324 | static bool drm_dp_sideband_msg_build(struct drm_dp_sideband_msg_rx *msg, | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_sideband_msg_build': drivers/gpu/drm/drm_dp_mst_topology.c:332:34: error: storage size of 'recv_hdr' isn't known 332 | struct drm_dp_sideband_msg_hdr recv_hdr; | ^~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:343:29: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_rx' 343 | if (!recv_hdr.somt && !msg->have_somt) | ^~ drivers/gpu/drm/drm_dp_mst_topology.c:355:48: error: invalid application of 'sizeof' to incomplete type 'struct drm_dp_sideband_msg_hdr' 355 | memcpy(&msg->initial_hdr, &recv_hdr, sizeof(struct drm_dp_sideband_msg_hdr)); | ^~~~~~ In file included from drivers/gpu/drm/drm_dp_mst_topology.c:23: >> include/linux/kernel.h:870:2: error: first argument to '__builtin_choose_expr' not a constant 870 | __builtin_choose_expr(__safe_cmp(x, y), \ | ^~~~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:879:19: note: in expansion of macro '__careful_cmp' 879 | #define min(x, y) __careful_cmp(x, y, <) | ^~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:362:23: note: in expansion of macro 'min' 362 | msg->curchunk_idx = min(msg->curchunk_len, (u8)(replybuflen - hdrlen)); | ^~~ drivers/gpu/drm/drm_dp_mst_topology.c:332:34: warning: unused variable 'recv_hdr' [-Wunused-variable] 332 | struct drm_dp_sideband_msg_hdr recv_hdr; | ^~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:328:5: warning: variable 'crc4' set but not used [-Wunused-but-set-variable] 328 | u8 crc4; | ^~~~ drivers/gpu/drm/drm_dp_mst_topology.c: At top level: drivers/gpu/drm/drm_dp_mst_topology.c:380:20: warning: 'struct drm_dp_sideband_msg_reply_body' declared inside parameter list will not be visible outside of this definition or declaration 380 | struct drm_dp_sideband_msg_reply_body *repmsg) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:379:55: warning: 'struct drm_dp_sideband_msg_rx' declared inside parameter list will not be visible outside of this definition or declaration 379 | static bool drm_dp_sideband_parse_link_address(struct drm_dp_sideband_msg_rx *raw, | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_sideband_parse_link_address': drivers/gpu/drm/drm_dp_mst_topology.c:384:15: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_reply_body' 384 | memcpy(repmsg->u.link_addr.guid, &raw->msg[idx], 16); | ^~ drivers/gpu/drm/drm_dp_mst_topology.c:384:39: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_rx' 384 | memcpy(repmsg->u.link_addr.guid, &raw->msg[idx], 16); | ^~ drivers/gpu/drm/drm_dp_mst_topology.c: At top level: drivers/gpu/drm/drm_dp_mst_topology.c:432:17: warning: 'struct drm_dp_sideband_msg_reply_body' declared inside parameter list will not be visible outside of this definition or declaration 432 | struct drm_dp_sideband_msg_reply_body *repmsg) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:431:59: warning: 'struct drm_dp_sideband_msg_rx' declared inside parameter list will not be visible outside of this definition or declaration 431 | static bool drm_dp_sideband_parse_remote_dpcd_read(struct drm_dp_sideband_msg_rx *raw, | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_sideband_parse_remote_dpcd_read': drivers/gpu/drm/drm_dp_mst_topology.c:435:8: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_reply_body' 435 | repmsg->u.remote_dpcd_read_ack.port_number = raw->msg[idx] & 0xf; | ^~ drivers/gpu/drm/drm_dp_mst_topology.c:435:50: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_rx' 435 | repmsg->u.remote_dpcd_read_ack.port_number = raw->msg[idx] & 0xf; | ^~ drivers/gpu/drm/drm_dp_mst_topology.c: At top level: drivers/gpu/drm/drm_dp_mst_topology.c:452:20: warning: 'struct drm_dp_sideband_msg_reply_body' declared inside parameter list will not be visible outside of this definition or declaration 452 | struct drm_dp_sideband_msg_reply_body *repmsg) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:451:60: warning: 'struct drm_dp_sideband_msg_rx' declared inside parameter list will not be visible outside of this definition or declaration 451 | static bool drm_dp_sideband_parse_remote_dpcd_write(struct drm_dp_sideband_msg_rx *raw, | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_sideband_parse_remote_dpcd_write': drivers/gpu/drm/drm_dp_mst_topology.c:455:8: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_reply_body' 455 | repmsg->u.remote_dpcd_write_ack.port_number = raw->msg[idx] & 0xf; | ^~ drivers/gpu/drm/drm_dp_mst_topology.c:455:51: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_rx' 455 | repmsg->u.remote_dpcd_write_ack.port_number = raw->msg[idx] & 0xf; | ^~ drivers/gpu/drm/drm_dp_mst_topology.c: At top level: drivers/gpu/drm/drm_dp_mst_topology.c:466:20: warning: 'struct drm_dp_sideband_msg_reply_body' declared inside parameter list will not be visible outside of this definition or declaration 466 | struct drm_dp_sideband_msg_reply_body *repmsg) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:465:62: warning: 'struct drm_dp_sideband_msg_rx' declared inside parameter list will not be visible outside of this definition or declaration 465 | static bool drm_dp_sideband_parse_remote_i2c_read_ack(struct drm_dp_sideband_msg_rx *raw, | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_sideband_parse_remote_i2c_read_ack': drivers/gpu/drm/drm_dp_mst_topology.c:470:8: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_reply_body' 470 | repmsg->u.remote_i2c_read_ack.port_number = (raw->msg[idx] & 0xf); | ^~ drivers/gpu/drm/drm_dp_mst_topology.c:470:50: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_rx' 470 | repmsg->u.remote_i2c_read_ack.port_number = (raw->msg[idx] & 0xf); | ^~ drivers/gpu/drm/drm_dp_mst_topology.c: At top level: drivers/gpu/drm/drm_dp_mst_topology.c:485:17: warning: 'struct drm_dp_sideband_msg_reply_body' declared inside parameter list will not be visible outside of this definition or declaration 485 | struct drm_dp_sideband_msg_reply_body *repmsg) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:484:66: warning: 'struct drm_dp_sideband_msg_rx' declared inside parameter list will not be visible outside of this definition or declaration 484 | static bool drm_dp_sideband_parse_enum_path_resources_ack(struct drm_dp_sideband_msg_rx *raw, | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_sideband_parse_enum_path_resources_ack': drivers/gpu/drm/drm_dp_mst_topology.c:488:8: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_reply_body' 488 | repmsg->u.path_resources.port_number = (raw->msg[idx] >> 4) & 0xf; | ^~ drivers/gpu/drm/drm_dp_mst_topology.c:488:45: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_rx' 488 | repmsg->u.path_resources.port_number = (raw->msg[idx] >> 4) & 0xf; | ^~ drivers/gpu/drm/drm_dp_mst_topology.c: At top level: drivers/gpu/drm/drm_dp_mst_topology.c:507:17: warning: 'struct drm_dp_sideband_msg_reply_body' declared inside parameter list will not be visible outside of this definition or declaration 507 | struct drm_dp_sideband_msg_reply_body *repmsg) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:506:63: warning: 'struct drm_dp_sideband_msg_rx' declared inside parameter list will not be visible outside of this definition or declaration 506 | static bool drm_dp_sideband_parse_allocate_payload_ack(struct drm_dp_sideband_msg_rx *raw, | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_sideband_parse_allocate_payload_ack': drivers/gpu/drm/drm_dp_mst_topology.c:510:8: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_reply_body' 510 | repmsg->u.allocate_payload.port_number = (raw->msg[idx] >> 4) & 0xf; | ^~ drivers/gpu/drm/drm_dp_mst_topology.c:510:47: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_rx' 510 | repmsg->u.allocate_payload.port_number = (raw->msg[idx] >> 4) & 0xf; | ^~ drivers/gpu/drm/drm_dp_mst_topology.c: At top level: drivers/gpu/drm/drm_dp_mst_topology.c:529:18: warning: 'struct drm_dp_sideband_msg_reply_body' declared inside parameter list will not be visible outside of this definition or declaration -- 580 | case DP_REMOTE_DPCD_READ: | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:581:49: error: passing argument 1 of 'drm_dp_sideband_parse_remote_dpcd_read' from incompatible pointer type [-Werror=incompatible-pointer-types] 581 | return drm_dp_sideband_parse_remote_dpcd_read(raw, msg); | ^~~ | | | struct drm_dp_sideband_msg_rx * drivers/gpu/drm/drm_dp_mst_topology.c:431:83: note: expected 'struct drm_dp_sideband_msg_rx *' but argument is of type 'struct drm_dp_sideband_msg_rx *' 431 | static bool drm_dp_sideband_parse_remote_dpcd_read(struct drm_dp_sideband_msg_rx *raw, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/drm_dp_mst_topology.c:581:54: error: passing argument 2 of 'drm_dp_sideband_parse_remote_dpcd_read' from incompatible pointer type [-Werror=incompatible-pointer-types] 581 | return drm_dp_sideband_parse_remote_dpcd_read(raw, msg); | ^~~ | | | struct drm_dp_sideband_msg_reply_body * drivers/gpu/drm/drm_dp_mst_topology.c:432:49: note: expected 'struct drm_dp_sideband_msg_reply_body *' but argument is of type 'struct drm_dp_sideband_msg_reply_body *' 432 | struct drm_dp_sideband_msg_reply_body *repmsg) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:582:7: error: 'DP_REMOTE_DPCD_WRITE' undeclared (first use in this function) 582 | case DP_REMOTE_DPCD_WRITE: | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:583:50: error: passing argument 1 of 'drm_dp_sideband_parse_remote_dpcd_write' from incompatible pointer type [-Werror=incompatible-pointer-types] 583 | return drm_dp_sideband_parse_remote_dpcd_write(raw, msg); | ^~~ | | | struct drm_dp_sideband_msg_rx * drivers/gpu/drm/drm_dp_mst_topology.c:451:84: note: expected 'struct drm_dp_sideband_msg_rx *' but argument is of type 'struct drm_dp_sideband_msg_rx *' 451 | static bool drm_dp_sideband_parse_remote_dpcd_write(struct drm_dp_sideband_msg_rx *raw, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/drm_dp_mst_topology.c:583:55: error: passing argument 2 of 'drm_dp_sideband_parse_remote_dpcd_write' from incompatible pointer type [-Werror=incompatible-pointer-types] 583 | return drm_dp_sideband_parse_remote_dpcd_write(raw, msg); | ^~~ | | | struct drm_dp_sideband_msg_reply_body * drivers/gpu/drm/drm_dp_mst_topology.c:452:52: note: expected 'struct drm_dp_sideband_msg_reply_body *' but argument is of type 'struct drm_dp_sideband_msg_reply_body *' 452 | struct drm_dp_sideband_msg_reply_body *repmsg) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:584:7: error: 'DP_REMOTE_I2C_READ' undeclared (first use in this function) 584 | case DP_REMOTE_I2C_READ: | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:585:52: error: passing argument 1 of 'drm_dp_sideband_parse_remote_i2c_read_ack' from incompatible pointer type [-Werror=incompatible-pointer-types] 585 | return drm_dp_sideband_parse_remote_i2c_read_ack(raw, msg); | ^~~ | | | struct drm_dp_sideband_msg_rx * drivers/gpu/drm/drm_dp_mst_topology.c:465:86: note: expected 'struct drm_dp_sideband_msg_rx *' but argument is of type 'struct drm_dp_sideband_msg_rx *' 465 | static bool drm_dp_sideband_parse_remote_i2c_read_ack(struct drm_dp_sideband_msg_rx *raw, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/drm_dp_mst_topology.c:585:57: error: passing argument 2 of 'drm_dp_sideband_parse_remote_i2c_read_ack' from incompatible pointer type [-Werror=incompatible-pointer-types] 585 | return drm_dp_sideband_parse_remote_i2c_read_ack(raw, msg); | ^~~ | | | struct drm_dp_sideband_msg_reply_body * drivers/gpu/drm/drm_dp_mst_topology.c:466:52: note: expected 'struct drm_dp_sideband_msg_reply_body *' but argument is of type 'struct drm_dp_sideband_msg_reply_body *' 466 | struct drm_dp_sideband_msg_reply_body *repmsg) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:586:7: error: 'DP_ENUM_PATH_RESOURCES' undeclared (first use in this function) 586 | case DP_ENUM_PATH_RESOURCES: | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:587:56: error: passing argument 1 of 'drm_dp_sideband_parse_enum_path_resources_ack' from incompatible pointer type [-Werror=incompatible-pointer-types] 587 | return drm_dp_sideband_parse_enum_path_resources_ack(raw, msg); | ^~~ | | | struct drm_dp_sideband_msg_rx * drivers/gpu/drm/drm_dp_mst_topology.c:484:90: note: expected 'struct drm_dp_sideband_msg_rx *' but argument is of type 'struct drm_dp_sideband_msg_rx *' 484 | static bool drm_dp_sideband_parse_enum_path_resources_ack(struct drm_dp_sideband_msg_rx *raw, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/drm_dp_mst_topology.c:587:61: error: passing argument 2 of 'drm_dp_sideband_parse_enum_path_resources_ack' from incompatible pointer type [-Werror=incompatible-pointer-types] 587 | return drm_dp_sideband_parse_enum_path_resources_ack(raw, msg); | ^~~ | | | struct drm_dp_sideband_msg_reply_body * drivers/gpu/drm/drm_dp_mst_topology.c:485:49: note: expected 'struct drm_dp_sideband_msg_reply_body *' but argument is of type 'struct drm_dp_sideband_msg_reply_body *' 485 | struct drm_dp_sideband_msg_reply_body *repmsg) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:588:7: error: 'DP_ALLOCATE_PAYLOAD' undeclared (first use in this function) 588 | case DP_ALLOCATE_PAYLOAD: | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:589:53: error: passing argument 1 of 'drm_dp_sideband_parse_allocate_payload_ack' from incompatible pointer type [-Werror=incompatible-pointer-types] 589 | return drm_dp_sideband_parse_allocate_payload_ack(raw, msg); | ^~~ | | | struct drm_dp_sideband_msg_rx * drivers/gpu/drm/drm_dp_mst_topology.c:506:87: note: expected 'struct drm_dp_sideband_msg_rx *' but argument is of type 'struct drm_dp_sideband_msg_rx *' 506 | static bool drm_dp_sideband_parse_allocate_payload_ack(struct drm_dp_sideband_msg_rx *raw, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/drm_dp_mst_topology.c:589:58: error: passing argument 2 of 'drm_dp_sideband_parse_allocate_payload_ack' from incompatible pointer type [-Werror=incompatible-pointer-types] 589 | return drm_dp_sideband_parse_allocate_payload_ack(raw, msg); | ^~~ | | | struct drm_dp_sideband_msg_reply_body * drivers/gpu/drm/drm_dp_mst_topology.c:507:49: note: expected 'struct drm_dp_sideband_msg_reply_body *' but argument is of type 'struct drm_dp_sideband_msg_reply_body *' 507 | struct drm_dp_sideband_msg_reply_body *repmsg) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:590:7: error: 'DP_POWER_DOWN_PHY' undeclared (first use in this function) 590 | case DP_POWER_DOWN_PHY: | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:591:7: error: 'DP_POWER_UP_PHY' undeclared (first use in this function) 591 | case DP_POWER_UP_PHY: | ^~~~~~~~~~~~~~~ >> drivers/gpu/drm/drm_dp_mst_topology.c:592:53: error: passing argument 1 of 'drm_dp_sideband_parse_power_updown_phy_ack' from incompatible pointer type [-Werror=incompatible-pointer-types] 592 | return drm_dp_sideband_parse_power_updown_phy_ack(raw, msg); | ^~~ | | | struct drm_dp_sideband_msg_rx * drivers/gpu/drm/drm_dp_mst_topology.c:546:87: note: expected 'struct drm_dp_sideband_msg_rx *' but argument is of type 'struct drm_dp_sideband_msg_rx *' 546 | static bool drm_dp_sideband_parse_power_updown_phy_ack(struct drm_dp_sideband_msg_rx *raw, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/drm_dp_mst_topology.c:592:58: error: passing argument 2 of 'drm_dp_sideband_parse_power_updown_phy_ack' from incompatible pointer type [-Werror=incompatible-pointer-types] 592 | return drm_dp_sideband_parse_power_updown_phy_ack(raw, msg); | ^~~ | | | struct drm_dp_sideband_msg_reply_body * drivers/gpu/drm/drm_dp_mst_topology.c:547:53: note: expected 'struct drm_dp_sideband_msg_reply_body *' but argument is of type 'struct drm_dp_sideband_msg_reply_body *' 547 | struct drm_dp_sideband_msg_reply_body *repmsg) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: At top level: drivers/gpu/drm/drm_dp_mst_topology.c:600:18: warning: 'struct drm_dp_sideband_msg_req_body' declared inside parameter list will not be visible outside of this definition or declaration 600 | struct drm_dp_sideband_msg_req_body *msg) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:599:67: warning: 'struct drm_dp_sideband_msg_rx' declared inside parameter list will not be visible outside of this definition or declaration 599 | static bool drm_dp_sideband_parse_connection_status_notify(struct drm_dp_sideband_msg_rx *raw, | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_sideband_parse_connection_status_notify': drivers/gpu/drm/drm_dp_mst_topology.c:604:5: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_req_body' 604 | msg->u.conn_stat.port_number = (raw->msg[idx] & 0xf0) >> 4; | ^~ drivers/gpu/drm/drm_dp_mst_topology.c:604:37: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_rx' 604 | msg->u.conn_stat.port_number = (raw->msg[idx] & 0xf0) >> 4; | ^~ drivers/gpu/drm/drm_dp_mst_topology.c: At top level: drivers/gpu/drm/drm_dp_mst_topology.c:627:18: warning: 'struct drm_dp_sideband_msg_req_body' declared inside parameter list will not be visible outside of this definition or declaration 627 | struct drm_dp_sideband_msg_req_body *msg) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:626:65: warning: 'struct drm_dp_sideband_msg_rx' declared inside parameter list will not be visible outside of this definition or declaration 626 | static bool drm_dp_sideband_parse_resource_status_notify(struct drm_dp_sideband_msg_rx *raw, | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_sideband_parse_resource_status_notify': drivers/gpu/drm/drm_dp_mst_topology.c:631:5: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_req_body' 631 | msg->u.resource_stat.port_number = (raw->msg[idx] & 0xf0) >> 4; | ^~ drivers/gpu/drm/drm_dp_mst_topology.c:631:41: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_rx' 631 | msg->u.resource_stat.port_number = (raw->msg[idx] & 0xf0) >> 4; | ^~ drivers/gpu/drm/drm_dp_mst_topology.c: At top level: drivers/gpu/drm/drm_dp_mst_topology.c:650:18: warning: 'struct drm_dp_sideband_msg_req_body' declared inside parameter list will not be visible outside of this definition or declaration 650 | struct drm_dp_sideband_msg_req_body *msg) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:649:46: warning: 'struct drm_dp_sideband_msg_rx' declared inside parameter list will not be visible outside of this definition or declaration 649 | static bool drm_dp_sideband_parse_req(struct drm_dp_sideband_msg_rx *raw, | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_sideband_parse_req': drivers/gpu/drm/drm_dp_mst_topology.c:652:24: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_req_body' 652 | memset(msg, 0, sizeof(*msg)); | ^~~~ drivers/gpu/drm/drm_dp_mst_topology.c:653:22: error: dereferencing pointer to incomplete type 'struct drm_dp_sideband_msg_rx' 653 | msg->req_type = (raw->msg[0] & 0x7f); | ^~ drivers/gpu/drm/drm_dp_mst_topology.c:656:7: error: 'DP_CONNECTION_STATUS_NOTIFY' undeclared (first use in this function) 656 | case DP_CONNECTION_STATUS_NOTIFY: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:657:57: error: passing argument 1 of 'drm_dp_sideband_parse_connection_status_notify' from incompatible pointer type [-Werror=incompatible-pointer-types] 657 | return drm_dp_sideband_parse_connection_status_notify(raw, msg); | ^~~ | | | struct drm_dp_sideband_msg_rx * drivers/gpu/drm/drm_dp_mst_topology.c:599:91: note: expected 'struct drm_dp_sideband_msg_rx *' but argument is of type 'struct drm_dp_sideband_msg_rx *' 599 | static bool drm_dp_sideband_parse_connection_status_notify(struct drm_dp_sideband_msg_rx *raw, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/drm_dp_mst_topology.c:657:62: error: passing argument 2 of 'drm_dp_sideband_parse_connection_status_notify' from incompatible pointer type [-Werror=incompatible-pointer-types] 657 | return drm_dp_sideband_parse_connection_status_notify(raw, msg); | ^~~ | | | struct drm_dp_sideband_msg_req_body * drivers/gpu/drm/drm_dp_mst_topology.c:600:48: note: expected 'struct drm_dp_sideband_msg_req_body *' but argument is of type 'struct drm_dp_sideband_msg_req_body *' 600 | struct drm_dp_sideband_msg_req_body *msg) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/drm_dp_mst_topology.c:658:7: error: 'DP_RESOURCE_STATUS_NOTIFY' undeclared (first use in this function) 658 | case DP_RESOURCE_STATUS_NOTIFY: | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c:659:55: error: passing argument 1 of 'drm_dp_sideband_parse_resource_status_notify' from incompatible pointer type [-Werror=incompatible-pointer-types] 659 | return drm_dp_sideband_parse_resource_status_notify(raw, msg); | ^~~ | | | struct drm_dp_sideband_msg_rx * drivers/gpu/drm/drm_dp_mst_topology.c:626:89: note: expected 'struct drm_dp_sideband_msg_rx *' but argument is of type 'struct drm_dp_sideband_msg_rx *' 626 | static bool drm_dp_sideband_parse_resource_status_notify(struct drm_dp_sideband_msg_rx *raw, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/drm_dp_mst_topology.c:659:60: error: passing argument 2 of 'drm_dp_sideband_parse_resource_status_notify' from incompatible pointer type [-Werror=incompatible-pointer-types] 659 | return drm_dp_sideband_parse_resource_status_notify(raw, msg); | ^~~ | | | struct drm_dp_sideband_msg_req_body * drivers/gpu/drm/drm_dp_mst_topology.c:627:48: note: expected 'struct drm_dp_sideband_msg_req_body *' but argument is of type 'struct drm_dp_sideband_msg_req_body *' 627 | struct drm_dp_sideband_msg_req_body *msg) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/drm_dp_mst_topology.c: At top level: drivers/gpu/drm/drm_dp_mst_topology.c:666:36: warning: 'struct drm_dp_sideband_msg_tx' declared inside parameter list will not be visible outside of this definition or declaration 666 | static int build_dpcd_write(struct drm_dp_sideband_msg_tx *msg, u8 port_num, u32 offset, u8 num_bytes, u8 *bytes) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/drm_dp_mst_topology.c: In function 'build_dpcd_write': .. vim +/DP_POWER_DOWN_PHY +296 drivers/gpu/drm/drm_dp_mst_topology.c ad7f8a1f9ced7f Dave Airlie 2014-06-05 197 ad7f8a1f9ced7f Dave Airlie 2014-06-05 198 static void drm_dp_encode_sideband_req(struct drm_dp_sideband_msg_req_body *req, ad7f8a1f9ced7f Dave Airlie 2014-06-05 199 struct drm_dp_sideband_msg_tx *raw) ad7f8a1f9ced7f Dave Airlie 2014-06-05 200 { ad7f8a1f9ced7f Dave Airlie 2014-06-05 201 int idx = 0; ad7f8a1f9ced7f Dave Airlie 2014-06-05 202 int i; ad7f8a1f9ced7f Dave Airlie 2014-06-05 203 u8 *buf = raw->msg; ad7f8a1f9ced7f Dave Airlie 2014-06-05 204 buf[idx++] = req->req_type & 0x7f; ad7f8a1f9ced7f Dave Airlie 2014-06-05 205 ad7f8a1f9ced7f Dave Airlie 2014-06-05 206 switch (req->req_type) { ad7f8a1f9ced7f Dave Airlie 2014-06-05 207 case DP_ENUM_PATH_RESOURCES: ad7f8a1f9ced7f Dave Airlie 2014-06-05 208 buf[idx] = (req->u.port_num.port_number & 0xf) << 4; ad7f8a1f9ced7f Dave Airlie 2014-06-05 209 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 210 break; ad7f8a1f9ced7f Dave Airlie 2014-06-05 211 case DP_ALLOCATE_PAYLOAD: ad7f8a1f9ced7f Dave Airlie 2014-06-05 212 buf[idx] = (req->u.allocate_payload.port_number & 0xf) << 4 | ad7f8a1f9ced7f Dave Airlie 2014-06-05 213 (req->u.allocate_payload.number_sdp_streams & 0xf); ad7f8a1f9ced7f Dave Airlie 2014-06-05 214 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 215 buf[idx] = (req->u.allocate_payload.vcpi & 0x7f); ad7f8a1f9ced7f Dave Airlie 2014-06-05 216 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 217 buf[idx] = (req->u.allocate_payload.pbn >> 8); ad7f8a1f9ced7f Dave Airlie 2014-06-05 218 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 219 buf[idx] = (req->u.allocate_payload.pbn & 0xff); ad7f8a1f9ced7f Dave Airlie 2014-06-05 220 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 221 for (i = 0; i < req->u.allocate_payload.number_sdp_streams / 2; i++) { ad7f8a1f9ced7f Dave Airlie 2014-06-05 222 buf[idx] = ((req->u.allocate_payload.sdp_stream_sink[i * 2] & 0xf) << 4) | ad7f8a1f9ced7f Dave Airlie 2014-06-05 223 (req->u.allocate_payload.sdp_stream_sink[i * 2 + 1] & 0xf); ad7f8a1f9ced7f Dave Airlie 2014-06-05 224 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 225 } ad7f8a1f9ced7f Dave Airlie 2014-06-05 226 if (req->u.allocate_payload.number_sdp_streams & 1) { ad7f8a1f9ced7f Dave Airlie 2014-06-05 227 i = req->u.allocate_payload.number_sdp_streams - 1; ad7f8a1f9ced7f Dave Airlie 2014-06-05 228 buf[idx] = (req->u.allocate_payload.sdp_stream_sink[i] & 0xf) << 4; ad7f8a1f9ced7f Dave Airlie 2014-06-05 229 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 230 } ad7f8a1f9ced7f Dave Airlie 2014-06-05 231 break; ad7f8a1f9ced7f Dave Airlie 2014-06-05 232 case DP_QUERY_PAYLOAD: ad7f8a1f9ced7f Dave Airlie 2014-06-05 233 buf[idx] = (req->u.query_payload.port_number & 0xf) << 4; ad7f8a1f9ced7f Dave Airlie 2014-06-05 234 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 235 buf[idx] = (req->u.query_payload.vcpi & 0x7f); ad7f8a1f9ced7f Dave Airlie 2014-06-05 236 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 237 break; ad7f8a1f9ced7f Dave Airlie 2014-06-05 238 case DP_REMOTE_DPCD_READ: ad7f8a1f9ced7f Dave Airlie 2014-06-05 239 buf[idx] = (req->u.dpcd_read.port_number & 0xf) << 4; ad7f8a1f9ced7f Dave Airlie 2014-06-05 240 buf[idx] |= ((req->u.dpcd_read.dpcd_address & 0xf0000) >> 16) & 0xf; ad7f8a1f9ced7f Dave Airlie 2014-06-05 241 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 242 buf[idx] = (req->u.dpcd_read.dpcd_address & 0xff00) >> 8; ad7f8a1f9ced7f Dave Airlie 2014-06-05 243 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 244 buf[idx] = (req->u.dpcd_read.dpcd_address & 0xff); ad7f8a1f9ced7f Dave Airlie 2014-06-05 245 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 246 buf[idx] = (req->u.dpcd_read.num_bytes); ad7f8a1f9ced7f Dave Airlie 2014-06-05 247 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 248 break; ad7f8a1f9ced7f Dave Airlie 2014-06-05 249 ad7f8a1f9ced7f Dave Airlie 2014-06-05 250 case DP_REMOTE_DPCD_WRITE: ad7f8a1f9ced7f Dave Airlie 2014-06-05 251 buf[idx] = (req->u.dpcd_write.port_number & 0xf) << 4; ad7f8a1f9ced7f Dave Airlie 2014-06-05 252 buf[idx] |= ((req->u.dpcd_write.dpcd_address & 0xf0000) >> 16) & 0xf; ad7f8a1f9ced7f Dave Airlie 2014-06-05 253 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 254 buf[idx] = (req->u.dpcd_write.dpcd_address & 0xff00) >> 8; ad7f8a1f9ced7f Dave Airlie 2014-06-05 255 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 256 buf[idx] = (req->u.dpcd_write.dpcd_address & 0xff); ad7f8a1f9ced7f Dave Airlie 2014-06-05 257 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 258 buf[idx] = (req->u.dpcd_write.num_bytes); ad7f8a1f9ced7f Dave Airlie 2014-06-05 259 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 260 memcpy(&buf[idx], req->u.dpcd_write.bytes, req->u.dpcd_write.num_bytes); ad7f8a1f9ced7f Dave Airlie 2014-06-05 261 idx += req->u.dpcd_write.num_bytes; ad7f8a1f9ced7f Dave Airlie 2014-06-05 262 break; ad7f8a1f9ced7f Dave Airlie 2014-06-05 263 case DP_REMOTE_I2C_READ: ad7f8a1f9ced7f Dave Airlie 2014-06-05 264 buf[idx] = (req->u.i2c_read.port_number & 0xf) << 4; ad7f8a1f9ced7f Dave Airlie 2014-06-05 265 buf[idx] |= (req->u.i2c_read.num_transactions & 0x3); ad7f8a1f9ced7f Dave Airlie 2014-06-05 266 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 267 for (i = 0; i < (req->u.i2c_read.num_transactions & 0x3); i++) { ad7f8a1f9ced7f Dave Airlie 2014-06-05 268 buf[idx] = req->u.i2c_read.transactions[i].i2c_dev_id & 0x7f; ad7f8a1f9ced7f Dave Airlie 2014-06-05 269 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 270 buf[idx] = req->u.i2c_read.transactions[i].num_bytes; ad7f8a1f9ced7f Dave Airlie 2014-06-05 271 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 272 memcpy(&buf[idx], req->u.i2c_read.transactions[i].bytes, req->u.i2c_read.transactions[i].num_bytes); ad7f8a1f9ced7f Dave Airlie 2014-06-05 273 idx += req->u.i2c_read.transactions[i].num_bytes; ad7f8a1f9ced7f Dave Airlie 2014-06-05 274 ba4c2a719ee123 Wayne Lin 2020-01-03 275 buf[idx] = (req->u.i2c_read.transactions[i].no_stop_bit & 0x1) << 4; ad7f8a1f9ced7f Dave Airlie 2014-06-05 276 buf[idx] |= (req->u.i2c_read.transactions[i].i2c_transaction_delay & 0xf); ad7f8a1f9ced7f Dave Airlie 2014-06-05 277 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 278 } ad7f8a1f9ced7f Dave Airlie 2014-06-05 279 buf[idx] = (req->u.i2c_read.read_i2c_device_id) & 0x7f; ad7f8a1f9ced7f Dave Airlie 2014-06-05 280 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 281 buf[idx] = (req->u.i2c_read.num_bytes_read); ad7f8a1f9ced7f Dave Airlie 2014-06-05 282 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 283 break; ad7f8a1f9ced7f Dave Airlie 2014-06-05 284 ad7f8a1f9ced7f Dave Airlie 2014-06-05 285 case DP_REMOTE_I2C_WRITE: ad7f8a1f9ced7f Dave Airlie 2014-06-05 286 buf[idx] = (req->u.i2c_write.port_number & 0xf) << 4; ad7f8a1f9ced7f Dave Airlie 2014-06-05 287 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 288 buf[idx] = (req->u.i2c_write.write_i2c_device_id) & 0x7f; ad7f8a1f9ced7f Dave Airlie 2014-06-05 289 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 290 buf[idx] = (req->u.i2c_write.num_bytes); ad7f8a1f9ced7f Dave Airlie 2014-06-05 291 idx++; ad7f8a1f9ced7f Dave Airlie 2014-06-05 292 memcpy(&buf[idx], req->u.i2c_write.bytes, req->u.i2c_write.num_bytes); ad7f8a1f9ced7f Dave Airlie 2014-06-05 293 idx += req->u.i2c_write.num_bytes; ad7f8a1f9ced7f Dave Airlie 2014-06-05 294 break; 0bb9c2b27f5e50 Dhinakaran Pandiyan 2017-09-06 295 0bb9c2b27f5e50 Dhinakaran Pandiyan 2017-09-06 @296 case DP_POWER_DOWN_PHY: 0bb9c2b27f5e50 Dhinakaran Pandiyan 2017-09-06 @297 case DP_POWER_UP_PHY: 0bb9c2b27f5e50 Dhinakaran Pandiyan 2017-09-06 298 buf[idx] = (req->u.port_num.port_number & 0xf) << 4; 0bb9c2b27f5e50 Dhinakaran Pandiyan 2017-09-06 299 idx++; 0bb9c2b27f5e50 Dhinakaran Pandiyan 2017-09-06 300 break; ad7f8a1f9ced7f Dave Airlie 2014-06-05 301 } ad7f8a1f9ced7f Dave Airlie 2014-06-05 302 raw->cur_len = idx; ad7f8a1f9ced7f Dave Airlie 2014-06-05 303 } ad7f8a1f9ced7f Dave Airlie 2014-06-05 304 :::::: The code at line 296 was first introduced by commit :::::: 0bb9c2b27f5e503e683ad27a0f0a6286f5b5da34 drm/dp/mst: Sideband message transaction to power up/down nodes :::::: TO: Dhinakaran Pandiyan :::::: CC: Ville Syrjälä --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org