zynqmp.rst 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. ===============================================
  3. Xilinx ZynqMP Ultrascale+ DisplayPort Subsystem
  4. ===============================================
  5. This subsystem handles DisplayPort video and audio output on the ZynqMP. It
  6. supports in-memory framebuffers with the DisplayPort DMA controller
  7. (xilinx-dpdma), as well as "live" video and audio from the programmable logic
  8. (PL). This subsystem can perform several transformations, including color space
  9. conversion, alpha blending, and audio mixing, although not all features are
  10. currently supported.
  11. debugfs
  12. -------
  13. To support debugging and compliance testing, several test modes can be enabled
  14. though debugfs. The following files in /sys/kernel/debug/dri/X/DP-1/test/
  15. control the DisplayPort test modes:
  16. active:
  17. Writing a 1 to this file will activate test mode, and writing a 0 will
  18. deactivate test mode. Writing a 1 or 0 when the test mode is already
  19. active/inactive will re-activate/re-deactivate test mode. When test
  20. mode is inactive, changes made to other files will have no (immediate)
  21. effect, although the settings will be saved for when test mode is
  22. activated. When test mode is active, changes made to other files will
  23. apply immediately.
  24. custom:
  25. Custom test pattern value
  26. downspread:
  27. Enable/disable clock downspreading (spread-spectrum clocking) by
  28. writing 1/0
  29. enhanced:
  30. Enable/disable enhanced framing
  31. ignore_aux_errors:
  32. Ignore AUX errors when set to 1. Writes to this file take effect
  33. immediately (regardless of whether test mode is active) and affect all
  34. AUX transfers.
  35. ignore_hpd:
  36. Ignore hotplug events (such as cable removals or monitor link
  37. retraining requests) when set to 1. Writes to this file take effect
  38. immediately (regardless of whether test mode is active).
  39. laneX_preemphasis:
  40. Preemphasis from 0 (lowest) to 2 (highest) for lane X
  41. laneX_swing:
  42. Voltage swing from 0 (lowest) to 3 (highest) for lane X
  43. lanes:
  44. Number of lanes to use (1, 2, or 4)
  45. pattern:
  46. Test pattern. May be one of:
  47. video
  48. Use regular video input
  49. symbol-error
  50. Symbol error measurement pattern
  51. prbs7
  52. Output of the PRBS7 (x^7 + x^6 + 1) polynomial
  53. 80bit-custom
  54. A custom 80-bit pattern
  55. cp2520
  56. HBR2 compliance eye pattern
  57. tps1
  58. Link training symbol pattern TPS1 (/D10.2/)
  59. tps2
  60. Link training symbol pattern TPS2
  61. tps3
  62. Link training symbol pattern TPS3 (for HBR2)
  63. rate:
  64. Rate in hertz. One of
  65. * 5400000000 (HBR2)
  66. * 2700000000 (HBR)
  67. * 1620000000 (RBR)
  68. You can dump the displayport test settings with the following command::
  69. for prop in /sys/kernel/debug/dri/1/DP-1/test/*; do
  70. printf '%-17s ' ${prop##*/}
  71. if [ ${prop##*/} = custom ]; then
  72. hexdump -C $prop | head -1
  73. else
  74. cat $prop
  75. fi
  76. done
  77. The output could look something like::
  78. active 1
  79. custom 00000000 00 00 00 00 00 00 00 00 00 00 |..........|
  80. downspread 0
  81. enhanced 1
  82. ignore_aux_errors 1
  83. ignore_hpd 1
  84. lane0_preemphasis 0
  85. lane0_swing 3
  86. lane1_preemphasis 0
  87. lane1_swing 3
  88. lanes 2
  89. pattern prbs7
  90. rate 1620000000
  91. The recommended test procedure is to connect the board to a monitor,
  92. configure test mode, activate test mode, and then disconnect the cable
  93. and connect it to your test equipment of choice. For example, one
  94. sequence of commands could be::
  95. echo 1 > /sys/kernel/debug/dri/1/DP-1/test/enhanced
  96. echo tps1 > /sys/kernel/debug/dri/1/DP-1/test/pattern
  97. echo 1620000000 > /sys/kernel/debug/dri/1/DP-1/test/rate
  98. echo 1 > /sys/kernel/debug/dri/1/DP-1/test/ignore_aux_errors
  99. echo 1 > /sys/kernel/debug/dri/1/DP-1/test/ignore_hpd
  100. echo 1 > /sys/kernel/debug/dri/1/DP-1/test/active
  101. at which point the cable could be disconnected from the monitor.
  102. Internals
  103. ---------
  104. .. kernel-doc:: drivers/gpu/drm/xlnx/zynqmp_disp.h
  105. .. kernel-doc:: drivers/gpu/drm/xlnx/zynqmp_dpsub.h
  106. .. kernel-doc:: drivers/gpu/drm/xlnx/zynqmp_kms.h
  107. .. kernel-doc:: drivers/gpu/drm/xlnx/zynqmp_disp.c
  108. .. kernel-doc:: drivers/gpu/drm/xlnx/zynqmp_dp.c
  109. .. kernel-doc:: drivers/gpu/drm/xlnx/zynqmp_kms.c