From: "Khatri, Sunil" <sukhatri@amd.com>
To: Alex Deucher <alexdeucher@gmail.com>,
Sunil Khatri <sunil.khatri@amd.com>
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Shashank Sharma" <shashank.sharma@amd.com>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] drm/amdgpu: add the IP information of the soc
Date: Thu, 14 Mar 2024 11:14:35 +0530 [thread overview]
Message-ID: <59cf081e-5924-42b5-a3f1-de8b012f09d1@amd.com> (raw)
In-Reply-To: <CADnq5_O-cyDkNLznZpvnZtz15Mi1_rkigirG80BmYJprP_udnw@mail.gmail.com>
On 3/14/2024 1:58 AM, Alex Deucher wrote:
> On Tue, Mar 12, 2024 at 8:41 AM Sunil Khatri <sunil.khatri@amd.com> wrote:
>> Add all the IP's information on a SOC to the
>> devcoredump.
>>
>> Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 19 +++++++++++++++++++
>> 1 file changed, 19 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
>> index a0dbccad2f53..611fdb90a1fc 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
>> @@ -196,6 +196,25 @@ amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count,
>> coredump->reset_task_info.process_name,
>> coredump->reset_task_info.pid);
>>
>> + /* GPU IP's information of the SOC */
>> + if (coredump->adev) {
>> + drm_printf(&p, "\nIP Information\n");
>> + drm_printf(&p, "SOC Family: %d\n", coredump->adev->family);
>> + drm_printf(&p, "SOC Revision id: %d\n", coredump->adev->rev_id);
>> +
>> + for (int i = 0; i < coredump->adev->num_ip_blocks; i++) {
>> + struct amdgpu_ip_block *ip =
>> + &coredump->adev->ip_blocks[i];
>> + drm_printf(&p, "IP type: %d IP name: %s\n",
>> + ip->version->type,
>> + ip->version->funcs->name);
>> + drm_printf(&p, "IP version: (%d,%d,%d)\n\n",
>> + ip->version->major,
>> + ip->version->minor,
>> + ip->version->rev);
>> + }
>> + }
> I think the IP discovery table would be more useful. Either walk the
> adev->ip_versions structure, or just include the IP discovery binary.
I did explore the adev->ip_versions and if i just go through the array
it doesn't give any useful information directly.
There are no ways to find directly from adev->ip_versions below things
until i also reparse the discovery binary again like done the discovery
amdgpu_discovery_reg_base_init and walk through the headers of various
ips using discovery binary.
a. Which IP is available on soc or not.
b. How many instances are there
Also i again have to change back to major, minor and rev convention for
this information to be useful. I am exploring it more if i find some
other information i will update.
adev->ip_block[] is derived from ip discovery only for each block which
is there on the SOC, so we are not reading information which isnt
applicable for the soc. We have name , type and version no of the IPs
available on the soc. If you want i could add no of instances of each IP
too if you think that's useful information here. Could you share what
information is missing in this approach so i can include that.
For dumping the IP discovery binary, i dont understand how that
information would be useful directly and needs to be decoded like we are
doing in discovery init. Please correct me if my understanding is wrong
here.
> Alex
>
>> +
>> if (coredump->ring) {
>> drm_printf(&p, "\nRing timed out details\n");
>> drm_printf(&p, "IP Type: %d Ring Name: %s\n",
>> --
>> 2.34.1
>>
next prev parent reply other threads:[~2024-03-14 5:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-12 12:41 [PATCH 1/2] drm/amdgpu: add the IP information of the soc Sunil Khatri
2024-03-12 12:41 ` [PATCH 2/2] drm:amdgpu: add firmware information of all IP's Sunil Khatri
2024-03-13 20:36 ` Alex Deucher
2024-03-14 5:58 ` Khatri, Sunil
2024-03-14 6:10 ` Sharma, Shashank
2024-03-14 9:52 ` Khatri, Sunil
2024-03-14 13:27 ` Alex Deucher
2024-03-13 20:28 ` [PATCH 1/2] drm/amdgpu: add the IP information of the soc Alex Deucher
2024-03-14 5:44 ` Khatri, Sunil [this message]
2024-03-14 14:42 ` Alex Deucher
2024-03-14 16:16 ` Khatri, Sunil
2024-03-14 17:51 ` Alex Deucher
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=59cf081e-5924-42b5-a3f1-de8b012f09d1@amd.com \
--to=sukhatri@amd.com \
--cc=alexander.deucher@amd.com \
--cc=alexdeucher@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shashank.sharma@amd.com \
--cc=sunil.khatri@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