Ajay Singh Parmar | d7257c4 | 2013-07-30 23:48:27 -0700 | [diff] [blame^] | 1 | /* Copyright (c) 2013, The Linux Foundation. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #ifndef MSM_HDMI_HDCP_MGR_H |
| 14 | #define MSM_HDMI_HDCP_MGR_H |
| 15 | |
| 16 | enum DS_TYPE { /* type of downstream device */ |
| 17 | DS_UNKNOWN, |
| 18 | DS_RECEIVER, |
| 19 | DS_REPEATER, |
| 20 | }; |
| 21 | |
| 22 | enum { |
| 23 | MSG_ID_IDX, |
| 24 | RET_CODE_IDX, |
| 25 | HEADER_LEN, |
| 26 | }; |
| 27 | |
| 28 | enum RET_CODE { |
| 29 | HDCP_NOT_AUTHED, |
| 30 | HDCP_AUTHED, |
| 31 | HDCP_DISABLE, |
| 32 | }; |
| 33 | |
| 34 | enum MSG_ID { /* List of functions expected to be called after it */ |
| 35 | DOWN_CHECK_TOPOLOGY, |
| 36 | UP_REQUEST_TOPOLOGY, |
| 37 | UP_SEND_TOPOLOGY, |
| 38 | DOWN_REQUEST_TOPOLOGY, |
| 39 | MSG_NUM, |
| 40 | }; |
| 41 | |
| 42 | enum SOURCE_ID { |
| 43 | HDCP_V1_TX, |
| 44 | HDCP_V1_RX, |
| 45 | HDCP_V2_RX, |
| 46 | HDCP_V2_TX, |
| 47 | SRC_NUM, |
| 48 | }; |
| 49 | |
| 50 | /* |
| 51 | * how to parse sysfs params buffer |
| 52 | * from hdcp_tx driver. |
| 53 | */ |
| 54 | |
| 55 | struct HDCP_V2V1_MSG_TOPOLOGY { |
| 56 | /* indicates downstream's type */ |
| 57 | uint32_t ds_type; |
| 58 | uint8_t bksv[5]; |
| 59 | uint8_t dev_count; |
| 60 | uint8_t depth; |
| 61 | uint8_t ksv_list[5 * 127]; |
| 62 | uint32_t max_cascade_exceeded; |
| 63 | uint32_t max_dev_exceeded; |
| 64 | }; |
| 65 | |
| 66 | #endif /* MSM_HDMI_HDCP_MGR_H */ |