[PATCH] drm/amd/display: Fix debugfs dmub_fw_state read
Filip Hejsek
filip.hejsek at gmail.com
Tue Sep 3 22:50:56 UTC 2024
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 <filip.hejsek at gmail.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
index db56b0aa545..ecda44789b4 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
@@ -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
--
2.46.0
More information about the dri-devel
mailing list