Skip to contentSkip to conversation

drm/amd/pm: correct gpu metrics related data structures V2

PATCH New Evan Quan 1 participant 1 message Feb 26, 2021

Subsystems (2)
lore
Share & tools
lore

Evan Quan

author
#0 lore raw

PATCH 1/1 drm/amd/pm: correct gpu metrics related data structures V2

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
---
 drivers/gpu/drm/amd/include/kgd_pp_interface.h | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/include/kgd_pp_interface.h +2 -0
index 41c89f7d6412..ca38a204beb0 100644
@@ -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 {
Signature · 6 lines
2.29.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx