← Documents Documentation/gpu/zynqmp.rst GitHub 원문 ↗

Linux 6.18.37 · GPU·DRM

Xilinx ZynqMP UltraScale+ DisplayPort

ZynqMP DisplayPort video·audio pipeline과 debugfs compliance test를 설명합니다.

Source pathDocumentation/gpu/zynqmp.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

zynqmp.rst:1-147

ZynqMP DisplayPort video·audio pipeline과 debugfs compliance test를 설명합니다.

문서 위치
항목
SourceDocumentation/gpu/zynqmp.rst
분량147 source lines
관련xilinx-dpdma · zynqmp_dp.c

Source와 관련 구현·규격입니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

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

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

ZynqMP DisplayPort subsystem 개요

1-13

이 subsystem은 Xilinx ZynqMP UltraScale+에서 DisplayPort video와 audio output을 처리합니다.

DisplayPort DMA controller인 `xilinx-dpdma`가 in-memory framebuffer를 공급하는 방식과 programmable logic(PL)에서 live video·audio를 받는 방식을 모두 지원합니다.

Subsystem은 color-space conversion, alpha blending, audio mixing 등의 transformation을 수행할 수 있지만 현재 모든 기능이 지원되는 것은 아닙니다.

ZynqMP 입력·처리
영역기능
Memory inputxilinx-dpdma framebuffer
Live inputPL video·audio
VideoColor-space conversion·alpha blending
AudioAudio mixing
OutputDisplayPort video·audio

DisplayPort output으로 들어오는 두 입력 경로와 변환 기능입니다.

ZynqMP DisplayPort data path
xilinx-dpdma framebuffer 또는 PL live streamVideo·audio subsystem inputColor conversion·alpha blending·audio mixingDisplayPort linkMonitor video·audio output

Memory 또는 PL 입력을 변환해 DisplayPort로 보냅니다.

.. SPDX-License-Identifier: GPL-2.0+

===============================================
Xilinx ZynqMP Ultrascale+ DisplayPort Subsystem
===============================================

This subsystem handles DisplayPort video and audio output on the ZynqMP. It
supports in-memory framebuffers with the DisplayPort DMA controller
(xilinx-dpdma), as well as "live" video and audio from the programmable logic
(PL). This subsystem can perform several transformations, including color space
conversion, alpha blending, and audio mixing, although not all features are
currently supported.

DisplayPort debugfs 시험 모드

14-133

Debugging과 compliance test를 위해 `/sys/kernel/debug/dri/X/DP-1/test/` 아래의 여러 debugfs file로 DisplayPort test mode를 제어합니다.

`active`에 1을 쓰면 test mode가 활성화되고 0을 쓰면 비활성화됩니다. 이미 같은 상태여도 다시 활성화·비활성화 동작을 수행합니다. Inactive일 때 다른 file 변경은 즉시 적용되지 않지만 저장됐다가 활성화 시 반영되고, active일 때는 즉시 적용됩니다.

`custom`은 custom test pattern 값입니다. `downspread`는 1/0으로 spread-spectrum clocking을 켜거나 끄고, `enhanced`는 enhanced framing을 제어합니다.

`ignore_aux_errors=1`은 AUX error를 무시합니다. 이 file은 test mode 상태와 관계없이 즉시 적용되고 모든 AUX transfer에 영향을 줍니다. `ignore_hpd=1`은 cable 제거 또는 monitor link retraining request 같은 hotplug event를 무시하며 역시 즉시 적용됩니다.

`laneX_preemphasis`는 lane X의 pre-emphasis를 0(최저)부터 2(최고)까지 설정합니다. `laneX_swing`은 voltage swing을 0부터 3까지 설정합니다. `lanes`는 사용할 lane 수를 1, 2, 4 중에서 고릅니다.

`pattern`은 `video`, symbol-error measurement용 `symbol-error`, 다항식 `x^7 + x^6 + 1`의 `prbs7`, custom 80-bit pattern인 `80bit-custom`, HBR2 compliance eye pattern인 `cp2520`, link-training symbol `tps1`(`/D10.2/`), `tps2`, HBR2용 `tps3` 중 하나입니다.

