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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 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

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux