1 /* 2 * Copyright 2019 Advanced Micro Devices, Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice shall be included in 12 * all copies or substantial portions of the Software. 13 * 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 * OTHER DEALINGS IN THE SOFTWARE. 21 * 22 * Authors: AMD 23 * 24 */ 25 26 #ifndef MODULES_HDCP_HDCP_PSP_H_ 27 #define MODULES_HDCP_HDCP_PSP_H_ 28 29 /* 30 * NOTE: These parameters are a one-to-one copy of the 31 * parameters required by PSP 32 */ 33 enum bgd_security_hdcp_encryption_level { 34 HDCP_ENCRYPTION_LEVEL__INVALID = 0, 35 HDCP_ENCRYPTION_LEVEL__OFF, 36 HDCP_ENCRYPTION_LEVEL__ON 37 }; 38 39 enum bgd_security_hdcp2_content_type { 40 HDCP2_CONTENT_TYPE__INVALID = 0, 41 HDCP2_CONTENT_TYPE__TYPE0, 42 HDCP2_CONTENT_TYPE__TYPE1 43 }; 44 enum ta_dtm_command { 45 TA_DTM_COMMAND__UNUSED_1 = 1, 46 TA_DTM_COMMAND__TOPOLOGY_UPDATE_V2, 47 TA_DTM_COMMAND__TOPOLOGY_ASSR_ENABLE 48 }; 49 50 /* DTM related enumerations */ 51 /**********************************************************/ 52 53 enum ta_dtm_status { 54 TA_DTM_STATUS__SUCCESS = 0x00, 55 TA_DTM_STATUS__GENERIC_FAILURE = 0x01, 56 TA_DTM_STATUS__INVALID_PARAMETER = 0x02, 57 TA_DTM_STATUS__NULL_POINTER = 0x3 58 }; 59 60 /* input/output structures for DTM commands */ 61 /**********************************************************/ 62 /** 63 * Input structures 64 */ 65 enum ta_dtm_hdcp_version_max_supported { 66 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__NONE = 0, 67 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__1_x = 10, 68 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__2_0 = 20, 69 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__2_1 = 21, 70 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__2_2 = 22, 71 TA_DTM_HDCP_VERSION_MAX_SUPPORTED__2_3 = 23 72 }; 73 74 struct ta_dtm_topology_update_input_v2 { 75 /* display handle is unique across the driver and is used to identify a display */ 76 /* for all security interfaces which reference displays such as HDCP */ 77 uint32_t display_handle; 78 uint32_t is_active; 79 uint32_t is_miracast; 80 uint32_t controller; 81 uint32_t ddc_line; 82 uint32_t dig_be; 83 uint32_t dig_fe; 84 uint32_t dp_mst_vcid; 85 uint32_t is_assr; 86 uint32_t max_hdcp_supported_version; 87 }; 88 89 struct ta_dtm_topology_assr_enable { 90 uint32_t display_topology_dig_be_index; 91 }; 92 93 /** 94 * Output structures 95 */ 96 97 /* No output structures yet */ 98 99 union ta_dtm_cmd_input { 100 struct ta_dtm_topology_update_input_v2 topology_update_v2; 101 struct ta_dtm_topology_assr_enable topology_assr_enable; 102 }; 103 104 union ta_dtm_cmd_output { 105 uint32_t reserved; 106 }; 107 108 struct ta_dtm_shared_memory { 109 uint32_t cmd_id; 110 uint32_t resp_id; 111 enum ta_dtm_status dtm_status; 112 uint32_t reserved; 113 union ta_dtm_cmd_input dtm_in_message; 114 union ta_dtm_cmd_output dtm_out_message; 115 }; 116 117 int psp_cmd_submit_buf(struct psp_context *psp, struct amdgpu_firmware_info *ucode, struct psp_gfx_cmd_resp *cmd, 118 uint64_t fence_mc_addr); 119 120 enum ta_hdcp_command { 121 TA_HDCP_COMMAND__INITIALIZE, 122 TA_HDCP_COMMAND__HDCP1_CREATE_SESSION, 123 TA_HDCP_COMMAND__HDCP1_DESTROY_SESSION, 124 TA_HDCP_COMMAND__HDCP1_FIRST_PART_AUTHENTICATION, 125 TA_HDCP_COMMAND__HDCP1_SECOND_PART_AUTHENTICATION, 126 TA_HDCP_COMMAND__HDCP1_ENABLE_ENCRYPTION, 127 TA_HDCP_COMMAND__HDCP1_ENABLE_DP_STREAM_ENCRYPTION, 128 TA_HDCP_COMMAND__HDCP1_GET_ENCRYPTION_STATUS, 129 TA_HDCP_COMMAND__UNUSED_1, 130 TA_HDCP_COMMAND__HDCP2_DESTROY_SESSION, 131 TA_HDCP_COMMAND__UNUSED_2, 132 TA_HDCP_COMMAND__HDCP2_SET_ENCRYPTION, 133 TA_HDCP_COMMAND__HDCP2_GET_ENCRYPTION_STATUS, 134 TA_HDCP_COMMAND__UNUSED_3, 135 TA_HDCP_COMMAND__HDCP2_CREATE_SESSION_V2, 136 TA_HDCP_COMMAND__HDCP2_PREPARE_PROCESS_AUTHENTICATION_MSG_V2, 137 TA_HDCP_COMMAND__HDCP2_ENABLE_DP_STREAM_ENCRYPTION 138 }; 139 140 enum ta_hdcp2_msg_id { 141 TA_HDCP_HDCP2_MSG_ID__NULL_MESSAGE = 1, 142 TA_HDCP_HDCP2_MSG_ID__AKE_INIT = 2, 143 TA_HDCP_HDCP2_MSG_ID__AKE_SEND_CERT = 3, 144 TA_HDCP_HDCP2_MSG_ID__AKE_NO_STORED_KM = 4, 145 TA_HDCP_HDCP2_MSG_ID__AKE_STORED_KM = 5, 146 TA_HDCP_HDCP2_MSG_ID__AKE_SEND_RRX = 6, 147 TA_HDCP_HDCP2_MSG_ID__AKE_SEND_H_PRIME = 7, 148 TA_HDCP_HDCP2_MSG_ID__AKE_SEND_PAIRING_INFO = 8, 149 TA_HDCP_HDCP2_MSG_ID__LC_INIT = 9, 150 TA_HDCP_HDCP2_MSG_ID__LC_SEND_L_PRIME = 10, 151 TA_HDCP_HDCP2_MSG_ID__SKE_SEND_EKS = 11, 152 TA_HDCP_HDCP2_MSG_ID__REPEATERAUTH_SEND_RECEIVERID_LIST = 12, 153 TA_HDCP_HDCP2_MSG_ID__RTT_READY = 13, 154 TA_HDCP_HDCP2_MSG_ID__RTT_CHALLENGE = 14, 155 TA_HDCP_HDCP2_MSG_ID__REPEATERAUTH_SEND_ACK = 15, 156 TA_HDCP_HDCP2_MSG_ID__REPEATERAUTH_STREAM_MANAGE = 16, 157 TA_HDCP_HDCP2_MSG_ID__REPEATERAUTH_STREAM_READY = 17, 158 TA_HDCP_HDCP2_MSG_ID__RECEIVER_AUTH_STATUS = 18, 159 TA_HDCP_HDCP2_MSG_ID__AKE_TRANSMITTER_INFO = 19, 160 TA_HDCP_HDCP2_MSG_ID__AKE_RECEIVER_INFO = 20, 161 TA_HDCP_HDCP2_MSG_ID__SIGNAL_CONTENT_STREAM_TYPE_DP = 129 162 }; 163 164 enum ta_hdcp2_hdcp2_msg_id_max_size { 165 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__NULL_MESSAGE = 0, 166 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_INIT = 12, 167 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_CERT = 534, 168 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_NO_STORED_KM = 129, 169 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_STORED_KM = 33, 170 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_RRX = 9, 171 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_H_PRIME = 33, 172 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_PAIRING_INFO = 17, 173 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__LC_INIT = 9, 174 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__LC_SEND_L_PRIME = 33, 175 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__SKE_SEND_EKS = 25, 176 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__REPEATERAUTH_SEND_RECEIVERID_LIST = 181, 177 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__RTT_READY = 1, 178 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__RTT_CHALLENGE = 17, 179 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__REPEATERAUTH_SEND_RACK = 17, 180 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__REPEATERAUTH_STREAM_MANAGE = 13, 181 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__REPEATERAUTH_STREAM_READY = 33, 182 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__RECEIVER_AUTH_STATUS = 4, 183 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_TRANSMITTER_INFO = 6, 184 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_RECEIVER_INFO = 6, 185 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__SIGNAL_CONTENT_STREAM_TYPE_DP = 1 186 }; 187 188 /* HDCP related enumerations */ 189 /**********************************************************/ 190 #define TA_HDCP__INVALID_SESSION 0xFFFF 191 #define TA_HDCP__HDCP1_AN_SIZE 8 192 #define TA_HDCP__HDCP1_KSV_SIZE 5 193 #define TA_HDCP__HDCP1_KSV_LIST_MAX_ENTRIES 127 194 #define TA_HDCP__HDCP1_V_PRIME_SIZE 20 195 #define TA_HDCP__HDCP2_TX_BUF_MAX_SIZE \ 196 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_NO_STORED_KM + TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_STORED_KM + 6 197 198 // 64 bits boundaries 199 #define TA_HDCP__HDCP2_RX_BUF_MAX_SIZE \ 200 TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_SEND_CERT + TA_HDCP_HDCP2_MSG_ID_MAX_SIZE__AKE_RECEIVER_INFO + 4 201 202 enum ta_hdcp_status { 203 TA_HDCP_STATUS__SUCCESS = 0x00, 204 TA_HDCP_STATUS__GENERIC_FAILURE = 0x01, 205 TA_HDCP_STATUS__NULL_POINTER = 0x02, 206 TA_HDCP_STATUS__FAILED_ALLOCATING_SESSION = 0x03, 207 TA_HDCP_STATUS__FAILED_SETUP_TX = 0x04, 208 TA_HDCP_STATUS__INVALID_PARAMETER = 0x05, 209 TA_HDCP_STATUS__VHX_ERROR = 0x06, 210 TA_HDCP_STATUS__SESSION_NOT_CLOSED_PROPERLY = 0x07, 211 TA_HDCP_STATUS__SRM_FAILURE = 0x08, 212 TA_HDCP_STATUS__MST_AUTHENTICATED_ALREADY_STARTED = 0x09, 213 TA_HDCP_STATUS__AKE_SEND_CERT_FAILURE = 0x0A, 214 TA_HDCP_STATUS__AKE_NO_STORED_KM_FAILURE = 0x0B, 215 TA_HDCP_STATUS__AKE_SEND_HPRIME_FAILURE = 0x0C, 216 TA_HDCP_STATUS__LC_SEND_LPRIME_FAILURE = 0x0D, 217 TA_HDCP_STATUS__SKE_SEND_EKS_FAILURE = 0x0E, 218 TA_HDCP_STATUS__REPAUTH_SEND_RXIDLIST_FAILURE = 0x0F, 219 TA_HDCP_STATUS__REPAUTH_STREAM_READY_FAILURE = 0x10, 220 TA_HDCP_STATUS__ASD_GENERIC_FAILURE = 0x11, 221 TA_HDCP_STATUS__UNWRAP_SECRET_FAILURE = 0x12, 222 TA_HDCP_STATUS__ENABLE_ENCR_FAILURE = 0x13, 223 TA_HDCP_STATUS__DISABLE_ENCR_FAILURE = 0x14, 224 TA_HDCP_STATUS__NOT_ENOUGH_MEMORY_FAILURE = 0x15, 225 TA_HDCP_STATUS__UNKNOWN_MESSAGE = 0x16, 226 TA_HDCP_STATUS__TOO_MANY_STREAM = 0x17 227 }; 228 229 enum ta_hdcp_authentication_status { 230 TA_HDCP_AUTHENTICATION_STATUS__NOT_STARTED = 0x00, 231 TA_HDCP_AUTHENTICATION_STATUS__HDCP1_FIRST_PART_FAILED = 0x01, 232 TA_HDCP_AUTHENTICATION_STATUS__HDCP1_FIRST_PART_COMPLETE = 0x02, 233 TA_HDCP_AUTHENTICATION_STATUS__HDCP1_SECOND_PART_FAILED = 0x03, 234 TA_HDCP_AUTHENTICATION_STATUS__HDCP1_AUTHENTICATED = 0x04, 235 TA_HDCP_AUTHENTICATION_STATUS__HDCP22_AUTHENTICATION_PENDING = 0x06, 236 TA_HDCP_AUTHENTICATION_STATUS__HDCP22_AUTHENTICATION_FAILED = 0x07, 237 TA_HDCP_AUTHENTICATION_STATUS__HDCP22_AUTHENTICATED = 0x08, 238 TA_HDCP_AUTHENTICATION_STATUS__HDCP1_KSV_VALIDATION_FAILED = 0x09 239 }; 240 241 enum ta_hdcp2_msg_authentication_status { 242 TA_HDCP2_MSG_AUTHENTICATION_STATUS__SUCCESS = 0, 243 TA_HDCP2_MSG_AUTHENTICATION_STATUS__KM_NOT_AVAILABLE, 244 TA_HDCP2_MSG_AUTHENTICATION_STATUS__UNUSED, 245 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID = 100, // everything above does not fail the request 246 TA_HDCP2_MSG_AUTHENTICATION_STATUS__NOT_ENOUGH_MEMORY, 247 TA_HDCP2_MSG_AUTHENTICATION_STATUS__NOT_EXPECTED_MSG, 248 TA_HDCP2_MSG_AUTHENTICATION_STATUS__SIGNATURE_CERTIFICAT_ERROR, 249 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INCORRECT_HDCP_VERSION, 250 TA_HDCP2_MSG_AUTHENTICATION_STATUS__UNKNOWN_MESSAGE, 251 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID_HMAC, 252 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID_TOPOLOGY, 253 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID_SEQ_NUM, 254 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID_SIZE, 255 TA_HDCP2_MSG_AUTHENTICATION_STATUS__INVALID_LENGTH, 256 TA_HDCP2_MSG_AUTHENTICATION_STATUS__REAUTH_REQUEST 257 }; 258 259 enum ta_hdcp_content_type { 260 TA_HDCP2_CONTENT_TYPE__TYPE0 = 1, 261 TA_HDCP2_CONTENT_TYPE__TYPE1, 262 }; 263 264 enum ta_hdcp_content_type_negotiation_type { 265 TA_HDCP2_CONTENT_TYPE_NEGOTIATION_TYPE__FORCE_TYPE0 = 1, 266 TA_HDCP2_CONTENT_TYPE_NEGOTIATION_TYPE__FORCE_TYPE1, 267 TA_HDCP2_CONTENT_TYPE_NEGOTIATION_TYPE__MAX_SUPPORTED 268 }; 269 270 enum ta_hdcp2_version { 271 TA_HDCP2_VERSION_UNKNOWN = 0, 272 TA_HDCP2_VERSION_2_0 = 20, 273 TA_HDCP2_VERSION_2_1 = 21, 274 TA_HDCP2_VERSION_2_2 = 22 275 }; 276 277 /* input/output structures for HDCP commands */ 278 /**********************************************************/ 279 struct ta_hdcp_cmd_hdcp1_create_session_input { 280 uint8_t display_handle; 281 }; 282 283 struct ta_hdcp_cmd_hdcp1_create_session_output { 284 uint32_t session_handle; 285 uint8_t an_primary[TA_HDCP__HDCP1_AN_SIZE]; 286 uint8_t aksv_primary[TA_HDCP__HDCP1_KSV_SIZE]; 287 uint8_t ainfo_primary; 288 uint8_t an_secondary[TA_HDCP__HDCP1_AN_SIZE]; 289 uint8_t aksv_secondary[TA_HDCP__HDCP1_KSV_SIZE]; 290 uint8_t ainfo_secondary; 291 }; 292 293 struct ta_hdcp_cmd_hdcp1_destroy_session_input { 294 uint32_t session_handle; 295 }; 296 297 struct ta_hdcp_cmd_hdcp1_first_part_authentication_input { 298 uint32_t session_handle; 299 uint8_t bksv_primary[TA_HDCP__HDCP1_KSV_SIZE]; 300 uint8_t bksv_secondary[TA_HDCP__HDCP1_KSV_SIZE]; 301 uint8_t bcaps; 302 uint16_t r0_prime_primary; 303 uint16_t r0_prime_secondary; 304 }; 305 306 struct ta_hdcp_cmd_hdcp1_first_part_authentication_output { 307 enum ta_hdcp_authentication_status authentication_status; 308 }; 309 310 struct ta_hdcp_cmd_hdcp1_second_part_authentication_input { 311 uint32_t session_handle; 312 uint16_t bstatus_binfo; 313 uint8_t ksv_list[TA_HDCP__HDCP1_KSV_LIST_MAX_ENTRIES][TA_HDCP__HDCP1_KSV_SIZE]; 314 uint32_t ksv_list_size; 315 uint8_t pj_prime; 316 uint8_t v_prime[TA_HDCP__HDCP1_V_PRIME_SIZE]; 317 }; 318 319 struct ta_hdcp_cmd_hdcp1_second_part_authentication_output { 320 enum ta_hdcp_authentication_status authentication_status; 321 }; 322 323 struct ta_hdcp_cmd_hdcp1_enable_encryption_input { 324 uint32_t session_handle; 325 }; 326 327 struct ta_hdcp_cmd_hdcp1_enable_dp_stream_encryption_input { 328 uint32_t session_handle; 329 uint32_t display_handle; 330 }; 331 332 struct ta_hdcp_cmd_hdcp1_get_encryption_status_input { 333 uint32_t session_handle; 334 }; 335 336 struct ta_hdcp_cmd_hdcp1_get_encryption_status_output { 337 uint32_t protection_level; 338 }; 339 340 struct ta_hdcp_cmd_hdcp2_create_session_input_v2 { 341 uint32_t display_handle; 342 enum ta_hdcp_content_type_negotiation_type negotiate_content_type; 343 }; 344 345 struct ta_hdcp_cmd_hdcp2_create_session_output_v2 { 346 uint32_t session_handle; 347 }; 348 349 struct ta_hdcp_cmd_hdcp2_destroy_session_input { 350 uint32_t session_handle; 351 }; 352 353 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 { 354 enum ta_hdcp2_msg_id msg_id; 355 uint32_t msg_size; 356 }; 357 358 struct ta_hdcp_cmd_hdcp2_process_authentication_message_input_v2 { 359 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 msg1_desc; 360 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 msg2_desc; 361 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 msg3_desc; 362 uint8_t receiver_message[TA_HDCP__HDCP2_RX_BUF_MAX_SIZE]; 363 }; 364 365 struct ta_hdcp_cmd_hdcp2_process_authentication_message_output_v2 { 366 uint32_t hdcp_version; 367 uint32_t is_km_stored; 368 uint32_t is_locality_precompute_support; 369 uint32_t is_repeater; 370 enum ta_hdcp2_msg_authentication_status msg1_status; 371 enum ta_hdcp2_msg_authentication_status msg2_status; 372 enum ta_hdcp2_msg_authentication_status msg3_status; 373 }; 374 375 struct ta_hdcp_cmd_hdcp2_prepare_authentication_message_input_v2 { 376 enum ta_hdcp2_msg_id msg1_id; 377 enum ta_hdcp2_msg_id msg2_id; 378 }; 379 380 struct ta_hdcp_cmd_hdcp2_prepare_authentication_message_output_v2 { 381 enum ta_hdcp2_msg_authentication_status msg1_status; 382 enum ta_hdcp2_msg_authentication_status msg2_status; 383 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 msg1_desc; 384 struct ta_hdcp_cmd_hdcp2_authentication_message_v2 msg2_desc; 385 uint8_t transmitter_message[TA_HDCP__HDCP2_TX_BUF_MAX_SIZE]; 386 }; 387 388 struct ta_hdcp_cmd_hdcp2_process_prepare_authentication_message_input_v2 { 389 uint32_t session_handle; 390 struct ta_hdcp_cmd_hdcp2_process_authentication_message_input_v2 process; 391 struct ta_hdcp_cmd_hdcp2_prepare_authentication_message_input_v2 prepare; 392 }; 393 394 struct ta_hdcp_cmd_hdcp2_process_prepare_authentication_message_output_v2 { 395 uint32_t authentication_status; 396 struct ta_hdcp_cmd_hdcp2_process_authentication_message_output_v2 process; 397 struct ta_hdcp_cmd_hdcp2_prepare_authentication_message_output_v2 prepare; 398 }; 399 400 struct ta_hdcp_cmd_hdcp2_set_encryption_input { 401 uint32_t session_handle; 402 }; 403 404 struct ta_hdcp_cmd_hdcp2_get_encryption_status_input { 405 uint32_t session_handle; 406 }; 407 408 struct ta_hdcp_cmd_hdcp2_get_encryption_status_output { 409 enum ta_hdcp_content_type hdcp2_type; 410 uint32_t protection_level; 411 }; 412 413 struct ta_hdcp_cmd_hdcp2_enable_dp_stream_encryption_input { 414 uint32_t session_handle; 415 uint32_t display_handle; 416 }; 417 418 /**********************************************************/ 419 /* Common input structure for HDCP callbacks */ 420 union ta_hdcp_cmd_input { 421 struct ta_hdcp_cmd_hdcp1_create_session_input hdcp1_create_session; 422 struct ta_hdcp_cmd_hdcp1_destroy_session_input hdcp1_destroy_session; 423 struct ta_hdcp_cmd_hdcp1_first_part_authentication_input hdcp1_first_part_authentication; 424 struct ta_hdcp_cmd_hdcp1_second_part_authentication_input hdcp1_second_part_authentication; 425 struct ta_hdcp_cmd_hdcp1_enable_encryption_input hdcp1_enable_encryption; 426 struct ta_hdcp_cmd_hdcp1_enable_dp_stream_encryption_input hdcp1_enable_dp_stream_encryption; 427 struct ta_hdcp_cmd_hdcp1_get_encryption_status_input hdcp1_get_encryption_status; 428 struct ta_hdcp_cmd_hdcp2_destroy_session_input hdcp2_destroy_session; 429 struct ta_hdcp_cmd_hdcp2_set_encryption_input hdcp2_set_encryption; 430 struct ta_hdcp_cmd_hdcp2_get_encryption_status_input hdcp2_get_encryption_status; 431 struct ta_hdcp_cmd_hdcp2_create_session_input_v2 hdcp2_create_session_v2; 432 struct ta_hdcp_cmd_hdcp2_process_prepare_authentication_message_input_v2 433 hdcp2_prepare_process_authentication_message_v2; 434 struct ta_hdcp_cmd_hdcp2_enable_dp_stream_encryption_input hdcp2_enable_dp_stream_encryption; 435 }; 436 437 /* Common output structure for HDCP callbacks */ 438 union ta_hdcp_cmd_output { 439 struct ta_hdcp_cmd_hdcp1_create_session_output hdcp1_create_session; 440 struct ta_hdcp_cmd_hdcp1_first_part_authentication_output hdcp1_first_part_authentication; 441 struct ta_hdcp_cmd_hdcp1_second_part_authentication_output hdcp1_second_part_authentication; 442 struct ta_hdcp_cmd_hdcp1_get_encryption_status_output hdcp1_get_encryption_status; 443 struct ta_hdcp_cmd_hdcp2_get_encryption_status_output hdcp2_get_encryption_status; 444 struct ta_hdcp_cmd_hdcp2_create_session_output_v2 hdcp2_create_session_v2; 445 struct ta_hdcp_cmd_hdcp2_process_prepare_authentication_message_output_v2 446 hdcp2_prepare_process_authentication_message_v2; 447 }; 448 /**********************************************************/ 449 450 struct ta_hdcp_shared_memory { 451 uint32_t cmd_id; 452 enum ta_hdcp_status hdcp_status; 453 uint32_t reserved; 454 union ta_hdcp_cmd_input in_msg; 455 union ta_hdcp_cmd_output out_msg; 456 }; 457 458 enum psp_status { 459 PSP_STATUS__SUCCESS = 0, 460 PSP_STATUS__ERROR_INVALID_PARAMS, 461 PSP_STATUS__ERROR_GENERIC, 462 PSP_STATUS__ERROR_OUT_OF_MEMORY, 463 PSP_STATUS__ERROR_UNSUPPORTED_FEATURE 464 }; 465 466 #endif /* MODULES_HDCP_HDCP_PSP_H_ */ 467