dpcd_defs.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /*
  2. * Copyright 2012-15 Advanced Micro Devices, Inc.
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  17. * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
  18. * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  19. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  20. * OTHER DEALINGS IN THE SOFTWARE.
  21. *
  22. * Authors: AMD
  23. *
  24. */
  25. #ifndef __DAL_DPCD_DEFS_H__
  26. #define __DAL_DPCD_DEFS_H__
  27. #include <drm/drm_dp_helper.h>
  28. enum dpcd_revision {
  29. DPCD_REV_10 = 0x10,
  30. DPCD_REV_11 = 0x11,
  31. DPCD_REV_12 = 0x12,
  32. DPCD_REV_13 = 0x13,
  33. DPCD_REV_14 = 0x14
  34. };
  35. /* these are the types stored at DOWNSTREAMPORT_PRESENT */
  36. enum dpcd_downstream_port_type {
  37. DOWNSTREAM_DP = 0,
  38. DOWNSTREAM_VGA,
  39. DOWNSTREAM_DVI_HDMI,
  40. DOWNSTREAM_NONDDC /* has no EDID (TV,CV) */
  41. };
  42. enum dpcd_link_test_patterns {
  43. LINK_TEST_PATTERN_NONE = 0,
  44. LINK_TEST_PATTERN_COLOR_RAMP,
  45. LINK_TEST_PATTERN_VERTICAL_BARS,
  46. LINK_TEST_PATTERN_COLOR_SQUARES
  47. };
  48. enum dpcd_test_color_format {
  49. TEST_COLOR_FORMAT_RGB = 0,
  50. TEST_COLOR_FORMAT_YCBCR422,
  51. TEST_COLOR_FORMAT_YCBCR444
  52. };
  53. enum dpcd_test_bit_depth {
  54. TEST_BIT_DEPTH_6 = 0,
  55. TEST_BIT_DEPTH_8,
  56. TEST_BIT_DEPTH_10,
  57. TEST_BIT_DEPTH_12,
  58. TEST_BIT_DEPTH_16
  59. };
  60. /* PHY (encoder) test patterns
  61. The order of test patterns follows DPCD register PHY_TEST_PATTERN (0x248)
  62. */
  63. enum dpcd_phy_test_patterns {
  64. PHY_TEST_PATTERN_NONE = 0,
  65. PHY_TEST_PATTERN_D10_2,
  66. PHY_TEST_PATTERN_SYMBOL_ERROR,
  67. PHY_TEST_PATTERN_PRBS7,
  68. PHY_TEST_PATTERN_80BIT_CUSTOM,/* For DP1.2 only */
  69. PHY_TEST_PATTERN_CP2520_1,
  70. PHY_TEST_PATTERN_CP2520_2,
  71. PHY_TEST_PATTERN_CP2520_3, /* same as TPS4 */
  72. };
  73. enum dpcd_test_dyn_range {
  74. TEST_DYN_RANGE_VESA = 0,
  75. TEST_DYN_RANGE_CEA
  76. };
  77. enum dpcd_audio_test_pattern {
  78. AUDIO_TEST_PATTERN_OPERATOR_DEFINED = 0,/* direct HW translation */
  79. AUDIO_TEST_PATTERN_SAWTOOTH
  80. };
  81. enum dpcd_audio_sampling_rate {
  82. AUDIO_SAMPLING_RATE_32KHZ = 0,/* direct HW translation */
  83. AUDIO_SAMPLING_RATE_44_1KHZ,
  84. AUDIO_SAMPLING_RATE_48KHZ,
  85. AUDIO_SAMPLING_RATE_88_2KHZ,
  86. AUDIO_SAMPLING_RATE_96KHZ,
  87. AUDIO_SAMPLING_RATE_176_4KHZ,
  88. AUDIO_SAMPLING_RATE_192KHZ
  89. };
  90. enum dpcd_audio_channels {
  91. AUDIO_CHANNELS_1 = 0,/* direct HW translation */
  92. AUDIO_CHANNELS_2,
  93. AUDIO_CHANNELS_3,
  94. AUDIO_CHANNELS_4,
  95. AUDIO_CHANNELS_5,
  96. AUDIO_CHANNELS_6,
  97. AUDIO_CHANNELS_7,
  98. AUDIO_CHANNELS_8,
  99. AUDIO_CHANNELS_COUNT
  100. };
  101. enum dpcd_audio_test_pattern_periods {
  102. DPCD_AUDIO_TEST_PATTERN_PERIOD_NOTUSED = 0,/* direct HW translation */
  103. DPCD_AUDIO_TEST_PATTERN_PERIOD_3,
  104. DPCD_AUDIO_TEST_PATTERN_PERIOD_6,
  105. DPCD_AUDIO_TEST_PATTERN_PERIOD_12,
  106. DPCD_AUDIO_TEST_PATTERN_PERIOD_24,
  107. DPCD_AUDIO_TEST_PATTERN_PERIOD_48,
  108. DPCD_AUDIO_TEST_PATTERN_PERIOD_96,
  109. DPCD_AUDIO_TEST_PATTERN_PERIOD_192,
  110. DPCD_AUDIO_TEST_PATTERN_PERIOD_384,
  111. DPCD_AUDIO_TEST_PATTERN_PERIOD_768,
  112. DPCD_AUDIO_TEST_PATTERN_PERIOD_1536
  113. };
  114. /* This enum is for programming DPCD TRAINING_PATTERN_SET */
  115. enum dpcd_training_patterns {
  116. DPCD_TRAINING_PATTERN_VIDEOIDLE = 0,/* direct HW translation! */
  117. DPCD_TRAINING_PATTERN_1,
  118. DPCD_TRAINING_PATTERN_2,
  119. DPCD_TRAINING_PATTERN_3,
  120. DPCD_TRAINING_PATTERN_4 = 7
  121. };
  122. /* This enum is for use with PsrSinkPsrStatus.bits.sinkSelfRefreshStatus
  123. It defines the possible PSR states. */
  124. enum dpcd_psr_sink_states {
  125. PSR_SINK_STATE_INACTIVE = 0,
  126. PSR_SINK_STATE_ACTIVE_CAPTURE_DISPLAY_ON_SOURCE_TIMING = 1,
  127. PSR_SINK_STATE_ACTIVE_DISPLAY_FROM_SINK_RFB = 2,
  128. PSR_SINK_STATE_ACTIVE_CAPTURE_DISPLAY_ON_SINK_TIMING = 3,
  129. PSR_SINK_STATE_ACTIVE_CAPTURE_TIMING_RESYNC = 4,
  130. PSR_SINK_STATE_SINK_INTERNAL_ERROR = 7,
  131. };
  132. #endif /* __DAL_DPCD_DEFS_H__ */