0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 #ifndef MODULES_HDCP_HDCP_PSP_H_
0027 #define MODULES_HDCP_HDCP_PSP_H_
0028
0029
0030
0031
0032
0033 enum bgd_security_hdcp_encryption_level {
0034 HDCP_ENCRYPTION_LEVEL__INVALID = 0,
0035 HDCP_ENCRYPTION_LEVEL__OFF,
0036 HDCP_ENCRYPTION_LEVEL__ON
0037 };
0038
0039 enum bgd_security_hdcp2_content_type {
0040 HDCP2_CONTENT_TYPE__INVALID = 0,
0041 HDCP2_CONTENT_TYPE__TYPE0,
0042 HDCP2_CONTENT_TYPE__TYPE1
0043 };
0044 enum ta_dtm_command {
0045 TA_DTM_COMMAND__UNUSED_1 = 1,
0046 TA_DTM_COMMAND__TOPOLOGY_UPDATE_V2,
0047 TA_DTM_COMMAND__TOPOLOGY_ASSR_ENABLE,
0048 TA_DTM_COMMAND__TOPOLOGY_UPDATE_V3
0049 };
0050
0051
0052
0053
0054 enum ta_dtm_status {
0055 TA_DTM_STATUS__SUCCESS = 0x00,
0056 TA_DTM_STATUS__GENERIC_FAILURE = 0x01,
0057 TA_DTM_STATUS__INVALID_PARAMETER = 0x02,
0058 TA_DTM_STATUS__NULL_POINTER = 0x3
0059 };
0060
0061
0062
0063
0064
0065
0066 enum ta_dtm_hdcp_version_max_supported {
0067 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__NONE = 0,
0068 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__1_x = 10,
0069 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__2_0 = 20,
0070 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__2_1 = 21,
0071 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__2_2 = 22,
0072 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__2_3 = 23
0073 };
0074
0075 struct ta_dtm_topology_update_input_v2 {
0076
0077
0078 uint32_t display_handle;
0079 uint32_t is_active;
0080 uint32_t is_miracast;
0081 uint32_t controller;
0082 uint32_t ddc_line;
0083 uint32_t dig_be;
0084 uint32_t dig_fe;
0085 uint32_t dp_mst_vcid;
0086 uint32_t is_assr;
0087 uint32_t max_hdcp_supported_version;
0088 };
0089
0090
0091
0092 enum ta_dtm_encoder_type {
0093 TA_DTM_ENCODER_TYPE__INVALID = 0,
0094 TA_DTM_ENCODER_TYPE__DIG = 0x10
0095 };
0096
0097
0098
0099
0100 typedef enum {
0101 TA_DTM_DIO_OUTPUT_TYPE__INVALID,
0102 TA_DTM_DIO_OUTPUT_TYPE__DIRECT,
0103 TA_DTM_DIO_OUTPUT_TYPE__DPIA
0104 } ta_dtm_dio_output_type;
0105
0106 struct ta_dtm_topology_update_input_v3 {
0107
0108
0109
0110 uint32_t display_handle;
0111 uint32_t is_active;
0112 uint32_t is_miracast;
0113 uint32_t controller;
0114 uint32_t ddc_line;
0115 uint32_t link_enc;
0116 uint32_t stream_enc;
0117 uint32_t dp_mst_vcid;
0118 uint32_t is_assr;
0119 uint32_t max_hdcp_supported_version;
0120 enum ta_dtm_encoder_type encoder_type;
0121 uint32_t phy_id;
0122 uint32_t link_hdcp_cap;
0123 ta_dtm_dio_output_type dio_output_type;
0124 uint32_t dio_output_id;
0125 };
0126
0127 struct ta_dtm_topology_assr_enable {
0128 uint32_t display_topology_dig_be_index;
0129 };
0130
0131
0132
0133
0134
0135
0136
0137 union ta_dtm_cmd_input {
0138 struct ta_dtm_topology_update_input_v2 topology_update_v2;
0139 struct ta_dtm_topology_assr_enable topology_assr_enable;
0140 struct ta_dtm_topology_update_input_v3 topology_update_v3;
0141 };
0142
0143 union ta_dtm_cmd_output {
0144 uint32_t reserved;
0145 };
0146
0147 struct ta_dtm_shared_memory {
0148 uint32_t cmd_id;
0149 uint32_t resp_id;
0150 enum ta_dtm_status dtm_status;
0151 uint32_t reserved;
0152 union ta_dtm_cmd_input dtm_in_message;
0153 union ta_dtm_cmd_output dtm_out_message;
0154 };
0155
0156 int psp_cmd_submit_buf(struct psp_context *psp, struct amdgpu_firmware_info *ucode, struct psp_gfx_cmd_resp *cmd,
0157 uint64_t fence_mc_addr);
0158
0159 enum { PSP_HDCP_SRM_FIRST_GEN_MAX_SIZE = 5120 };
0160
0161 enum ta_hdcp_command {
0162 TA_HDCP_COMMAND__INITIALIZE,
0163 TA_HDCP_COMMAND__HDCP1_CREATE_SESSION,
0164 TA_HDCP_COMMAND__HDCP1_DESTROY_SESSION,
0165 TA_HDCP_COMMAND__HDCP1_FIRST_PART_AUTHENTICATION,
0166 TA_HDCP_COMMAND__HDCP1_SECOND_PART_AUTHENTICATION,
0167 TA_HDCP_COMMAND__HDCP1_ENABLE_ENCRYPTION,
0168 TA_HDCP_COMMAND__HDCP1_ENABLE_DP_STREAM_ENCRYPTION,
0169 TA_HDCP_COMMAND__HDCP1_GET_ENCRYPTION_STATUS,
0170 TA_HDCP_COMMAND__UNUSED_1,
0171 TA_HDCP_COMMAND__HDCP2_DESTROY_SESSION,
0172 TA_HDCP_COMMAND__UNUSED_2,
0173 TA_HDCP_COMMAND__HDCP2_SET_ENCRYPTION,
0174 TA_HDCP_COMMAND__HDCP2_GET_ENCRYPTION_STATUS,
0175 TA_HDCP_COMMAND__UNUSED_3,
0176 TA_HDCP_COMMAND__HDCP2_CREATE_SESSION_V2,
0177 TA_HDCP_COMMAND__HDCP2_PREPARE_PROCESS_AUTHENTICATION_MSG_V2,
0178 TA_HDCP_COMMAND__HDCP2_ENABLE_DP_STREAM_ENCRYPTION,
0179 TA_HDCP_COMMAND__HDCP_DESTROY_ALL_SESSIONS,
0180 TA_HDCP_COMMAND__HDCP_SET_SRM,
0181 TA_HDCP_COMMAND__HDCP_GET_SRM
0182 };
0183
0184 enum ta_hdcp2_msg_id {
0185 TA_HDCP_HDCP2_MSG_ID__NULL_MESSAGE = 1,
0186 TA_HDCP_HDCP2_MSG_ID__AKE_INIT = 2,
0187 TA_HDCP_HDCP2_MSG_ID__AKE_SEND_CERT = 3,
0188 TA_HDCP_HDCP2_MSG_ID__AKE_NO_STORED_KM = 4,
0189 TA_HDCP_HDCP2_MSG_ID__AKE_STORED_KM = 5,
0190 TA_HDCP_HDCP2_MSG_ID__AKE_SEND_RRX = 6,
0191 TA_HDCP_HDCP2_MSG_ID__AKE_SEND_H_PRIME = 7,
0192 TA_HDCP_HDCP2_MSG_ID__AKE_SEND_PAIRING_INFO = 8,
0193 TA_HDCP_HDCP2_MSG_ID__LC_INIT = 9,
0194 TA_HDCP_HDCP2_MSG_ID__LC_SEND_L_PRIME = 10,
0195 TA_HDCP_HDCP2_MSG_ID__SKE_SEND_EKS = 11,
0196 TA_HDCP_HDCP2_MSG_ID__REPEATERAUTH_SEND_RECEIVERID_LIST = 12,
0197 TA_HDCP_HDCP2_MSG_ID__RTT_READY = 13,
0198 TA_HDCP_HDCP2_MSG_ID__RTT_CHALLENGE = 14,
0199 TA_HDCP_HDCP2_MSG_ID__REPEATERAUTH_SEND_ACK = 15,
0200 TA_HDCP_HDCP2_MSG_ID__REPEATERAUTH_STREAM_MANAGE = 16,
0201 TA_HDCP_HDCP2_MSG_ID__REPEATERAUTH_STREAM_READY = 17,
0202 TA_HDCP_HDCP2_MSG_ID__RECEIVER_AUTH_STATUS = 18,
0203 TA_HDCP_HDCP2_MSG_ID__AKE_TRANSMITTER_INFO = 19,
0204 TA_HDCP_HDCP2_MSG_ID__AKE_RECEIVER_INFO = 20,
0205 TA_HDCP_HDCP2_MSG_ID__SIGNAL_CONTENT_STREAM_TYPE_DP = 129
0206 };
0207
0208 enum ta_hdcp2_hdcp2_msg_id_max_size {
0209 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__NULL_MESSAGE = 0,
0210 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_INIT = 12,
0211 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_CERT = 534,
0212 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_NO_STORED_KM = 129,
0213 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_STORED_KM = 33,
0214 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_RRX = 9,
0215 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_H_PRIME = 33,
0216 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_PAIRING_INFO = 17,
0217 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__LC_INIT = 9,
0218 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__LC_SEND_L_PRIME = 33,
0219 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__SKE_SEND_EKS = 25,
0220 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__REPEATERAUTH_SEND_RECEIVERID_LIST = 181,
0221 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__RTT_READY = 1,
0222 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__RTT_CHALLENGE = 17,
0223 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__REPEATERAUTH_SEND_RACK = 17,
0224 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__REPEATERAUTH_STREAM_MANAGE = 13,
0225 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__REPEATERAUTH_STREAM_READY = 33,
0226 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__RECEIVER_AUTH_STATUS = 4,
0227 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_TRANSMITTER_INFO = 6,
0228 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_RECEIVER_INFO = 6,
0229 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__SIGNAL_CONTENT_STREAM_TYPE_DP = 1
0230 };
0231
0232
0233
0234 #define TA_HDCP__INVALID_SESSION 0xFFFF
0235 #define TA_HDCP__HDCP1_AN_SIZE 8
0236 #define TA_HDCP__HDCP1_KSV_SIZE 5
0237 #define TA_HDCP__HDCP1_KSV_LIST_MAX_ENTRIES 127
0238 #define TA_HDCP__HDCP1_V_PRIME_SIZE 20
0239 #define TA_HDCP__HDCP2_TX_BUF_MAX_SIZE \
0240 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_NO_STORED_KM + TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_STORED_KM + 6
0241
0242
0243 #define TA_HDCP__HDCP2_RX_BUF_MAX_SIZE \
0244 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_CERT + TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_RECEIVER_INFO + 4
0245
0246 enum ta_hdcp_status {
0247 TA_HDCP_STATUS__SUCCESS = 0x00,
0248 TA_HDCP_STATUS__GENERIC_FAILURE = 0x01,
0249 TA_HDCP_STATUS__NULL_POINTER = 0x02,
0250 TA_HDCP_STATUS__FAILED_ALLOCATING_SESSION = 0x03,
0251 TA_HDCP_STATUS__FAILED_SETUP_TX = 0x04,
0252 TA_HDCP_STATUS__INVALID_PARAMETER = 0x05,
0253 TA_HDCP_STATUS__VHX_ERROR = 0x06,
0254 TA_HDCP_STATUS__SESSION_NOT_CLOSED_PROPERLY = 0x07,
0255 TA_HDCP_STATUS__SRM_FAILURE = 0x08,
0256 TA_HDCP_STATUS__MST_AUTHENTICATED_ALREADY_STARTED = 0x09,
0257 TA_HDCP_STATUS__AKE_SEND_CERT_FAILURE = 0x0A,
0258 TA_HDCP_STATUS__AKE_NO_STORED_KM_FAILURE = 0x0B,
0259 TA_HDCP_STATUS__AKE_SEND_HPRIME_FAILURE = 0x0C,
0260 TA_HDCP_STATUS__LC_SEND_LPRIME_FAILURE = 0x0D,
0261 TA_HDCP_STATUS__SKE_SEND_EKS_FAILURE = 0x0E,
0262 TA_HDCP_STATUS__REPAUTH_SEND_RXIDLIST_FAILURE = 0x0F,
0263 TA_HDCP_STATUS__REPAUTH_STREAM_READY_FAILURE = 0x10,
0264 TA_HDCP_STATUS__ASD_GENERIC_FAILURE = 0x11,
0265 TA_HDCP_STATUS__UNWRAP_SECRET_FAILURE = 0x12,
0266 TA_HDCP_STATUS__ENABLE_ENCR_FAILURE = 0x13,
0267 TA_HDCP_STATUS__DISABLE_ENCR_FAILURE = 0x14,
0268 TA_HDCP_STATUS__NOT_ENOUGH_MEMORY_FAILURE = 0x15,
0269 TA_HDCP_STATUS__UNKNOWN_MESSAGE = 0x16,
0270 TA_HDCP_STATUS__TOO_MANY_STREAM = 0x17
0271 };
0272
0273 enum ta_hdcp_authentication_status {
0274 TA_HDCP_AUTHENTICATION_STATUS__NOT_STARTED = 0x00,
0275 TA_HDCP_AUTHENTICATION_STATUS__HDCP1_FIRST_PART_FAILED = 0x01,
0276 TA_HDCP_AUTHENTICATION_STATUS__HDCP1_FIRST_PART_COMPLETE = 0x02,
0277 TA_HDCP_AUTHENTICATION_STATUS__HDCP1_SECOND_PART_FAILED = 0x03,
0278 TA_HDCP_AUTHENTICATION_STATUS__HDCP1_AUTHENTICATED = 0x04,
0279 TA_HDCP_AUTHENTICATION_STATUS__HDCP22_AUTHENTICATION_PENDING = 0x06,
0280 TA_HDCP_AUTHENTICATION_STATUS__HDCP22_AUTHENTICATION_FAILED = 0x07,
0281 TA_HDCP_AUTHENTICATION_STATUS__HDCP22_AUTHENTICATED = 0x08,
0282 TA_HDCP_AUTHENTICATION_STATUS__HDCP1_KSV_VALIDATION_FAILED = 0x09,
0283 TA_HDCP_AUTHENTICATION_STATUS__HDCP1_KSV_REVOKED = 0x0A
0284 };
0285
0286 enum ta_hdcp2_msg_authentication_status {
0287 TA_HDCP2_MSG_AUTHENTICATION_STATUS__SUCCESS = 0,
0288 TA_HDCP2_MSG_AUTHENTICATION_STATUS__KM_NOT_AVAILABLE,
0289 TA_HDCP2_MSG_AUTHENTICATION_STATUS__UNUSED,
0290 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID = 100,
0291 TA_HDCP2_MSG_AUTHENTICATION_STATUS__NOT_ENOUGH_MEMORY,
0292 TA_HDCP2_MSG_AUTHENTICATION_STATUS__NOT_EXPECTED_MSG,
0293 TA_HDCP2_MSG_AUTHENTICATION_STATUS__SIGNATURE_CERTIFICAT_ERROR,
0294 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INCORRECT_HDCP_VERSION,
0295 TA_HDCP2_MSG_AUTHENTICATION_STATUS__UNKNOWN_MESSAGE,
0296 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID_HMAC,
0297 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID_TOPOLOGY,
0298 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID_SEQ_NUM,
0299 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID_SIZE,
0300 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID_LENGTH,
0301 TA_HDCP2_MSG_AUTHENTICATION_STATUS__REAUTH_REQUEST,
0302 TA_HDCP2_MSG_AUTHENTICATION_STATUS__RECEIVERID_REVOKED
0303 };
0304
0305 enum ta_hdcp_content_type {
0306 TA_HDCP2_CONTENT_TYPE__TYPE0 = 1,
0307 TA_HDCP2_CONTENT_TYPE__TYPE1,
0308 };
0309
0310 enum ta_hdcp_content_type_negotiation_type {
0311 TA_HDCP2_CONTENT_TYPE_NEGOTIATION_TYPE__FORCE_TYPE0 = 1,
0312 TA_HDCP2_CONTENT_TYPE_NEGOTIATION_TYPE__FORCE_TYPE1,
0313 TA_HDCP2_CONTENT_TYPE_NEGOTIATION_TYPE__MAX_SUPPORTED
0314 };
0315
0316 enum ta_hdcp2_version {
0317 TA_HDCP2_VERSION_UNKNOWN = 0,
0318 TA_HDCP2_VERSION_2_0 = 20,
0319 TA_HDCP2_VERSION_2_1 = 21,
0320 TA_HDCP2_VERSION_2_2 = 22,
0321 TA_HDCP2_VERSION_2_3 = 23,
0322 };
0323
0324
0325
0326 struct ta_hdcp_cmd_hdcp1_create_session_input {
0327 uint8_t display_handle;
0328 };
0329
0330 struct ta_hdcp_cmd_hdcp1_create_session_output {
0331 uint32_t session_handle;
0332 uint8_t an_primary[TA_HDCP__HDCP1_AN_SIZE];
0333 uint8_t aksv_primary[TA_HDCP__HDCP1_KSV_SIZE];
0334 uint8_t ainfo_primary;
0335 uint8_t an_secondary[TA_HDCP__HDCP1_AN_SIZE];
0336 uint8_t aksv_secondary[TA_HDCP__HDCP1_KSV_SIZE];
0337 uint8_t ainfo_secondary;
0338 };
0339
0340 struct ta_hdcp_cmd_hdcp1_destroy_session_input {
0341 uint32_t session_handle;
0342 };
0343
0344 struct ta_hdcp_cmd_hdcp1_first_part_authentication_input {
0345 uint32_t session_handle;
0346 uint8_t bksv_primary[TA_HDCP__HDCP1_KSV_SIZE];
0347 uint8_t bksv_secondary[TA_HDCP__HDCP1_KSV_SIZE];
0348 uint8_t bcaps;
0349 uint16_t r0_prime_primary;
0350 uint16_t r0_prime_secondary;
0351 };
0352
0353 struct ta_hdcp_cmd_hdcp1_first_part_authentication_output {
0354 enum ta_hdcp_authentication_status authentication_status;
0355 };
0356
0357 struct ta_hdcp_cmd_hdcp1_second_part_authentication_input {
0358 uint32_t session_handle;
0359 uint16_t bstatus_binfo;
0360 uint8_t ksv_list[TA_HDCP__HDCP1_KSV_LIST_MAX_ENTRIES][TA_HDCP__HDCP1_KSV_SIZE];
0361 uint32_t ksv_list_size;
0362 uint8_t pj_prime;
0363 uint8_t v_prime[TA_HDCP__HDCP1_V_PRIME_SIZE];
0364 };
0365
0366 struct ta_hdcp_cmd_hdcp1_second_part_authentication_output {
0367 enum ta_hdcp_authentication_status authentication_status;
0368 };
0369
0370 struct ta_hdcp_cmd_hdcp1_enable_encryption_input {
0371 uint32_t session_handle;
0372 };
0373
0374 struct ta_hdcp_cmd_hdcp1_enable_dp_stream_encryption_input {
0375 uint32_t session_handle;
0376 uint32_t display_handle;
0377 };
0378
0379 struct ta_hdcp_cmd_hdcp1_get_encryption_status_input {
0380 uint32_t session_handle;
0381 };
0382
0383 struct ta_hdcp_cmd_hdcp1_get_encryption_status_output {
0384 uint32_t protection_level;
0385 };
0386
0387 struct ta_hdcp_cmd_hdcp2_create_session_input_v2 {
0388 uint32_t display_handle;
0389 enum ta_hdcp_content_type_negotiation_type negotiate_content_type;
0390 };
0391
0392 struct ta_hdcp_cmd_hdcp2_create_session_output_v2 {
0393 uint32_t session_handle;
0394 };
0395
0396 struct ta_hdcp_cmd_hdcp2_destroy_session_input {
0397 uint32_t session_handle;
0398 };
0399
0400 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 {
0401 enum ta_hdcp2_msg_id msg_id;
0402 uint32_t msg_size;
0403 };
0404
0405 struct ta_hdcp_cmd_hdcp2_process_authentication_message_input_v2 {
0406 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 msg1_desc;
0407 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 msg2_desc;
0408 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 msg3_desc;
0409 uint8_t receiver_message[TA_HDCP__HDCP2_RX_BUF_MAX_SIZE];
0410 };
0411
0412 struct ta_hdcp_cmd_hdcp2_process_authentication_message_output_v2 {
0413 uint32_t hdcp_version;
0414 uint32_t is_km_stored;
0415 uint32_t is_locality_precompute_support;
0416 uint32_t is_repeater;
0417 enum ta_hdcp2_msg_authentication_status msg1_status;
0418 enum ta_hdcp2_msg_authentication_status msg2_status;
0419 enum ta_hdcp2_msg_authentication_status msg3_status;
0420 };
0421
0422 struct ta_hdcp_cmd_hdcp2_prepare_authentication_message_input_v2 {
0423 enum ta_hdcp2_msg_id msg1_id;
0424 enum ta_hdcp2_msg_id msg2_id;
0425 };
0426
0427 struct ta_hdcp_cmd_hdcp2_prepare_authentication_message_output_v2 {
0428 enum ta_hdcp2_msg_authentication_status msg1_status;
0429 enum ta_hdcp2_msg_authentication_status msg2_status;
0430 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 msg1_desc;
0431 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 msg2_desc;
0432 uint8_t transmitter_message[TA_HDCP__HDCP2_TX_BUF_MAX_SIZE];
0433 };
0434
0435 struct ta_hdcp_cmd_hdcp2_process_prepare_authentication_message_input_v2 {
0436 uint32_t session_handle;
0437 struct ta_hdcp_cmd_hdcp2_process_authentication_message_input_v2 process;
0438 struct ta_hdcp_cmd_hdcp2_prepare_authentication_message_input_v2 prepare;
0439 };
0440
0441 struct ta_hdcp_cmd_hdcp2_process_prepare_authentication_message_output_v2 {
0442 uint32_t authentication_status;
0443 struct ta_hdcp_cmd_hdcp2_process_authentication_message_output_v2 process;
0444 struct ta_hdcp_cmd_hdcp2_prepare_authentication_message_output_v2 prepare;
0445 };
0446
0447 struct ta_hdcp_cmd_hdcp2_set_encryption_input {
0448 uint32_t session_handle;
0449 };
0450
0451 struct ta_hdcp_cmd_hdcp2_get_encryption_status_input {
0452 uint32_t session_handle;
0453 };
0454
0455 struct ta_hdcp_cmd_hdcp2_get_encryption_status_output {
0456 enum ta_hdcp_content_type hdcp2_type;
0457 uint32_t protection_level;
0458 };
0459
0460 struct ta_hdcp_cmd_hdcp2_enable_dp_stream_encryption_input {
0461 uint32_t session_handle;
0462 uint32_t display_handle;
0463 };
0464
0465 struct ta_hdcp_cmd_set_srm_input {
0466 uint32_t srm_buf_size;
0467 uint8_t srm_buf[PSP_HDCP_SRM_FIRST_GEN_MAX_SIZE];
0468 };
0469
0470 struct ta_hdcp_cmd_set_srm_output {
0471 uint8_t valid_signature;
0472 uint32_t srm_version;
0473 };
0474
0475 struct ta_hdcp_cmd_get_srm_output {
0476 uint32_t srm_version;
0477 uint32_t srm_buf_size;
0478 uint8_t srm_buf[PSP_HDCP_SRM_FIRST_GEN_MAX_SIZE];
0479 };
0480
0481
0482
0483 union ta_hdcp_cmd_input {
0484 struct ta_hdcp_cmd_hdcp1_create_session_input hdcp1_create_session;
0485 struct ta_hdcp_cmd_hdcp1_destroy_session_input hdcp1_destroy_session;
0486 struct ta_hdcp_cmd_hdcp1_first_part_authentication_input hdcp1_first_part_authentication;
0487 struct ta_hdcp_cmd_hdcp1_second_part_authentication_input hdcp1_second_part_authentication;
0488 struct ta_hdcp_cmd_hdcp1_enable_encryption_input hdcp1_enable_encryption;
0489 struct ta_hdcp_cmd_hdcp1_enable_dp_stream_encryption_input hdcp1_enable_dp_stream_encryption;
0490 struct ta_hdcp_cmd_hdcp1_get_encryption_status_input hdcp1_get_encryption_status;
0491 struct ta_hdcp_cmd_hdcp2_destroy_session_input hdcp2_destroy_session;
0492 struct ta_hdcp_cmd_hdcp2_set_encryption_input hdcp2_set_encryption;
0493 struct ta_hdcp_cmd_hdcp2_get_encryption_status_input hdcp2_get_encryption_status;
0494 struct ta_hdcp_cmd_hdcp2_create_session_input_v2 hdcp2_create_session_v2;
0495 struct ta_hdcp_cmd_hdcp2_process_prepare_authentication_message_input_v2
0496 hdcp2_prepare_process_authentication_message_v2;
0497 struct ta_hdcp_cmd_hdcp2_enable_dp_stream_encryption_input hdcp2_enable_dp_stream_encryption;
0498 struct ta_hdcp_cmd_set_srm_input hdcp_set_srm;
0499 };
0500
0501
0502 union ta_hdcp_cmd_output {
0503 struct ta_hdcp_cmd_hdcp1_create_session_output hdcp1_create_session;
0504 struct ta_hdcp_cmd_hdcp1_first_part_authentication_output hdcp1_first_part_authentication;
0505 struct ta_hdcp_cmd_hdcp1_second_part_authentication_output hdcp1_second_part_authentication;
0506 struct ta_hdcp_cmd_hdcp1_get_encryption_status_output hdcp1_get_encryption_status;
0507 struct ta_hdcp_cmd_hdcp2_get_encryption_status_output hdcp2_get_encryption_status;
0508 struct ta_hdcp_cmd_hdcp2_create_session_output_v2 hdcp2_create_session_v2;
0509 struct ta_hdcp_cmd_hdcp2_process_prepare_authentication_message_output_v2
0510 hdcp2_prepare_process_authentication_message_v2;
0511 struct ta_hdcp_cmd_set_srm_output hdcp_set_srm;
0512 struct ta_hdcp_cmd_get_srm_output hdcp_get_srm;
0513 };
0514
0515
0516 struct ta_hdcp_shared_memory {
0517 uint32_t cmd_id;
0518 enum ta_hdcp_status hdcp_status;
0519 uint32_t reserved;
0520 union ta_hdcp_cmd_input in_msg;
0521 union ta_hdcp_cmd_output out_msg;
0522 };
0523
0524 enum psp_status {
0525 PSP_STATUS__SUCCESS = 0,
0526 PSP_STATUS__ERROR_INVALID_PARAMS,
0527 PSP_STATUS__ERROR_GENERIC,
0528 PSP_STATUS__ERROR_OUT_OF_MEMORY,
0529 PSP_STATUS__ERROR_UNSUPPORTED_FEATURE
0530 };
0531
0532 #endif