dc-debug.rst 2.9 KB

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