From: "Timur Kristóf" <timur.kristof@gmail.com>
To: Harry Wentland <harry.wentland@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amd/display: Fix null pointer on analog detection
Date: Wed, 29 Oct 2025 17:54:07 +0100 [thread overview]
Message-ID: <4b4aabe98541494474296d6f2062482dcfd9c193.camel@gmail.com> (raw)
In-Reply-To: <20251029161607.401452-1-harry.wentland@amd.com>
On Wed, 2025-10-29 at 12:16 -0400, Harry Wentland wrote:
> Check if we have an amdgpu_dm_connector->dc_sink first before
> adding common modes for analog outputs. If we don't have a
> sink yet we can safely skip this.
Hi Harry, nice catch!
Out of curiosity, how is it possible to reach this code when the
dc_sink is NULL?
The patch is:
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
>
> Fixes: 0c9f9ca99238 ("drm/amd/display: Add common modes to analog
> displays without EDID")
> Cc: Timur Kristóf <timur.kristof@gmail.com>
> Signed-off-by: Harry Wentland <harry.wentland@amd.com>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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 c621e50f636a..bc5a8b8442a2 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -8669,7 +8669,7 @@ static int amdgpu_dm_connector_get_modes(struct
> drm_connector *connector)
> amdgpu_dm_connector->num_modes +=
> drm_add_modes_noedid(connector,
> 1920, 1080);
>
> - if (amdgpu_dm_connector->dc_sink->edid_caps.analog)
> {
> + if (amdgpu_dm_connector->dc_sink &&
> amdgpu_dm_connector->dc_sink->edid_caps.analog) {
> /* Analog monitor connected by DAC load
> detection.
> * Add common modes. It will be up to the
> user to select one that works.
> */
next prev parent reply other threads:[~2025-10-29 16:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 16:16 [PATCH] drm/amd/display: Fix null pointer on analog detection Harry Wentland
2025-10-29 16:54 ` Timur Kristóf [this message]
2025-10-29 18:29 ` Harry Wentland
2025-10-29 22:52 ` Timur Kristóf
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=4b4aabe98541494474296d6f2062482dcfd9c193.camel@gmail.com \
--to=timur.kristof@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
/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