Lines Matching defs:raw

346 			   struct drm_dp_sideband_msg_tx *raw)
350 u8 *buf = raw->msg;
462 raw->cur_len = idx;
468 drm_dp_decode_sideband_req(const struct drm_dp_sideband_msg_tx *raw,
471 const u8 *buf = raw->msg;
745 struct drm_dp_sideband_msg_tx *raw)
748 u8 *buf = raw->msg;
752 raw->cur_len = idx;
810 struct drm_dp_sideband_msg_rx *raw,
816 import_guid(&repmsg->u.link_addr.guid, &raw->msg[idx]);
818 repmsg->u.link_addr.nports = raw->msg[idx] & 0xf;
820 if (idx > raw->curlen)
823 if (raw->msg[idx] & 0x80)
826 repmsg->u.link_addr.ports[i].peer_device_type = (raw->msg[idx] >> 4) & 0x7;
827 repmsg->u.link_addr.ports[i].port_number = (raw->msg[idx] & 0xf);
830 if (idx > raw->curlen)
832 repmsg->u.link_addr.ports[i].mcs = (raw->msg[idx] >> 7) & 0x1;
833 repmsg->u.link_addr.ports[i].ddps = (raw->msg[idx] >> 6) & 0x1;
835 repmsg->u.link_addr.ports[i].legacy_device_plug_status = (raw->msg[idx] >> 5) & 0x1;
837 if (idx > raw->curlen)
840 repmsg->u.link_addr.ports[i].dpcd_revision = (raw->msg[idx]);
842 if (idx > raw->curlen)
844 import_guid(&repmsg->u.link_addr.ports[i].peer_guid, &raw->msg[idx]);
846 if (idx > raw->curlen)
848 repmsg->u.link_addr.ports[i].num_sdp_streams = (raw->msg[idx] >> 4) & 0xf;
849 repmsg->u.link_addr.ports[i].num_sdp_stream_sinks = (raw->msg[idx] & 0xf);
853 if (idx > raw->curlen)
859 DRM_DEBUG_KMS("link address reply parse length fail %d %d\n", idx, raw->curlen);
863 static bool drm_dp_sideband_parse_remote_dpcd_read(struct drm_dp_sideband_msg_rx *raw,
868 repmsg->u.remote_dpcd_read_ack.port_number = raw->msg[idx] & 0xf;
870 if (idx > raw->curlen)
872 repmsg->u.remote_dpcd_read_ack.num_bytes = raw->msg[idx];
874 if (idx > raw->curlen)
877 memcpy(repmsg->u.remote_dpcd_read_ack.bytes, &raw->msg[idx], repmsg->u.remote_dpcd_read_ack.num_bytes);
880 DRM_DEBUG_KMS("link address reply parse length fail %d %d\n", idx, raw->curlen);
884 static bool drm_dp_sideband_parse_remote_dpcd_write(struct drm_dp_sideband_msg_rx *raw,
889 repmsg->u.remote_dpcd_write_ack.port_number = raw->msg[idx] & 0xf;
891 if (idx > raw->curlen)
895 DRM_DEBUG_KMS("parse length fail %d %d\n", idx, raw->curlen);
899 static bool drm_dp_sideband_parse_remote_i2c_read_ack(struct drm_dp_sideband_msg_rx *raw,
904 repmsg->u.remote_i2c_read_ack.port_number = (raw->msg[idx] & 0xf);
906 if (idx > raw->curlen)
908 repmsg->u.remote_i2c_read_ack.num_bytes = raw->msg[idx];
911 memcpy(repmsg->u.remote_i2c_read_ack.bytes, &raw->msg[idx], repmsg->u.remote_i2c_read_ack.num_bytes);
914 DRM_DEBUG_KMS("remote i2c reply parse length fail %d %d\n", idx, raw->curlen);
918 static bool drm_dp_sideband_parse_enum_path_resources_ack(struct drm_dp_sideband_msg_rx *raw,
923 repmsg->u.path_resources.port_number = (raw->msg[idx] >> 4) & 0xf;
924 repmsg->u.path_resources.fec_capable = raw->msg[idx] & 0x1;
926 if (idx > raw->curlen)
928 repmsg->u.path_resources.full_payload_bw_number = (raw->msg[idx] << 8) | (raw->msg[idx+1]);
930 if (idx > raw->curlen)
932 repmsg->u.path_resources.avail_payload_bw_number = (raw->msg[idx] << 8) | (raw->msg[idx+1]);
934 if (idx > raw->curlen)
938 DRM_DEBUG_KMS("enum resource parse length fail %d %d\n", idx, raw->curlen);
942 static bool drm_dp_sideband_parse_allocate_payload_ack(struct drm_dp_sideband_msg_rx *raw,
947 repmsg->u.allocate_payload.port_number = (raw->msg[idx] >> 4) & 0xf;
949 if (idx > raw->curlen)
951 repmsg->u.allocate_payload.vcpi = raw->msg[idx];
953 if (idx > raw->curlen)
955 repmsg->u.allocate_payload.allocated_pbn = (raw->msg[idx] << 8) | (raw->msg[idx+1]);
957 if (idx > raw->curlen)
961 DRM_DEBUG_KMS("allocate payload parse length fail %d %d\n", idx, raw->curlen);
965 static bool drm_dp_sideband_parse_query_payload_ack(struct drm_dp_sideband_msg_rx *raw,
970 repmsg->u.query_payload.port_number = (raw->msg[idx] >> 4) & 0xf;
972 if (idx > raw->curlen)
974 repmsg->u.query_payload.allocated_pbn = (raw->msg[idx] << 8) | (raw->msg[idx + 1]);
976 if (idx > raw->curlen)
980 DRM_DEBUG_KMS("query payload parse length fail %d %d\n", idx, raw->curlen);
984 static bool drm_dp_sideband_parse_power_updown_phy_ack(struct drm_dp_sideband_msg_rx *raw,
989 repmsg->u.port_number.port_number = (raw->msg[idx] >> 4) & 0xf;
991 if (idx > raw->curlen) {
993 idx, raw->curlen);
1001 struct drm_dp_sideband_msg_rx *raw,
1008 reply->stream_id = raw->msg[3];
1010 reply->reply_signed = raw->msg[2] & BIT(0);
1020 reply->hdcp_1x_device_present = raw->msg[2] & BIT(4);
1021 reply->hdcp_2x_device_present = raw->msg[2] & BIT(3);
1023 reply->query_capable_device_present = raw->msg[2] & BIT(5);
1024 reply->legacy_device_present = raw->msg[2] & BIT(6);
1025 reply->unauthorizable_device_present = raw->msg[2] & BIT(7);
1027 reply->auth_completed = !!(raw->msg[1] & BIT(3));
1028 reply->encryption_enabled = !!(raw->msg[1] & BIT(4));
1029 reply->repeater_present = !!(raw->msg[1] & BIT(5));
1030 reply->state = (raw->msg[1] & GENMASK(7, 6)) >> 6;
1036 struct drm_dp_sideband_msg_rx *raw,
1040 msg->reply_type = (raw->msg[0] & 0x80) >> 7;
1041 msg->req_type = (raw->msg[0] & 0x7f);
1044 import_guid(&msg->u.nak.guid, &raw->msg[1]);
1045 msg->u.nak.reason = raw->msg[17];
1046 msg->u.nak.nak_data = raw->msg[18];
1052 return drm_dp_sideband_parse_link_address(mgr, raw, msg);
1054 return drm_dp_sideband_parse_query_payload_ack(raw, msg);
1056 return drm_dp_sideband_parse_remote_dpcd_read(raw, msg);
1058 return drm_dp_sideband_parse_remote_dpcd_write(raw, msg);
1060 return drm_dp_sideband_parse_remote_i2c_read_ack(raw, msg);
1064 return drm_dp_sideband_parse_enum_path_resources_ack(raw, msg);
1066 return drm_dp_sideband_parse_allocate_payload_ack(raw, msg);
1069 return drm_dp_sideband_parse_power_updown_phy_ack(raw, msg);
1073 return drm_dp_sideband_parse_query_stream_enc_status(raw, msg);
1083 struct drm_dp_sideband_msg_rx *raw,
1088 msg->u.conn_stat.port_number = (raw->msg[idx] & 0xf0) >> 4;
1090 if (idx > raw->curlen)
1093 import_guid(&msg->u.conn_stat.guid, &raw->msg[idx]);
1095 if (idx > raw->curlen)
1098 msg->u.conn_stat.legacy_device_plug_status = (raw->msg[idx] >> 6) & 0x1;
1099 msg->u.conn_stat.displayport_device_plug_status = (raw->msg[idx] >> 5) & 0x1;
1100 msg->u.conn_stat.message_capability_status = (raw->msg[idx] >> 4) & 0x1;
1101 msg->u.conn_stat.input_port = (raw->msg[idx] >> 3) & 0x1;
1102 msg->u.conn_stat.peer_device_type = (raw->msg[idx] & 0x7);
1107 idx, raw->curlen);
1112 struct drm_dp_sideband_msg_rx *raw,
1117 msg->u.resource_stat.port_number = (raw->msg[idx] & 0xf0) >> 4;
1119 if (idx > raw->curlen)
1122 import_guid(&msg->u.resource_stat.guid, &raw->msg[idx]);
1124 if (idx > raw->curlen)
1127 msg->u.resource_stat.available_pbn = (raw->msg[idx] << 8) | (raw->msg[idx + 1]);
1131 drm_dbg_kms(mgr->dev, "resource status reply parse length fail %d %d\n", idx, raw->curlen);
1136 struct drm_dp_sideband_msg_rx *raw,
1140 msg->req_type = (raw->msg[0] & 0x7f);
1144 return drm_dp_sideband_parse_connection_status_notify(mgr, raw, msg);
1146 return drm_dp_sideband_parse_resource_status_notify(mgr, raw, msg);