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,
"Hawking Zhang" <Hawking.Zhang@amd.com>,
"Felix Kuehling" <Felix.Kuehling@amd.com>,
"Lijo Lazar" <lijo.lazar@amd.com>
Subject: Re: [PATCH] drm/amdgpu: add IP's FW information to devcoredump
Date: Thu, 28 Mar 2024 09:48:18 +0530 [thread overview]
Message-ID: <c41d7f3c-c717-43b7-86e5-c74532e4a2ec@amd.com> (raw)
In-Reply-To: <CADnq5_ONivR7io0w6vkHsQSSMnNCRJU=XdDD6D6SQZ8t9o3FAA@mail.gmail.com>
On 3/28/2024 8:38 AM, Alex Deucher wrote:
> On Tue, Mar 26, 2024 at 1:31 PM Sunil Khatri <sunil.khatri@amd.com> wrote:
>> Add FW information of all the IP's in the devcoredump.
>>
>> Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
> Might want to include the vbios version info as well, e.g.,
> atom_context->name
> atom_context->vbios_pn
> atom_context->vbios_ver_str
> atom_context->date
Sure i will add those parameters too.
Regards
Sunil
> Either way,
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>
>> ---
>> .../gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 122 ++++++++++++++++++
>> 1 file changed, 122 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
>> index 44c5da8aa9ce..d598b6520ec9 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
>> @@ -69,6 +69,124 @@ const char *hw_ip_names[MAX_HWIP] = {
>> [PCIE_HWIP] = "PCIE",
>> };
>>
>> +static void amdgpu_devcoredump_fw_info(struct amdgpu_device *adev,
>> + struct drm_printer *p)
>> +{
>> + uint32_t version;
>> + uint32_t feature;
>> + uint8_t smu_program, smu_major, smu_minor, smu_debug;
>> +
>> + drm_printf(p, "VCE feature version: %u, fw version: 0x%08x\n",
>> + adev->vce.fb_version, adev->vce.fw_version);
>> + drm_printf(p, "UVD feature version: %u, fw version: 0x%08x\n", 0,
>> + adev->uvd.fw_version);
>> + drm_printf(p, "GMC feature version: %u, fw version: 0x%08x\n", 0,
>> + adev->gmc.fw_version);
>> + drm_printf(p, "ME feature version: %u, fw version: 0x%08x\n",
>> + adev->gfx.me_feature_version, adev->gfx.me_fw_version);
>> + drm_printf(p, "PFP feature version: %u, fw version: 0x%08x\n",
>> + adev->gfx.pfp_feature_version, adev->gfx.pfp_fw_version);
>> + drm_printf(p, "CE feature version: %u, fw version: 0x%08x\n",
>> + adev->gfx.ce_feature_version, adev->gfx.ce_fw_version);
>> + drm_printf(p, "RLC feature version: %u, fw version: 0x%08x\n",
>> + adev->gfx.rlc_feature_version, adev->gfx.rlc_fw_version);
>> +
>> + drm_printf(p, "RLC SRLC feature version: %u, fw version: 0x%08x\n",
>> + adev->gfx.rlc_srlc_feature_version,
>> + adev->gfx.rlc_srlc_fw_version);
>> + drm_printf(p, "RLC SRLG feature version: %u, fw version: 0x%08x\n",
>> + adev->gfx.rlc_srlg_feature_version,
>> + adev->gfx.rlc_srlg_fw_version);
>> + drm_printf(p, "RLC SRLS feature version: %u, fw version: 0x%08x\n",
>> + adev->gfx.rlc_srls_feature_version,
>> + adev->gfx.rlc_srls_fw_version);
>> + drm_printf(p, "RLCP feature version: %u, fw version: 0x%08x\n",
>> + adev->gfx.rlcp_ucode_feature_version,
>> + adev->gfx.rlcp_ucode_version);
>> + drm_printf(p, "RLCV feature version: %u, fw version: 0x%08x\n",
>> + adev->gfx.rlcv_ucode_feature_version,
>> + adev->gfx.rlcv_ucode_version);
>> + drm_printf(p, "MEC feature version: %u, fw version: 0x%08x\n",
>> + adev->gfx.mec_feature_version, adev->gfx.mec_fw_version);
>> +
>> + if (adev->gfx.mec2_fw)
>> + drm_printf(p, "MEC2 feature version: %u, fw version: 0x%08x\n",
>> + adev->gfx.mec2_feature_version,
>> + adev->gfx.mec2_fw_version);
>> +
>> + drm_printf(p, "IMU feature version: %u, fw version: 0x%08x\n", 0,
>> + adev->gfx.imu_fw_version);
>> + drm_printf(p, "PSP SOS feature version: %u, fw version: 0x%08x\n",
>> + adev->psp.sos.feature_version, adev->psp.sos.fw_version);
>> + drm_printf(p, "PSP ASD feature version: %u, fw version: 0x%08x\n",
>> + adev->psp.asd_context.bin_desc.feature_version,
>> + adev->psp.asd_context.bin_desc.fw_version);
>> +
>> + drm_printf(p, "TA XGMI feature version: 0x%08x, fw version: 0x%08x\n",
>> + adev->psp.xgmi_context.context.bin_desc.feature_version,
>> + adev->psp.xgmi_context.context.bin_desc.fw_version);
>> + drm_printf(p, "TA RAS feature version: 0x%08x, fw version: 0x%08x\n",
>> + adev->psp.ras_context.context.bin_desc.feature_version,
>> + adev->psp.ras_context.context.bin_desc.fw_version);
>> + drm_printf(p, "TA HDCP feature version: 0x%08x, fw version: 0x%08x\n",
>> + adev->psp.hdcp_context.context.bin_desc.feature_version,
>> + adev->psp.hdcp_context.context.bin_desc.fw_version);
>> + drm_printf(p, "TA DTM feature version: 0x%08x, fw version: 0x%08x\n",
>> + adev->psp.dtm_context.context.bin_desc.feature_version,
>> + adev->psp.dtm_context.context.bin_desc.fw_version);
>> + drm_printf(p, "TA RAP feature version: 0x%08x, fw version: 0x%08x\n",
>> + adev->psp.rap_context.context.bin_desc.feature_version,
>> + adev->psp.rap_context.context.bin_desc.fw_version);
>> + drm_printf(
>> + p,
>> + "TA SECURE DISPLAY feature version: 0x%08x, fw version: 0x%08x\n",
>> + adev->psp.securedisplay_context.context.bin_desc.feature_version,
>> + adev->psp.securedisplay_context.context.bin_desc.fw_version);
>> +
>> + /* SMC firmware */
>> + version = adev->pm.fw_version;
>> +
>> + smu_program = (version >> 24) & 0xff;
>> + smu_major = (version >> 16) & 0xff;
>> + smu_minor = (version >> 8) & 0xff;
>> + smu_debug = (version >> 0) & 0xff;
>> + drm_printf(p,
>> + "SMC feature version: %u, program: %d, fw version: 0x%08x (%d.%d.%d)\n",
>> + 0, smu_program, version, smu_major, smu_minor, smu_debug);
>> +
>> + /* SDMA firmware */
>> + for (int i = 0; i < adev->sdma.num_instances; i++) {
>> + drm_printf(p,
>> + "SDMA%d feature version: %u, firmware version: 0x%08x\n",
>> + i, adev->sdma.instance[i].feature_version,
>> + adev->sdma.instance[i].fw_version);
>> + }
>> +
>> + drm_printf(p, "VCN feature version: %u, fw version: 0x%08x\n", 0,
>> + adev->vcn.fw_version);
>> + drm_printf(p, "DMCU feature version: %u, fw version: 0x%08x\n", 0,
>> + adev->dm.dmcu_fw_version);
>> + drm_printf(p, "DMCUB feature version: %u, fw version: 0x%08x\n", 0,
>> + adev->dm.dmcub_fw_version);
>> + drm_printf(p, "PSP TOC feature version: %u, fw version: 0x%08x\n",
>> + adev->psp.toc.feature_version, adev->psp.toc.fw_version);
>> +
>> + version = adev->mes.kiq_version & AMDGPU_MES_VERSION_MASK;
>> + feature = (adev->mes.kiq_version & AMDGPU_MES_FEAT_VERSION_MASK) >>
>> + AMDGPU_MES_FEAT_VERSION_SHIFT;
>> + drm_printf(p, "MES_KIQ feature version: %u, fw version: 0x%08x\n",
>> + feature, version);
>> +
>> + version = adev->mes.sched_version & AMDGPU_MES_VERSION_MASK;
>> + feature = (adev->mes.sched_version & AMDGPU_MES_FEAT_VERSION_MASK) >>
>> + AMDGPU_MES_FEAT_VERSION_SHIFT;
>> + drm_printf(p, "MES feature version: %u, fw version: 0x%08x\n", feature,
>> + version);
>> +
>> + drm_printf(p, "VPE feature version: %u, fw version: 0x%08x\n",
>> + adev->vpe.feature_version, adev->vpe.fw_version);
>> +}
>> +
>> static ssize_t
>> amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count,
>> void *data, size_t datalen)
>> @@ -118,6 +236,10 @@ amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count,
>> }
>> }
>>
>> + /* IP firmware information */
>> + drm_printf(&p, "\nIP Firmwares\n");
>> + amdgpu_devcoredump_fw_info(coredump->adev, &p);
>> +
>> 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-28 4:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-26 17:31 Sunil Khatri
2024-03-28 3:08 ` Alex Deucher
2024-03-28 4:18 ` 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=c41d7f3c-c717-43b7-86e5-c74532e4a2ec@amd.com \
--to=sukhatri@amd.com \
--cc=Felix.Kuehling@amd.com \
--cc=Hawking.Zhang@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=lijo.lazar@amd.com \
--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®