mdss_hdmi_hdcp.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* Copyright (c) 2012 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 __MDSS_HDMI_HDCP_H__
  13. #define __MDSS_HDMI_HDCP_H__
  14. #include "mdss_hdmi_util.h"
  15. #ifdef CONFIG_VIDEO_MHL_V2
  16. #include "video/msm_hdmi_hdcp_mgr.h"
  17. #endif
  18. enum hdmi_hdcp_state {
  19. HDCP_STATE_INACTIVE,
  20. HDCP_STATE_AUTHENTICATING,
  21. HDCP_STATE_AUTHENTICATED,
  22. HDCP_STATE_AUTH_FAIL
  23. };
  24. struct hdmi_hdcp_init_data {
  25. struct dss_io_data *core_io;
  26. struct dss_io_data *qfprom_io;
  27. struct mutex *mutex;
  28. struct kobject *sysfs_kobj;
  29. struct workqueue_struct *workq;
  30. void *cb_data;
  31. void (*notify_status)(void *cb_data, enum hdmi_hdcp_state status);
  32. struct hdmi_tx_ddc_ctrl *ddc_ctrl;
  33. };
  34. struct hdmi_hdcp_ctrl {
  35. u32 auth_retries;
  36. u32 tp_msgid;
  37. enum hdmi_hdcp_state hdcp_state;
  38. struct HDCP_V2V1_MSG_TOPOLOGY cached_tp;
  39. struct HDCP_V2V1_MSG_TOPOLOGY current_tp;
  40. struct delayed_work hdcp_auth_work;
  41. struct work_struct hdcp_int_work;
  42. struct completion r0_checked;
  43. struct hdmi_hdcp_init_data init_data;
  44. };
  45. const char *hdcp_state_name(enum hdmi_hdcp_state hdcp_state);
  46. void *hdmi_hdcp_init(struct hdmi_hdcp_init_data *init_data);
  47. void hdmi_hdcp_deinit(void *input);
  48. int hdmi_hdcp_isr(void *ptr);
  49. int hdmi_hdcp_reauthenticate(void *input);
  50. int hdmi_hdcp_authenticate(void *hdcp_ctrl);
  51. void hdmi_hdcp_off(void *hdcp_ctrl);
  52. int hdmi_hdcp_authentication_part1_start(struct hdmi_hdcp_ctrl *hdcp_ctrl);
  53. #endif /* __MDSS_HDMI_HDCP_H__ */