mirror_ubuntu-kernels/drivers/gpu/drm/amd
Nicholas Kazlauskas 1328e395fd drm/amd/display: Fix detection of aligned DMUB firmware meta info
[Why]
A built firmware binary may be aligned to 16-bytes with padding at the
end as necessary. In the case that padding was applied the meta info
will not be detected correctly and we won't be able to allocate the
appropriate firmware and tracebuffer sizes.

[How]
To maintain compatibility with already released firmware where this
occurs we need to try every meta offset from 0..15 inclusive.

Extract out the meta info checker into a helper function that's called
for each of these offsets and exit early when we've found it.

Reviewed-by: Eric Yang <Eric.Yang2@amd.com>
Acked-by: Anson Jacob <Anson.Jacob@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-11-17 16:58:06 -05:00
..
acp
amdgpu drm/amdgpu: return early on error while setting bar0 memtype 2021-11-17 16:58:04 -05:00
amdkfd drm/amdkfd: Add sysfs bitfields and enums to uAPI 2021-11-17 16:58:03 -05:00
display drm/amd/display: Fix detection of aligned DMUB firmware meta info 2021-11-17 16:58:06 -05:00
include drm/amdkfd: remove kgd_dev declaration and initialization 2021-11-17 16:58:03 -05:00
pm drm/amd/pm: Correct DPMS disable IP version check 2021-11-05 14:11:43 -04:00