mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 00:45:13 +07:00
46659a83e4
[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> |
||
---|---|---|
.. | ||
audio_types.h | ||
bios_parser_interface.h | ||
bios_parser_types.h | ||
dal_asic_id.h | ||
dal_types.h | ||
ddc_service_types.h | ||
dpcd_defs.h | ||
fixed31_32.h | ||
gpio_interface.h | ||
gpio_service_interface.h | ||
gpio_types.h | ||
grph_object_ctrl_defs.h | ||
grph_object_defs.h | ||
grph_object_id.h | ||
i2caux_interface.h | ||
irq_service_interface.h | ||
link_service_types.h | ||
logger_interface.h | ||
logger_types.h | ||
set_mode_types.h | ||
signal_types.h | ||
vector.h |