From: Alex Hung <alex.hung@amd.com>
To: Wentao Liang <vulab@iscas.ac.cn>,
harry.wentland@amd.com, sunpeng.li@amd.com,
Rodrigo.Siqueira@amd.com, alexander.deucher@amd.com,
christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com,
simona@ffwll.ch
Cc: hamza.mahfooz@amd.com, chiahsuan.chung@amd.com,
sunil.khatri@amd.com, aurabindo.pillai@amd.com,
hersenxs.wu@amd.com, mario.limonciello@amd.com, mwen@igalia.com,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] drm/amd/display: Add error check for avi and vendor infoframe setup function
Date: Wed, 9 Apr 2025 09:27:42 -0600 [thread overview]
Message-ID: <ffe208f5-ced0-40bb-aa3f-d4caa3796095@amd.com> (raw)
In-Reply-To: <20250408022018.2786-1-vulab@iscas.ac.cn>
On 4/7/25 20:20, Wentao Liang wrote:
> 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@iscas.ac.cn>
> ---
> v2: Fix code diff error
>
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 13 +++++++++++--
> 1 file changed, 11 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 5f216d626cbb..8fc6ba12c82d 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -6104,6 +6104,7 @@ static void fill_stream_properties_from_drm_display_mode(
> struct amdgpu_dm_connector *aconnector = NULL;
> struct hdmi_vendor_infoframe hv_frame;
> struct hdmi_avi_infoframe avi_frame;
> + ssize_t err;
>
> if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK)
> aconnector = to_amdgpu_dm_connector(connector);
> @@ -6150,9 +6151,17 @@ static void fill_stream_properties_from_drm_display_mode(
> }
>
> if (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) {
> - drm_hdmi_avi_infoframe_from_display_mode(&avi_frame, (struct drm_connector *)connector, mode_in);
> + 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);
Please use drm_err
> timing_out->vic = avi_frame.video_code;
> - drm_hdmi_vendor_infoframe_from_display_mode(&hv_frame, (struct drm_connector *)connector, mode_in);
> + err = drm_hdmi_vendor_infoframe_from_display_mode(&hv_frame,
> + (struct drm_connector *)connector,
> + mode_in);
> + if (err < 0)
> + dev_err(connector->dev, "Failed to setup vendor infoframe: %zd\n", err);
Please use drm_err
> timing_out->hdmi_vic = hv_frame.vic;
> }
>
prev parent reply other threads:[~2025-04-09 15:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 2:20 Wentao Liang
2025-04-09 5:20 ` kernel test robot
2025-04-09 6:01 ` kernel test robot
2025-04-09 15:27 ` Alex Hung [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ffe208f5-ced0-40bb-aa3f-d4caa3796095@amd.com \
--to=alex.hung@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=aurabindo.pillai@amd.com \
--cc=chiahsuan.chung@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hamza.mahfooz@amd.com \
--cc=harry.wentland@amd.com \
--cc=hersenxs.wu@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=mwen@igalia.com \
--cc=simona@ffwll.ch \
--cc=sunil.khatri@amd.com \
--cc=sunpeng.li@amd.com \
--cc=vulab@iscas.ac.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®