[PATCH] drm/amd/pm: correct gpu metrics related data structures V2
Evan Quan
evan.quan at amd.com
Fri Feb 26 07:41:55 UTC 2021
To make sure they are naturally aligned.
V2: minimum the possible influence to existing applications which
were developed based on those data structures. With this change,
only 32bit OS are affected while 64bit OS not.
Change-Id: I0a139e1e1f09fe27deffdce1cec6ea4594947625
Signed-off-by: Evan Quan <evan.quan at amd.com>
---
drivers/gpu/drm/amd/include/kgd_pp_interface.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/include/kgd_pp_interface.h b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
index 41c89f7d6412..ca38a204beb0 100644
--- a/drivers/gpu/drm/amd/include/kgd_pp_interface.h
+++ b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
@@ -339,6 +339,8 @@ struct metrics_table_header {
uint16_t structure_size;
uint8_t format_revision;
uint8_t content_revision;
+ /* make the data structure naturely aligned for 64bit OS */
+ uint16_t padding[2];
};
struct gpu_metrics_v1_0 {
--
2.29.0
More information about the amd-gfx
mailing list