arm64: dts: qcom: sm8550: add TRNG node
[linux-modified.git] / Documentation / gpu / amdgpu / display / dc-debug.rst
1 ========================
2 Display Core Debug tools
3 ========================
4
5 DC Visual Confirmation
6 ======================
7
8 Display core provides a feature named visual confirmation, which is a set of
9 bars added at the scanout time by the driver to convey some specific
10 information. In general, you can enable this debug option by using::
11
12   echo <N> > /sys/kernel/debug/dri/0/amdgpu_dm_visual_confirm
13
14 Where `N` is an integer number for some specific scenarios that the developer
15 wants to enable, you will see some of these debug cases in the following
16 subsection.
17
18 Multiple Planes Debug
19 ---------------------
20
21 If you want to enable or debug multiple planes in a specific user-space
22 application, you can leverage a debug feature named visual confirm. For
23 enabling it, you will need::
24
25   echo 1 > /sys/kernel/debug/dri/0/amdgpu_dm_visual_confirm
26
27 You need to reload your GUI to see the visual confirmation. When the plane
28 configuration changes or a full update occurs there will be a colored bar at
29 the bottom of each hardware plane being drawn on the screen.
30
31 * The color indicates the format - For example, red is AR24 and green is NV12
32 * The height of the bar indicates the index of the plane
33 * Pipe split can be observed if there are two bars with a difference in height
34   covering the same plane
35
36 Consider the video playback case in which a video is played in a specific
37 plane, and the desktop is drawn in another plane. The video plane should
38 feature one or two green bars at the bottom of the video depending on pipe
39 split configuration.
40
41 * There should **not** be any visual corruption
42 * There should **not** be any underflow or screen flashes
43 * There should **not** be any black screens
44 * There should **not** be any cursor corruption
45 * Multiple plane **may** be briefly disabled during window transitions or
46   resizing but should come back after the action has finished
47
48 Pipe Split Debug
49 ----------------
50
51 Sometimes we need to debug if DCN is splitting pipes correctly, and visual
52 confirmation is also handy for this case. Similar to the MPO case, you can use
53 the below command to enable visual confirmation::
54
55   echo 1 > /sys/kernel/debug/dri/0/amdgpu_dm_visual_confirm
56
57 In this case, if you have a pipe split, you will see one small red bar at the
58 bottom of the display covering the entire display width and another bar
59 covering the second pipe. In other words, you will see a bit high bar in the
60 second pipe.
61
62 DTN Debug
63 =========
64
65 DC (DCN) provides an extensive log that dumps multiple details from our
66 hardware configuration. Via debugfs, you can capture those status values by
67 using Display Test Next (DTN) log, which can be captured via debugfs by using::
68
69   cat /sys/kernel/debug/dri/0/amdgpu_dm_dtn_log
70
71 Since this log is updated accordingly with DCN status, you can also follow the
72 change in real-time by using something like::
73
74   sudo watch -d cat /sys/kernel/debug/dri/0/amdgpu_dm_dtn_log
75
76 When reporting a bug related to DC, consider attaching this log before and
77 after you reproduce the bug.