mtk_dp_hdcp1x.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * Copyright (c) 2020 MediaTek Inc.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #ifndef __MTK_DP_HDCP1X_H__
  14. #define __MTK_DP_HDCP1X_H__
  15. #include "mtk_dp_common.h"
  16. #ifdef DPTX_HDCP_ENABLE
  17. #define DP_HDCP1_BINFO_SIZE 2
  18. #define DP_HDCP1_BCAPS_SIZE 1
  19. #define DP_HDCP1_BSTATUS_SIZE 1
  20. #define DP_HDCP1_AN_SIZE 8
  21. #define DP_HDCP1_AKSV_SIZE 5
  22. #define DP_HDCP1_BKSV_SIZE 5
  23. #define DP_HDCP1_AINFO_SIZE 1
  24. #define HDCP1X_BSTATUS_TIMEOUT_CNT 600
  25. #define HDCP1X_R0_WDT 100
  26. #define HDCP1X_REP_RDY_WDT 5000
  27. #define HDCP1X_REP_MAXDEVS 128
  28. #define HDCP1X_REAUNTH_COUNT 1
  29. enum DPTX_DRV_HDCP1X_MainStates {
  30. HDCP1X_MainState_H2 = 0,
  31. HDCP1X_MainState_A0 = 1,
  32. HDCP1X_MainState_A1 = 2,
  33. HDCP1X_MainState_A2 = 3,
  34. HDCP1X_MainState_A3 = 4,
  35. HDCP1X_MainState_A4 = 5,
  36. HDCP1X_MainState_A5 = 6,
  37. HDCP1X_MainState_A6 = 7,
  38. HDCP1X_MainState_A7 = 8,
  39. };
  40. enum DPTX_DRV_HDCP1X_SubStates {
  41. HDCP1X_SubFSM_IDLE = 0,
  42. HDCP1X_SubFSM_CHECKHDCPCAPABLE = 1,
  43. HDCP1X_SubFSM_ExchangeKSV = 2,
  44. HDCP1X_SubFSM_VerifyBksv = 3,
  45. HDCP1X_SubFSM_Computation = 4,
  46. HDCP1X_SubFSM_CheckR0 = 5,
  47. HDCP1X_SubFSM_AuthDone = 6,
  48. HDCP1X_SubFSM_PollingRdyBit = 7,
  49. HDCP1X_SubFSM_AuthWithRepeater = 8,
  50. HDCP1X_SubFSM_AuthFail = 9,
  51. };
  52. bool mdrv_DPTx_HDCP1X_irq(struct mtk_dp *mtk_dp);
  53. bool mdrv_DPTx_HDCP1x_Support(struct mtk_dp *mtk_dp);
  54. void mdrv_DPTx_HDCP1X_FSM(struct mtk_dp *mtk_dp);
  55. void mdrv_DPTx_HDCP1X_SetStartAuth(struct mtk_dp *mtk_dp, bool bEnable);
  56. #endif
  57. #endif