drm_hdcp.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: MIT */
  2. /*
  3. * Copyright (C) 2017 Google, Inc.
  4. *
  5. * Authors:
  6. * Sean Paul <seanpaul@chromium.org>
  7. */
  8. #ifndef _DRM_HDCP_H_INCLUDED_
  9. #define _DRM_HDCP_H_INCLUDED_
  10. /* Period of hdcp checks (to ensure we're still authenticated) */
  11. #define DRM_HDCP_CHECK_PERIOD_MS (128 * 16)
  12. /* Shared lengths/masks between HDMI/DVI/DisplayPort */
  13. #define DRM_HDCP_AN_LEN 8
  14. #define DRM_HDCP_BSTATUS_LEN 2
  15. #define DRM_HDCP_KSV_LEN 5
  16. #define DRM_HDCP_RI_LEN 2
  17. #define DRM_HDCP_V_PRIME_PART_LEN 4
  18. #define DRM_HDCP_V_PRIME_NUM_PARTS 5
  19. #define DRM_HDCP_NUM_DOWNSTREAM(x) (x & 0x7f)
  20. #define DRM_HDCP_MAX_CASCADE_EXCEEDED(x) (x & BIT(3))
  21. #define DRM_HDCP_MAX_DEVICE_EXCEEDED(x) (x & BIT(7))
  22. /* Slave address for the HDCP registers in the receiver */
  23. #define DRM_HDCP_DDC_ADDR 0x3A
  24. /* HDCP register offsets for HDMI/DVI devices */
  25. #define DRM_HDCP_DDC_BKSV 0x00
  26. #define DRM_HDCP_DDC_RI_PRIME 0x08
  27. #define DRM_HDCP_DDC_AKSV 0x10
  28. #define DRM_HDCP_DDC_AN 0x18
  29. #define DRM_HDCP_DDC_V_PRIME(h) (0x20 + h * 4)
  30. #define DRM_HDCP_DDC_BCAPS 0x40
  31. #define DRM_HDCP_DDC_BCAPS_REPEATER_PRESENT BIT(6)
  32. #define DRM_HDCP_DDC_BCAPS_KSV_FIFO_READY BIT(5)
  33. #define DRM_HDCP_DDC_BSTATUS 0x41
  34. #define DRM_HDCP_DDC_KSV_FIFO 0x43
  35. #endif