linux_dsm_epyc7002/drivers/gpu/drm/amd/display/dc/inc
Nicholas Kazlauskas 46659a83e4 drm/amd/display: Support reading hw state from debugfs file
[Why]

Logging hardware state can be done by triggering a write to the
debugfs file. It would also be useful to be able to read the hardware
state from the debugfs file to be able to generate a clean log without
timestamps.

[How]

Usage: cat /sys/kernel/debug/dri/0/amdgpu_dm_dtn_log

Threading is an obvious concern when dealing with multiple debugfs
operations and blocking on global state in dm or dc seems unfavorable.

Adding an extra parameter for the debugfs log context state is the
implementation done here. Existing code that made use of DTN_INFO
and its associated macros needed to be refactored to support this.

We don't know the size of the log in advance so it reallocates the
log string dynamically. Once the log has been generated it's copied
into the user supplied buffer for the debugfs. This allows for seeking
support but it's worth nothing that unlike triggering output via
dmesg the hardware state might change in-between reads if your buffer
size is too small.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2018-08-27 15:20:49 -05:00
..
hw drm/amdgpu/display: add support for LVDS (v5) 2018-08-27 11:11:15 -05:00
bw_fixed.h amdgpu/dc: allow inlining constant int to fixed a lot better. 2017-09-29 13:03:35 -04:00
clock_source.h drm/amd/display: add display write back(DWB) 2017-09-26 18:16:36 -04:00
compressor.h drm/amd/display: Initial prototype of FBC implementation 2017-09-26 18:15:56 -04:00
core_status.h drm/amd/display: Add timing validation against dongle cap 2017-11-28 17:54:16 -05:00
core_types.h drm/amd/display: Create new i2c resource 2018-08-27 11:11:05 -05:00
custom_float.h drm/amd/display: Enable regamma 25 segments and use double buffer. 2017-09-26 17:14:18 -04:00
dc_link_ddc.h drm/amd/display: Return aux replies directly to DRM 2018-07-13 14:48:36 -05:00
dc_link_dp.h drm/amd/display: Retry link training again 2018-07-27 09:07:42 -05:00
dce_calcs.h drm/amdgpu/display: remove VEGAM config option 2018-05-18 16:08:18 -05:00
dcn_calcs.h drm/amd/display: replace clocks_value struct with dc_clocks 2018-07-05 16:38:27 -05:00
hw_sequencer.h drm/amd/display: Support reading hw state from debugfs file 2018-08-27 15:20:49 -05:00
link_hwss.h drm/amd/display: add eDP 1.2+ polling for T7 2018-02-19 14:19:34 -05:00
reg_helper.h drm/amd/display: generic indirect register access 2018-07-13 14:47:33 -05:00
resource.h drm/amd/display: Check if clock source in use before disabling 2018-08-13 17:29:11 -05:00