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] drm/amdgpu: add the hw_ip version of all IP's
Date: Fri, 15 Mar 2024 18:47:53 +0530 [thread overview]
Message-ID: <3db5a50d-f695-4319-a254-5a5bccde1601@amd.com> (raw)
In-Reply-To: <CADnq5_NsqSWknj5x0v22iF2_UPCEFO7gnj4BV5j22x-jitO1=g@mail.gmail.com>
On 3/15/2024 6:45 PM, Alex Deucher wrote:
> On Fri, Mar 15, 2024 at 8:13 AM Sunil Khatri <sunil.khatri@amd.com> wrote:
>> Add all the IP's version information on a SOC to the
>> devcoredump.
>>
>> Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
> This looks great.
>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Thanks Alex
>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 62 +++++++++++++++++++++++
>> 1 file changed, 62 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
>> index a0dbccad2f53..3d4bfe0a5a7c 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
>> @@ -29,6 +29,43 @@
>> #include "sienna_cichlid.h"
>> #include "smu_v13_0_10.h"
>>
>> +const char *hw_ip_names[MAX_HWIP] = {
>> + [GC_HWIP] = "GC",
>> + [HDP_HWIP] = "HDP",
>> + [SDMA0_HWIP] = "SDMA0",
>> + [SDMA1_HWIP] = "SDMA1",
>> + [SDMA2_HWIP] = "SDMA2",
>> + [SDMA3_HWIP] = "SDMA3",
>> + [SDMA4_HWIP] = "SDMA4",
>> + [SDMA5_HWIP] = "SDMA5",
>> + [SDMA6_HWIP] = "SDMA6",
>> + [SDMA7_HWIP] = "SDMA7",
>> + [LSDMA_HWIP] = "LSDMA",
>> + [MMHUB_HWIP] = "MMHUB",
>> + [ATHUB_HWIP] = "ATHUB",
>> + [NBIO_HWIP] = "NBIO",
>> + [MP0_HWIP] = "MP0",
>> + [MP1_HWIP] = "MP1",
>> + [UVD_HWIP] = "UVD/JPEG/VCN",
>> + [VCN1_HWIP] = "VCN1",
>> + [VCE_HWIP] = "VCE",
>> + [VPE_HWIP] = "VPE",
>> + [DF_HWIP] = "DF",
>> + [DCE_HWIP] = "DCE",
>> + [OSSSYS_HWIP] = "OSSSYS",
>> + [SMUIO_HWIP] = "SMUIO",
>> + [PWR_HWIP] = "PWR",
>> + [NBIF_HWIP] = "NBIF",
>> + [THM_HWIP] = "THM",
>> + [CLK_HWIP] = "CLK",
>> + [UMC_HWIP] = "UMC",
>> + [RSMU_HWIP] = "RSMU",
>> + [XGMI_HWIP] = "XGMI",
>> + [DCI_HWIP] = "DCI",
>> + [PCIE_HWIP] = "PCIE",
>> +};
>> +
>> +
>> int amdgpu_reset_init(struct amdgpu_device *adev)
>> {
>> int ret = 0;
>> @@ -196,6 +233,31 @@ 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);
>> + drm_printf(&p, "SOC External Revision id: %d\n",
>> + coredump->adev->external_rev_id);
>> +
>> + for (int i = 1; i < MAX_HWIP; i++) {
>> + for (int j = 0; j < HWIP_MAX_INSTANCE; j++) {
>> + int ver = coredump->adev->ip_versions[i][j];
>> +
>> + if (ver)
>> + drm_printf(&p, "HWIP: %s[%d][%d]: v%d.%d.%d.%d.%d\n",
>> + hw_ip_names[i], i, j,
>> + IP_VERSION_MAJ(ver),
>> + IP_VERSION_MIN(ver),
>> + IP_VERSION_REV(ver),
>> + IP_VERSION_VARIANT(ver),
>> + IP_VERSION_SUBREV(ver));
>> + }
>> + }
>> + }
>> +
>> if (coredump->ring) {
>> drm_printf(&p, "\nRing timed out details\n");
>> drm_printf(&p, "IP Type: %d Ring Name: %s\n",
>> --
>> 2.34.1
>>
prev parent reply other threads:[~2024-03-15 13:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-15 12:13 Sunil Khatri
2024-03-15 12:19 ` Khatri, Sunil
2024-03-15 13:15 ` Alex Deucher
2024-03-15 13:17 ` Khatri, Sunil [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=3db5a50d-f695-4319-a254-5a5bccde1601@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
all inboxes | Powered by JetHome®