msm_hdmi_hdcp_mgr.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. #ifndef MSM_HDMI_HDCP_MGR_H
  13. #define MSM_HDMI_HDCP_MGR_H
  14. enum DS_TYPE { /* type of downstream device */
  15. DS_UNKNOWN,
  16. DS_RECEIVER,
  17. DS_REPEATER,
  18. };
  19. enum {
  20. MSG_ID_IDX,
  21. RET_CODE_IDX,
  22. HEADER_LEN,
  23. };
  24. enum RET_CODE {
  25. HDCP_NOT_AUTHED,
  26. HDCP_AUTHED,
  27. HDCP_DISABLE,
  28. };
  29. enum MSG_ID { /* List of functions expected to be called after it */
  30. DOWN_CHECK_TOPOLOGY,
  31. UP_REQUEST_TOPOLOGY,
  32. UP_SEND_TOPOLOGY,
  33. DOWN_REQUEST_TOPOLOGY,
  34. MSG_NUM,
  35. };
  36. enum SOURCE_ID {
  37. HDCP_V1_TX,
  38. HDCP_V1_RX,
  39. HDCP_V2_RX,
  40. HDCP_V2_TX,
  41. SRC_NUM,
  42. };
  43. /*
  44. * how to parse sysfs params buffer
  45. * from hdcp_tx driver.
  46. */
  47. struct HDCP_V2V1_MSG_TOPOLOGY {
  48. /* indicates downstream's type */
  49. uint32_t ds_type;
  50. uint8_t bksv[5];
  51. uint8_t dev_count;
  52. uint8_t depth;
  53. uint8_t ksv_list[5 * 127];
  54. uint32_t max_cascade_exceeded;
  55. uint32_t max_dev_exceeded;
  56. };
  57. #endif /* MSM_HDMI_HDCP_MGR_H */