[PATCH] drm/amd/display: Add error check for avi and vendor infoframe setup function

Wentao Liang vulab at iscas.ac.cn
Mon Apr 7 07:16:27 UTC 2025


The function fill_stream_properties_from_drm_display_mode() calls the
function drm_hdmi_avi_infoframe_from_display_mode() and the
function drm_hdmi_vendor_infoframe_from_display_mode(), but does
not check its return value. Log the error messages to prevent silent
failure if either function fails.

Signed-off-by: Wentao Liang <vulab at iscas.ac.cn>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 0396429a64be..d6feafb8fa3d 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -6152,8 +6152,8 @@ static void fill_stream_properties_from_drm_display_mode(
 
 	if (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) {
 		err = drm_hdmi_avi_infoframe_from_display_mode(&avi_frame, (struct drm_connector *)connector, mode_in);
-                if (err < 0)
-                        dev_err(connector->dev, "Failed to setup avi infoframe: %zd\n", err);
+		if (err < 0)
+			dev_err(connector->dev, "Failed to setup avi infoframe: %zd\n", err);
 		timing_out->vic = avi_frame.video_code;
 		err = drm_hdmi_vendor_infoframe_from_display_mode(&hv_frame, (struct drm_connector *)connector, mode_in);
 		if (err < 0)
-- 
2.42.0.windows.2



More information about the amd-gfx mailing list