11e88eb1bSHarry Wentland /* 21e88eb1bSHarry Wentland * Copyright 2019 Advanced Micro Devices, Inc. 31e88eb1bSHarry Wentland * 41e88eb1bSHarry Wentland * Permission is hereby granted, free of charge, to any person obtaining a 51e88eb1bSHarry Wentland * copy of this software and associated documentation files (the "Software"), 61e88eb1bSHarry Wentland * to deal in the Software without restriction, including without limitation 71e88eb1bSHarry Wentland * the rights to use, copy, modify, merge, publish, distribute, sublicense, 81e88eb1bSHarry Wentland * and/or sell copies of the Software, and to permit persons to whom the 91e88eb1bSHarry Wentland * Software is furnished to do so, subject to the following conditions: 101e88eb1bSHarry Wentland * 111e88eb1bSHarry Wentland * The above copyright notice and this permission notice shall be included in 121e88eb1bSHarry Wentland * all copies or substantial portions of the Software. 131e88eb1bSHarry Wentland * 141e88eb1bSHarry Wentland * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 151e88eb1bSHarry Wentland * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 161e88eb1bSHarry Wentland * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 171e88eb1bSHarry Wentland * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 181e88eb1bSHarry Wentland * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 191e88eb1bSHarry Wentland * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 201e88eb1bSHarry Wentland * OTHER DEALINGS IN THE SOFTWARE. 211e88eb1bSHarry Wentland * 221e88eb1bSHarry Wentland * Authors: AMD 231e88eb1bSHarry Wentland * 241e88eb1bSHarry Wentland */ 251e88eb1bSHarry Wentland 261e88eb1bSHarry Wentland #ifndef __DC_HDCP_TYPES_H__ 271e88eb1bSHarry Wentland #define __DC_HDCP_TYPES_H__ 281e88eb1bSHarry Wentland 291e88eb1bSHarry Wentland enum hdcp_message_id { 301e88eb1bSHarry Wentland HDCP_MESSAGE_ID_INVALID = -1, 311e88eb1bSHarry Wentland 321e88eb1bSHarry Wentland /* HDCP 1.4 */ 331e88eb1bSHarry Wentland 341e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_BKSV = 0, 351e88eb1bSHarry Wentland /* HDMI is called Ri', DP is called R0' */ 361e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_RI_R0, 371e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_PJ, 381e88eb1bSHarry Wentland HDCP_MESSAGE_ID_WRITE_AKSV, 391e88eb1bSHarry Wentland HDCP_MESSAGE_ID_WRITE_AINFO, 401e88eb1bSHarry Wentland HDCP_MESSAGE_ID_WRITE_AN, 411e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_VH_X, 421e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_VH_0, 431e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_VH_1, 441e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_VH_2, 451e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_VH_3, 461e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_VH_4, 471e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_BCAPS, 481e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_BSTATUS, 491e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_KSV_FIFO, 501e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_BINFO, 511e88eb1bSHarry Wentland 521e88eb1bSHarry Wentland /* HDCP 2.2 */ 531e88eb1bSHarry Wentland 541e88eb1bSHarry Wentland HDCP_MESSAGE_ID_HDCP2VERSION, 551e88eb1bSHarry Wentland HDCP_MESSAGE_ID_RX_CAPS, 561e88eb1bSHarry Wentland HDCP_MESSAGE_ID_WRITE_AKE_INIT, 571e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_AKE_SEND_CERT, 581e88eb1bSHarry Wentland HDCP_MESSAGE_ID_WRITE_AKE_NO_STORED_KM, 591e88eb1bSHarry Wentland HDCP_MESSAGE_ID_WRITE_AKE_STORED_KM, 601e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_AKE_SEND_H_PRIME, 611e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_AKE_SEND_PAIRING_INFO, 621e88eb1bSHarry Wentland HDCP_MESSAGE_ID_WRITE_LC_INIT, 631e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_LC_SEND_L_PRIME, 641e88eb1bSHarry Wentland HDCP_MESSAGE_ID_WRITE_SKE_SEND_EKS, 651e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_REPEATER_AUTH_SEND_RECEIVERID_LIST, 661e88eb1bSHarry Wentland HDCP_MESSAGE_ID_WRITE_REPEATER_AUTH_SEND_ACK, 671e88eb1bSHarry Wentland HDCP_MESSAGE_ID_WRITE_REPEATER_AUTH_STREAM_MANAGE, 681e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_REPEATER_AUTH_STREAM_READY, 691e88eb1bSHarry Wentland HDCP_MESSAGE_ID_READ_RXSTATUS, 701e88eb1bSHarry Wentland HDCP_MESSAGE_ID_WRITE_CONTENT_STREAM_TYPE, 711e88eb1bSHarry Wentland 72*8a2553d5SRodrigo Siqueira /* PS175 chip */ 73*8a2553d5SRodrigo Siqueira 74*8a2553d5SRodrigo Siqueira HDCP_MESSAGE_ID_WRITE_PS175_CMD, 75*8a2553d5SRodrigo Siqueira HDCP_MESSAGE_ID_READ_PS175_RSP, 76*8a2553d5SRodrigo Siqueira 771e88eb1bSHarry Wentland HDCP_MESSAGE_ID_MAX 781e88eb1bSHarry Wentland }; 791e88eb1bSHarry Wentland 801e88eb1bSHarry Wentland enum hdcp_version { 811e88eb1bSHarry Wentland HDCP_Unknown = 0, 821e88eb1bSHarry Wentland HDCP_VERSION_14, 831e88eb1bSHarry Wentland HDCP_VERSION_22, 841e88eb1bSHarry Wentland }; 851e88eb1bSHarry Wentland 861e88eb1bSHarry Wentland enum hdcp_link { 871e88eb1bSHarry Wentland HDCP_LINK_PRIMARY, 881e88eb1bSHarry Wentland HDCP_LINK_SECONDARY 891e88eb1bSHarry Wentland }; 901e88eb1bSHarry Wentland 911e88eb1bSHarry Wentland enum hdcp_message_status { 921e88eb1bSHarry Wentland HDCP_MESSAGE_SUCCESS, 931e88eb1bSHarry Wentland HDCP_MESSAGE_FAILURE, 941e88eb1bSHarry Wentland HDCP_MESSAGE_UNSUPPORTED 951e88eb1bSHarry Wentland }; 961e88eb1bSHarry Wentland 971e88eb1bSHarry Wentland struct hdcp_protection_message { 981e88eb1bSHarry Wentland enum hdcp_version version; 991e88eb1bSHarry Wentland /* relevant only for DVI */ 1001e88eb1bSHarry Wentland enum hdcp_link link; 1011e88eb1bSHarry Wentland enum hdcp_message_id msg_id; 1021e88eb1bSHarry Wentland uint32_t length; 1031e88eb1bSHarry Wentland uint8_t max_retries; 1041e88eb1bSHarry Wentland uint8_t *data; 1051e88eb1bSHarry Wentland enum hdcp_message_status status; 1061e88eb1bSHarry Wentland }; 1071e88eb1bSHarry Wentland 1081e88eb1bSHarry Wentland #endif 109