Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: Fix dmub_cmd header alignment

[why & how]
Header misalignment in struct dmub_cmd_replay_copy_settings_data and
struct dmub_alpm_auxless_data causes incorrect data read between driver
and dmub.
Fix the misalignment and ensure that everything is aligned to 4-byte
boundaries.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Ovidiu Bunea <ovidiu.bunea@amd.com>
Signed-off-by: Ivan Lipski <ivan.lipski@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Ovidiu Bunea and committed by
Alex Deucher
327aba7f 640cd296

+12 -8
+12 -8
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
··· 4048 4048 uint16_t lfps_t1_t2_override_us; 4049 4049 short lfps_t1_t2_offset_us; 4050 4050 uint8_t lttpr_count; 4051 + /* 4052 + * Padding to align structure to 4 byte boundary. 4053 + */ 4054 + uint8_t pad[1]; 4051 4055 }; 4052 4056 4053 4057 /** ··· 4084 4080 * DIG BE HW instance. 4085 4081 */ 4086 4082 uint8_t digbe_inst; 4087 - /** 4088 - * @hpo_stream_enc_inst: HPO stream encoder instance 4089 - */ 4090 - uint8_t hpo_stream_enc_inst; 4091 - /** 4092 - * @hpo_link_enc_inst: HPO link encoder instance 4093 - */ 4094 - uint8_t hpo_link_enc_inst; 4095 4083 /** 4096 4084 * AUX HW instance. 4097 4085 */ ··· 4128 4132 * Use for AUX-less ALPM LFPS wake operation 4129 4133 */ 4130 4134 struct dmub_alpm_auxless_data auxless_alpm_data; 4135 + /** 4136 + * @hpo_stream_enc_inst: HPO stream encoder instance 4137 + */ 4138 + uint8_t hpo_stream_enc_inst; 4139 + /** 4140 + * @hpo_link_enc_inst: HPO link encoder instance 4141 + */ 4142 + uint8_t hpo_link_enc_inst; 4131 4143 /** 4132 4144 * @pad: Align structure to 4 byte boundary. 4133 4145 */