linux_dsm_epyc7002/drivers/gpu/drm/amd/display/include
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
..
audio_types.h
bios_parser_interface.h
bios_parser_types.h drm/amd/display: Set DFS bypass flags for dce110 2018-08-27 11:09:49 -05:00
dal_asic_id.h drm/amdgpu/display: fix vega12/20 handling in dal_asic_id.h 2018-05-18 16:08:19 -05:00
dal_types.h drm/amdgpu/display: remove VEGAM config option 2018-05-18 16:08:18 -05:00
ddc_service_types.h drm/amd/display: AUX will exit when HPD LOW detected 2018-06-15 12:20:23 -05:00
dpcd_defs.h drm/amd/display: read DP sink and DP branch hardware and firmware revision from DPCD 2018-07-13 14:48:49 -05:00
fixed31_32.h drm/amd/display: Prefix TIMING_STANDARD entries with DC_ 2018-06-15 12:20:27 -05:00
gpio_interface.h
gpio_service_interface.h
gpio_types.h
grph_object_ctrl_defs.h drm/amd/display: add vbios table check for enabling dp ss 2018-08-06 15:56:54 -05:00
grph_object_defs.h drm/amd/display: get board layout for edid emulation 2018-07-05 16:38:45 -05:00
grph_object_id.h drm/amd/display: get board layout for edid emulation 2018-07-05 16:38:45 -05:00
i2caux_interface.h drm/amd/display: Refactor edid read. 2017-09-26 17:22:17 -04:00
irq_service_interface.h
link_service_types.h drm/amd/display: Update Link Training Fallback logic 2018-03-05 15:34:03 -05:00
logger_interface.h drm/amd/display: Support reading hw state from debugfs file 2018-08-27 15:20:49 -05:00
logger_types.h drm/amd/display: Support reading hw state from debugfs file 2018-08-27 15:20:49 -05:00
set_mode_types.h drm/amd/display: Refactor FreeSync module 2018-08-27 11:10:51 -05:00
signal_types.h drm/amdgpu/display: add support for LVDS (v5) 2018-08-27 11:11:15 -05:00
vector.h