From: "Christian König" <christian.koenig@amd.com>
To: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>,
Alex Deucher <alexander.deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org,
Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Subject: Re: [PATCH] drm/amdgpu: Skip discovery dump when topology is unavailable
Date: Thu, 19 Mar 2026 13:26:48 +0100 [thread overview]
Message-ID: <ff1a5fee-33ec-4a72-999e-c8645321bbe5@amd.com> (raw)
In-Reply-To: <20260319105934.1989939-1-srinivasan.shanmugam@amd.com>
On 3/19/26 11:59, Srinivasan Shanmugam wrote:
> When generating a devcoredump, amdgpu_discovery_dump() prints the IP
> discovery topology.
>
> The function already needs to handle the case where
> adev->discovery.ip_top is NULL to avoid a crash.
>
> Currently, the code prints a section header and an additional message
> when the topology is unavailable.
>
> However, for platforms where discovery is not used, this section is not
> expected to be present. Printing an extra message adds unnecessary
> output.
>
> Simplify this by skipping the entire section when ip_top is NULL.
>
> The NULL check is kept to avoid a crash, but no output is generated when
> the discovery topology is unavailable.
>
> Cc: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> index 6be1f971a31a..5a4e63e1ad93 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> @@ -1422,15 +1422,13 @@ void amdgpu_discovery_dump(struct amdgpu_device *adev, struct drm_printer *p)
> struct ip_hw_instance *ip_inst;
> int i = 0, j;
>
> - drm_printf(p, "\nHW IP Discovery\n");
> -
> - if (!ip_top) {
> - drm_printf(p, "ip discovery topology unavailable\n");
> + if (!ip_top)
> return;
> - }
>
> die_kset = &ip_top->die_kset;
>
> + drm_printf(p, "\nHW IP Discovery\n");
> +
> spin_lock(&die_kset->list_lock);
> list_for_each(el_die, &die_kset->list) {
> drm_printf(p, "die %d\n", i++);
prev parent reply other threads:[~2026-03-19 12:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 10:59 [PATCH] drm/amdgpu: Skip discovery dump when topology is unavailable Srinivasan Shanmugam
2026-03-19 12:26 ` Christian König [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=ff1a5fee-33ec-4a72-999e-c8645321bbe5@amd.com \
--to=christian.koenig@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=pierre-eric.pelloux-prayer@amd.com \
--cc=srinivasan.shanmugam@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