Lines Matching refs:raw
333 struct drm_dp_sideband_msg_tx *raw) in drm_dp_encode_sideband_req() argument
337 u8 *buf = raw->msg; in drm_dp_encode_sideband_req()
449 raw->cur_len = idx; in drm_dp_encode_sideband_req()
455 drm_dp_decode_sideband_req(const struct drm_dp_sideband_msg_tx *raw, in drm_dp_decode_sideband_req() argument
458 const u8 *buf = raw->msg; in drm_dp_decode_sideband_req()
732 struct drm_dp_sideband_msg_tx *raw) in drm_dp_encode_sideband_reply() argument
735 u8 *buf = raw->msg; in drm_dp_encode_sideband_reply()
739 raw->cur_len = idx; in drm_dp_encode_sideband_reply()
797 struct drm_dp_sideband_msg_rx *raw, in drm_dp_sideband_parse_link_address() argument
803 memcpy(repmsg->u.link_addr.guid, &raw->msg[idx], 16); in drm_dp_sideband_parse_link_address()
805 repmsg->u.link_addr.nports = raw->msg[idx] & 0xf; in drm_dp_sideband_parse_link_address()
807 if (idx > raw->curlen) in drm_dp_sideband_parse_link_address()
810 if (raw->msg[idx] & 0x80) in drm_dp_sideband_parse_link_address()
813 repmsg->u.link_addr.ports[i].peer_device_type = (raw->msg[idx] >> 4) & 0x7; in drm_dp_sideband_parse_link_address()
814 repmsg->u.link_addr.ports[i].port_number = (raw->msg[idx] & 0xf); in drm_dp_sideband_parse_link_address()
817 if (idx > raw->curlen) in drm_dp_sideband_parse_link_address()
819 repmsg->u.link_addr.ports[i].mcs = (raw->msg[idx] >> 7) & 0x1; in drm_dp_sideband_parse_link_address()
820 repmsg->u.link_addr.ports[i].ddps = (raw->msg[idx] >> 6) & 0x1; in drm_dp_sideband_parse_link_address()
822 repmsg->u.link_addr.ports[i].legacy_device_plug_status = (raw->msg[idx] >> 5) & 0x1; in drm_dp_sideband_parse_link_address()
824 if (idx > raw->curlen) in drm_dp_sideband_parse_link_address()
827 repmsg->u.link_addr.ports[i].dpcd_revision = (raw->msg[idx]); in drm_dp_sideband_parse_link_address()
829 if (idx > raw->curlen) in drm_dp_sideband_parse_link_address()
831 memcpy(repmsg->u.link_addr.ports[i].peer_guid, &raw->msg[idx], 16); in drm_dp_sideband_parse_link_address()
833 if (idx > raw->curlen) in drm_dp_sideband_parse_link_address()
835 repmsg->u.link_addr.ports[i].num_sdp_streams = (raw->msg[idx] >> 4) & 0xf; in drm_dp_sideband_parse_link_address()
836 repmsg->u.link_addr.ports[i].num_sdp_stream_sinks = (raw->msg[idx] & 0xf); in drm_dp_sideband_parse_link_address()
840 if (idx > raw->curlen) in drm_dp_sideband_parse_link_address()
846 DRM_DEBUG_KMS("link address reply parse length fail %d %d\n", idx, raw->curlen); in drm_dp_sideband_parse_link_address()
850 static bool drm_dp_sideband_parse_remote_dpcd_read(struct drm_dp_sideband_msg_rx *raw, in drm_dp_sideband_parse_remote_dpcd_read() argument
855 repmsg->u.remote_dpcd_read_ack.port_number = raw->msg[idx] & 0xf; in drm_dp_sideband_parse_remote_dpcd_read()
857 if (idx > raw->curlen) in drm_dp_sideband_parse_remote_dpcd_read()
859 repmsg->u.remote_dpcd_read_ack.num_bytes = raw->msg[idx]; in drm_dp_sideband_parse_remote_dpcd_read()
861 if (idx > raw->curlen) in drm_dp_sideband_parse_remote_dpcd_read()
864 …memcpy(repmsg->u.remote_dpcd_read_ack.bytes, &raw->msg[idx], repmsg->u.remote_dpcd_read_ack.num_by… in drm_dp_sideband_parse_remote_dpcd_read()
867 DRM_DEBUG_KMS("link address reply parse length fail %d %d\n", idx, raw->curlen); in drm_dp_sideband_parse_remote_dpcd_read()
871 static bool drm_dp_sideband_parse_remote_dpcd_write(struct drm_dp_sideband_msg_rx *raw, in drm_dp_sideband_parse_remote_dpcd_write() argument
876 repmsg->u.remote_dpcd_write_ack.port_number = raw->msg[idx] & 0xf; in drm_dp_sideband_parse_remote_dpcd_write()
878 if (idx > raw->curlen) in drm_dp_sideband_parse_remote_dpcd_write()
882 DRM_DEBUG_KMS("parse length fail %d %d\n", idx, raw->curlen); in drm_dp_sideband_parse_remote_dpcd_write()
886 static bool drm_dp_sideband_parse_remote_i2c_read_ack(struct drm_dp_sideband_msg_rx *raw, in drm_dp_sideband_parse_remote_i2c_read_ack() argument
891 repmsg->u.remote_i2c_read_ack.port_number = (raw->msg[idx] & 0xf); in drm_dp_sideband_parse_remote_i2c_read_ack()
893 if (idx > raw->curlen) in drm_dp_sideband_parse_remote_i2c_read_ack()
895 repmsg->u.remote_i2c_read_ack.num_bytes = raw->msg[idx]; in drm_dp_sideband_parse_remote_i2c_read_ack()
898 …memcpy(repmsg->u.remote_i2c_read_ack.bytes, &raw->msg[idx], repmsg->u.remote_i2c_read_ack.num_byte… in drm_dp_sideband_parse_remote_i2c_read_ack()
901 DRM_DEBUG_KMS("remote i2c reply parse length fail %d %d\n", idx, raw->curlen); in drm_dp_sideband_parse_remote_i2c_read_ack()
905 static bool drm_dp_sideband_parse_enum_path_resources_ack(struct drm_dp_sideband_msg_rx *raw, in drm_dp_sideband_parse_enum_path_resources_ack() argument
910 repmsg->u.path_resources.port_number = (raw->msg[idx] >> 4) & 0xf; in drm_dp_sideband_parse_enum_path_resources_ack()
911 repmsg->u.path_resources.fec_capable = raw->msg[idx] & 0x1; in drm_dp_sideband_parse_enum_path_resources_ack()
913 if (idx > raw->curlen) in drm_dp_sideband_parse_enum_path_resources_ack()
915 repmsg->u.path_resources.full_payload_bw_number = (raw->msg[idx] << 8) | (raw->msg[idx+1]); in drm_dp_sideband_parse_enum_path_resources_ack()
917 if (idx > raw->curlen) in drm_dp_sideband_parse_enum_path_resources_ack()
919 repmsg->u.path_resources.avail_payload_bw_number = (raw->msg[idx] << 8) | (raw->msg[idx+1]); in drm_dp_sideband_parse_enum_path_resources_ack()
921 if (idx > raw->curlen) in drm_dp_sideband_parse_enum_path_resources_ack()
925 DRM_DEBUG_KMS("enum resource parse length fail %d %d\n", idx, raw->curlen); in drm_dp_sideband_parse_enum_path_resources_ack()
929 static bool drm_dp_sideband_parse_allocate_payload_ack(struct drm_dp_sideband_msg_rx *raw, in drm_dp_sideband_parse_allocate_payload_ack() argument
934 repmsg->u.allocate_payload.port_number = (raw->msg[idx] >> 4) & 0xf; in drm_dp_sideband_parse_allocate_payload_ack()
936 if (idx > raw->curlen) in drm_dp_sideband_parse_allocate_payload_ack()
938 repmsg->u.allocate_payload.vcpi = raw->msg[idx]; in drm_dp_sideband_parse_allocate_payload_ack()
940 if (idx > raw->curlen) in drm_dp_sideband_parse_allocate_payload_ack()
942 repmsg->u.allocate_payload.allocated_pbn = (raw->msg[idx] << 8) | (raw->msg[idx+1]); in drm_dp_sideband_parse_allocate_payload_ack()
944 if (idx > raw->curlen) in drm_dp_sideband_parse_allocate_payload_ack()
948 DRM_DEBUG_KMS("allocate payload parse length fail %d %d\n", idx, raw->curlen); in drm_dp_sideband_parse_allocate_payload_ack()
952 static bool drm_dp_sideband_parse_query_payload_ack(struct drm_dp_sideband_msg_rx *raw, in drm_dp_sideband_parse_query_payload_ack() argument
957 repmsg->u.query_payload.port_number = (raw->msg[idx] >> 4) & 0xf; in drm_dp_sideband_parse_query_payload_ack()
959 if (idx > raw->curlen) in drm_dp_sideband_parse_query_payload_ack()
961 repmsg->u.query_payload.allocated_pbn = (raw->msg[idx] << 8) | (raw->msg[idx + 1]); in drm_dp_sideband_parse_query_payload_ack()
963 if (idx > raw->curlen) in drm_dp_sideband_parse_query_payload_ack()
967 DRM_DEBUG_KMS("query payload parse length fail %d %d\n", idx, raw->curlen); in drm_dp_sideband_parse_query_payload_ack()
971 static bool drm_dp_sideband_parse_power_updown_phy_ack(struct drm_dp_sideband_msg_rx *raw, in drm_dp_sideband_parse_power_updown_phy_ack() argument
976 repmsg->u.port_number.port_number = (raw->msg[idx] >> 4) & 0xf; in drm_dp_sideband_parse_power_updown_phy_ack()
978 if (idx > raw->curlen) { in drm_dp_sideband_parse_power_updown_phy_ack()
980 idx, raw->curlen); in drm_dp_sideband_parse_power_updown_phy_ack()
988 struct drm_dp_sideband_msg_rx *raw, in drm_dp_sideband_parse_query_stream_enc_status() argument
995 reply->stream_id = raw->msg[3]; in drm_dp_sideband_parse_query_stream_enc_status()
997 reply->reply_signed = raw->msg[2] & BIT(0); in drm_dp_sideband_parse_query_stream_enc_status()
1007 reply->hdcp_1x_device_present = raw->msg[2] & BIT(4); in drm_dp_sideband_parse_query_stream_enc_status()
1008 reply->hdcp_2x_device_present = raw->msg[2] & BIT(3); in drm_dp_sideband_parse_query_stream_enc_status()
1010 reply->query_capable_device_present = raw->msg[2] & BIT(5); in drm_dp_sideband_parse_query_stream_enc_status()
1011 reply->legacy_device_present = raw->msg[2] & BIT(6); in drm_dp_sideband_parse_query_stream_enc_status()
1012 reply->unauthorizable_device_present = raw->msg[2] & BIT(7); in drm_dp_sideband_parse_query_stream_enc_status()
1014 reply->auth_completed = !!(raw->msg[1] & BIT(3)); in drm_dp_sideband_parse_query_stream_enc_status()
1015 reply->encryption_enabled = !!(raw->msg[1] & BIT(4)); in drm_dp_sideband_parse_query_stream_enc_status()
1016 reply->repeater_present = !!(raw->msg[1] & BIT(5)); in drm_dp_sideband_parse_query_stream_enc_status()
1017 reply->state = (raw->msg[1] & GENMASK(7, 6)) >> 6; in drm_dp_sideband_parse_query_stream_enc_status()
1023 struct drm_dp_sideband_msg_rx *raw, in drm_dp_sideband_parse_reply() argument
1027 msg->reply_type = (raw->msg[0] & 0x80) >> 7; in drm_dp_sideband_parse_reply()
1028 msg->req_type = (raw->msg[0] & 0x7f); in drm_dp_sideband_parse_reply()
1031 memcpy(msg->u.nak.guid, &raw->msg[1], 16); in drm_dp_sideband_parse_reply()
1032 msg->u.nak.reason = raw->msg[17]; in drm_dp_sideband_parse_reply()
1033 msg->u.nak.nak_data = raw->msg[18]; in drm_dp_sideband_parse_reply()
1039 return drm_dp_sideband_parse_link_address(mgr, raw, msg); in drm_dp_sideband_parse_reply()
1041 return drm_dp_sideband_parse_query_payload_ack(raw, msg); in drm_dp_sideband_parse_reply()
1043 return drm_dp_sideband_parse_remote_dpcd_read(raw, msg); in drm_dp_sideband_parse_reply()
1045 return drm_dp_sideband_parse_remote_dpcd_write(raw, msg); in drm_dp_sideband_parse_reply()
1047 return drm_dp_sideband_parse_remote_i2c_read_ack(raw, msg); in drm_dp_sideband_parse_reply()
1051 return drm_dp_sideband_parse_enum_path_resources_ack(raw, msg); in drm_dp_sideband_parse_reply()
1053 return drm_dp_sideband_parse_allocate_payload_ack(raw, msg); in drm_dp_sideband_parse_reply()
1056 return drm_dp_sideband_parse_power_updown_phy_ack(raw, msg); in drm_dp_sideband_parse_reply()
1060 return drm_dp_sideband_parse_query_stream_enc_status(raw, msg); in drm_dp_sideband_parse_reply()
1070 struct drm_dp_sideband_msg_rx *raw, in drm_dp_sideband_parse_connection_status_notify() argument
1075 msg->u.conn_stat.port_number = (raw->msg[idx] & 0xf0) >> 4; in drm_dp_sideband_parse_connection_status_notify()
1077 if (idx > raw->curlen) in drm_dp_sideband_parse_connection_status_notify()
1080 memcpy(msg->u.conn_stat.guid, &raw->msg[idx], 16); in drm_dp_sideband_parse_connection_status_notify()
1082 if (idx > raw->curlen) in drm_dp_sideband_parse_connection_status_notify()
1085 msg->u.conn_stat.legacy_device_plug_status = (raw->msg[idx] >> 6) & 0x1; in drm_dp_sideband_parse_connection_status_notify()
1086 msg->u.conn_stat.displayport_device_plug_status = (raw->msg[idx] >> 5) & 0x1; in drm_dp_sideband_parse_connection_status_notify()
1087 msg->u.conn_stat.message_capability_status = (raw->msg[idx] >> 4) & 0x1; in drm_dp_sideband_parse_connection_status_notify()
1088 msg->u.conn_stat.input_port = (raw->msg[idx] >> 3) & 0x1; in drm_dp_sideband_parse_connection_status_notify()
1089 msg->u.conn_stat.peer_device_type = (raw->msg[idx] & 0x7); in drm_dp_sideband_parse_connection_status_notify()
1094 idx, raw->curlen); in drm_dp_sideband_parse_connection_status_notify()
1099 struct drm_dp_sideband_msg_rx *raw, in drm_dp_sideband_parse_resource_status_notify() argument
1104 msg->u.resource_stat.port_number = (raw->msg[idx] & 0xf0) >> 4; in drm_dp_sideband_parse_resource_status_notify()
1106 if (idx > raw->curlen) in drm_dp_sideband_parse_resource_status_notify()
1109 memcpy(msg->u.resource_stat.guid, &raw->msg[idx], 16); in drm_dp_sideband_parse_resource_status_notify()
1111 if (idx > raw->curlen) in drm_dp_sideband_parse_resource_status_notify()
1114 msg->u.resource_stat.available_pbn = (raw->msg[idx] << 8) | (raw->msg[idx + 1]); in drm_dp_sideband_parse_resource_status_notify()
1118 drm_dbg_kms(mgr->dev, "resource status reply parse length fail %d %d\n", idx, raw->curlen); in drm_dp_sideband_parse_resource_status_notify()
1123 struct drm_dp_sideband_msg_rx *raw, in drm_dp_sideband_parse_req() argument
1127 msg->req_type = (raw->msg[0] & 0x7f); in drm_dp_sideband_parse_req()
1131 return drm_dp_sideband_parse_connection_status_notify(mgr, raw, msg); in drm_dp_sideband_parse_req()
1133 return drm_dp_sideband_parse_resource_status_notify(mgr, raw, msg); in drm_dp_sideband_parse_req()