`rate`는 hertz 단위이며 `5400000000`(HBR2), `2700000000`(HBR), `1620000000`(RBR) 중 하나입니다.

모든 설정은 아래 shell loop로 dump할 수 있습니다. `custom`은 `hexdump -C`로 첫 줄을 보고 나머지는 `cat`으로 읽습니다.

for prop in /sys/kernel/debug/dri/1/DP-1/test/*; do
        printf '%-17s ' ${prop##*/}
        if [ ${prop##*/} = custom ]; then
                hexdump -C $prop | head -1
        else
                cat $prop
        fi
done

예시 출력은 active 1, enhanced 1, AUX·HPD 무시 1, lane 0·1의 pre-emphasis 0과 swing 3, 2 lanes, `prbs7`, RBR `1620000000`을 보여 줍니다.

권장 절차는 board를 monitor에 연결하고 test mode를 구성·활성화한 다음 cable을 빼서 원하는 test equipment에 연결하는 것입니다. 아래 예시는 enhanced framing, TPS1, RBR, AUX error·HPD 무시를 설정하고 test mode를 활성화합니다.

echo 1 > /sys/kernel/debug/dri/1/DP-1/test/enhanced
echo tps1 > /sys/kernel/debug/dri/1/DP-1/test/pattern
echo 1620000000 > /sys/kernel/debug/dri/1/DP-1/test/rate
echo 1 > /sys/kernel/debug/dri/1/DP-1/test/ignore_aux_errors
echo 1 > /sys/kernel/debug/dri/1/DP-1/test/ignore_hpd
echo 1 > /sys/kernel/debug/dri/1/DP-1/test/active
ZynqMP DP test property
Property값·효과
active1 활성화 · 0 비활성화
customCustom 80-bit pattern data
downspread1/0 spread-spectrum clocking
enhancedEnhanced framing enable/disable
ignore_aux_errors즉시 모든 AUX error 무시
ignore_hpd즉시 hotplug event 무시
laneX_preemphasis0..2
laneX_swing0..3
lanes1 · 2 · 4
patternvideo · symbol-error · prbs7 · 80bit-custom · cp2520 · tps1/2/3
rate5.4G HBR2 · 2.7G HBR · 1.62G RBR

Debugfs file과 허용 값입니다.

DisplayPort compliance 시험
Board와 monitor 연결Lane·pattern·rate 설정AUX·HPD 무시 필요 여부 설정active=1로 test mode 활성화Cable을 monitor에서 분리Compliance test equipment에 연결

Monitor에서 test equipment로 연결을 넘기는 절차입니다.

debugfs
-------

To support debugging and compliance testing, several test modes can be enabled
though debugfs. The following files in /sys/kernel/debug/dri/X/DP-1/test/
control the DisplayPort test modes:

active:
        Writing a 1 to this file will activate test mode, and writing a 0 will
        deactivate test mode. Writing a 1 or 0 when the test mode is already
        active/inactive will re-activate/re-deactivate test mode. When test
        mode is inactive, changes made to other files will have no (immediate)
        effect, although the settings will be saved for when test mode is
        activated. When test mode is active, changes made to other files will
        apply immediately.

custom:
        Custom test pattern value

downspread:
        Enable/disable clock downspreading (spread-spectrum clocking) by
        writing 1/0

enhanced:
        Enable/disable enhanced framing

ignore_aux_errors:
        Ignore AUX errors when set to 1. Writes to this file take effect
        immediately (regardless of whether test mode is active) and affect all
        AUX transfers.

ignore_hpd:
        Ignore hotplug events (such as cable removals or monitor link
        retraining requests) when set to 1. Writes to this file take effect
        immediately (regardless of whether test mode is active).

laneX_preemphasis:
        Preemphasis from 0 (lowest) to 2 (highest) for lane X

laneX_swing:
        Voltage swing from 0 (lowest) to 3 (highest) for lane X

lanes:
        Number of lanes to use (1, 2, or 4)

pattern:
        Test pattern. May be one of:

                video
                        Use regular video input

                symbol-error
                        Symbol error measurement pattern

                prbs7
                        Output of the PRBS7 (x^7 + x^6 + 1) polynomial

                80bit-custom
                        A custom 80-bit pattern

                cp2520
                        HBR2 compliance eye pattern

                tps1
                        Link training symbol pattern TPS1 (/D10.2/)

                tps2
                        Link training symbol pattern TPS2

                tps3
                        Link training symbol pattern TPS3 (for HBR2)

rate:
        Rate in hertz. One of

                * 5400000000 (HBR2)
                * 2700000000 (HBR)
                * 1620000000 (RBR)

You can dump the displayport test settings with the following command::

        for prop in /sys/kernel/debug/dri/1/DP-1/test/*; do
                printf '%-17s ' ${prop##*/}
                if [ ${prop##*/} = custom ]; then
                        hexdump -C $prop | head -1
                else
                        cat $prop
                fi
        done

The output could look something like::

        active            1
        custom            00000000  00 00 00 00 00 00 00 00  00 00                    |..........|
        downspread        0
        enhanced          1
        ignore_aux_errors 1
        ignore_hpd        1
        lane0_preemphasis 0
        lane0_swing       3
        lane1_preemphasis 0
        lane1_swing       3
        lanes             2
        pattern           prbs7
        rate              1620000000

The recommended test procedure is to connect the board to a monitor,
configure test mode, activate test mode, and then disconnect the cable
and connect it to your test equipment of choice. For example, one
sequence of commands could be::

        echo 1 > /sys/kernel/debug/dri/1/DP-1/test/enhanced
        echo tps1 > /sys/kernel/debug/dri/1/DP-1/test/pattern
        echo 1620000000 > /sys/kernel/debug/dri/1/DP-1/test/rate
        echo 1 > /sys/kernel/debug/dri/1/DP-1/test/ignore_aux_errors
        echo 1 > /sys/kernel/debug/dri/1/DP-1/test/ignore_hpd
        echo 1 > /sys/kernel/debug/dri/1/DP-1/test/active

at which point the cable could be disconnected from the monitor.

ZynqMP DisplayPort 내부 API

134-147

내부 API 문서는 세 header와 세 implementation source의 kernel-doc를 포함합니다.

Header는 `drivers/gpu/drm/xlnx/zynqmp_disp.h`, `zynqmp_dpsub.h`, `zynqmp_kms.h`이며 display, DisplayPort subsystem, KMS object의 interface를 정의합니다.

Implementation은 `zynqmp_disp.c`, `zynqmp_dp.c`, `zynqmp_kms.c`이며 display pipeline, DisplayPort link와 DRM KMS 통합을 구현합니다.

ZynqMP source map
계층Source
Display APIzynqmp_disp.h · zynqmp_disp.c
DP subsystemzynqmp_dpsub.h · zynqmp_dp.c
KMS integrationzynqmp_kms.h · zynqmp_kms.c

Header와 implementation의 기능 대응입니다.

KMS 내부 경로
DRM KMS state 구성zynqmp_kms가 pipeline 설정zynqmp_disp가 video path 구성zynqmp_dp가 link training·output 처리

DRM state를 ZynqMP display와 DP hardware에 적용합니다.

Internals
---------

.. kernel-doc:: drivers/gpu/drm/xlnx/zynqmp_disp.h

.. kernel-doc:: drivers/gpu/drm/xlnx/zynqmp_dpsub.h

.. kernel-doc:: drivers/gpu/drm/xlnx/zynqmp_kms.h

.. kernel-doc:: drivers/gpu/drm/xlnx/zynqmp_disp.c

.. kernel-doc:: drivers/gpu/drm/xlnx/zynqmp_dp.c

.. kernel-doc:: drivers/gpu/drm/xlnx/zynqmp_kms.c