Back to home page

OSCL-LXR

 
 

    


0001 ========================
0002 Display Core Debug tools
0003 ========================
0004 
0005 DC Visual Confirmation
0006 ======================
0007 
0008 Display core provides a feature named visual confirmation, which is a set of
0009 bars added at the scanout time by the driver to convey some specific
0010 information. In general, you can enable this debug option by using::
0011 
0012   echo <N> > /sys/kernel/debug/dri/0/amdgpu_dm_visual_confirm
0013 
0014 Where `N` is an integer number for some specific scenarios that the developer
0015 wants to enable, you will see some of these debug cases in the following
0016 subsection.
0017 
0018 Multiple Planes Debug
0019 ---------------------
0020 
0021 If you want to enable or debug multiple planes in a specific user-space
0022 application, you can leverage a debug feature named visual confirm. For
0023 enabling it, you will need::
0024 
0025   echo 1 > /sys/kernel/debug/dri/0/amdgpu_dm_visual_confirm
0026 
0027 You need to reload your GUI to see the visual confirmation. When the plane
0028 configuration changes or a full update occurs there will be a colored bar at
0029 the bottom of each hardware plane being drawn on the screen.
0030 
0031 * The color indicates the format - For example, red is AR24 and green is NV12
0032 * The height of the bar indicates the index of the plane
0033 * Pipe split can be observed if there are two bars with a difference in height
0034   covering the same plane
0035 
0036 Consider the video playback case in which a video is played in a specific
0037 plane, and the desktop is drawn in another plane. The video plane should
0038 feature one or two green bars at the bottom of the video depending on pipe
0039 split configuration.
0040 
0041 * There should **not** be any visual corruption
0042 * There should **not** be any underflow or screen flashes
0043 * There should **not** be any black screens
0044 * There should **not** be any cursor corruption
0045 * Multiple plane **may** be briefly disabled during window transitions or
0046   resizing but should come back after the action has finished
0047 
0048 Pipe Split Debug
0049 ----------------
0050 
0051 Sometimes we need to debug if DCN is splitting pipes correctly, and visual
0052 confirmation is also handy for this case. Similar to the MPO case, you can use
0053 the below command to enable visual confirmation::
0054 
0055   echo 1 > /sys/kernel/debug/dri/0/amdgpu_dm_visual_confirm
0056 
0057 In this case, if you have a pipe split, you will see one small red bar at the
0058 bottom of the display covering the entire display width and another bar
0059 covering the second pipe. In other words, you will see a bit high bar in the
0060 second pipe.
0061 
0062 DTN Debug
0063 =========
0064 
0065 DC (DCN) provides an extensive log that dumps multiple details from our
0066 hardware configuration. Via debugfs, you can capture those status values by
0067 using Display Test Next (DTN) log, which can be captured via debugfs by using::
0068 
0069   cat /sys/kernel/debug/dri/0/amdgpu_dm_dtn_log
0070 
0071 Since this log is updated accordingly with DCN status, you can also follow the
0072 change in real-time by using something like::
0073 
0074   sudo watch -d cat /sys/kernel/debug/dri/0/amdgpu_dm_dtn_log
0075 
0076 When reporting a bug related to DC, consider attaching this log before and
0077 after you reproduce the bug.