drm/amd/display: Fix debugfs dmub_fw_state read
Subsystems (3)
PATCH 1/1 drm/amd/display: Fix debugfs dmub_fw_state read
When the FW state is too large to fit in initial seq_file buffer, seq_write returns -1, which is subsequently returned from dmub_fw_state_show. This causes the read operation to fail.
Return instead always 0 and let the seq_file handling retry the read with a larger buffer if the initial buffer overflows.
Fixes 2364076772b1 ("drm/amd/display: Add DMUB firmware state debugfs")
Signed-off-by Filip Hejsek <[email protected]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +2 -1
@@ -958,7 +958,8 @@ static int dmub_fw_state_show(struct seq_file *m, void *data) state_size = fb_info->fb[DMUB_WINDOW_6_FW_STATE ].size; -return seq_write (m, state_base, state_size); +seq_write (m, state_base, state_size); +return 0 ; }/* replay_capability_show() - show eDP panel replay capability
base-commit: 96a5152075c0424e9bda551d00ab850c815e309c
Signature · 1 line
2.46.0