[PATCH v2 1/4] drm/amdgpu: add pmlog structure definition

Lazar, Lijo Lijo.Lazar at amd.com
Fri Oct 6 12:57:47 UTC 2023


[Public]

Hi Tom,

It's about below sort of versioning.  I don't know if we will have multiple log data stacked or whether this will need a different format. So far we only get a single buffer of data from FW.

struct amdgpu_pmlog_v2 {
       struct amdgpu_pmlog_header common_header;

      <add some variables here for x,y,z?>
       uint8_t data[] or some struct here <>
};

Thanks,
Lijo

-----Original Message-----
From: StDenis, Tom <Tom.StDenis at amd.com>
Sent: Friday, October 6, 2023 6:22 PM
To: Lazar, Lijo <Lijo.Lazar at amd.com>; Wang, Yang(Kevin) <KevinYang.Wang at amd.com>; amd-gfx at lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher at amd.com>
Cc: Zhang, Hawking <Hawking.Zhang at amd.com>
Subject: Re: [PATCH v2 1/4] drm/amdgpu: add pmlog structure definition

[AMD Official Use Only - General]

I'm lost are we talking about the pmlog?  umr currently just uses the pmfw_version as a key to find the correct decoding table.

Is that value not specific to a given table version?

Tom

________________________________________
From: Lazar, Lijo <Lijo.Lazar at amd.com>
Sent: Friday, October 6, 2023 08:36
To: Wang, Yang(Kevin); amd-gfx at lists.freedesktop.org; Deucher, Alexander; StDenis, Tom
Cc: Zhang, Hawking
Subject: RE: [PATCH v2 1/4] drm/amdgpu: add pmlog structure definition

[AMD Official Use Only - General]

Presently only a byte stream is intended. If version is needed, uint16_t pad can be converted to format/content revision.

@Deucher, Alexander/@StDenis, Tom, any comments on keeping a version?

Thanks,
Lijo

-----Original Message-----
From: Wang, Yang(Kevin) <KevinYang.Wang at amd.com>
Sent: Friday, October 6, 2023 5:08 PM
To: Lazar, Lijo <Lijo.Lazar at amd.com>; amd-gfx at lists.freedesktop.org
Cc: Zhang, Hawking <Hawking.Zhang at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>
Subject: RE: [PATCH v2 1/4] drm/amdgpu: add pmlog structure definition

[AMD Official Use Only - General]

Hi Lijo,

I prefer to add a version field in header, which is used for compatible in the future, what is your idea?
When the user attempts to parse this node, they cannot accurately determine the format of the content.

Best Regards,
Kevin

-----Original Message-----
From: Lazar, Lijo <Lijo.Lazar at amd.com>
Sent: Friday, October 6, 2023 1:22 PM
To: amd-gfx at lists.freedesktop.org
Cc: Zhang, Hawking <Hawking.Zhang at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>; Wang, Yang(Kevin) <KevinYang.Wang at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>
Subject: [PATCH v2 1/4] drm/amdgpu: add pmlog structure definition

From: Alex Deucher <alexander.deucher at amd.com>

Define the pmlog structures to be exposed via sysfs.

Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Lijo Lazar <lijo.lazar at amd.com>
---
 drivers/gpu/drm/amd/include/kgd_pp_interface.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/gpu/drm/amd/include/kgd_pp_interface.h b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
index e0bb6d39f0c3..9905228fd89c 100644
--- a/drivers/gpu/drm/amd/include/kgd_pp_interface.h
+++ b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
@@ -980,4 +980,19 @@ struct gpu_metrics_v2_4 {
        uint16_t                        average_soc_current;
        uint16_t                        average_gfx_current;
 };
+
+struct amdgpu_pmlog_header {
+       uint16_t structure_size;
+       uint16_t pad;
+       uint32_t mp1_ip_discovery_version;
+       uint32_t pmfw_version;
+       uint32_t pmlog_version;
+};
+
+struct amdgpu_pmlog {
+       struct amdgpu_pmlog_header common_header;
+
+       uint8_t data[];
+};
+
 #endif
--
2.25.1





More information about the amd-gfx mailing list