drm/amd/display: Read inst_fb data back during DMUB loading
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Thu, 12 Dec 2019 02:14:04 +0000 (21:14 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 16 Jan 2020 18:46:13 +0000 (13:46 -0500)
commitdee5d542836a911b0175f9cccc25b8f5733e2527
treecd14a672f57c38bc1afcdf3e577149a9fa7f77d4
parentb7408a06733f839c98a9903e204010204452fcd3
drm/amd/display: Read inst_fb data back during DMUB loading

[Why]
The inst firmware isn't necessarily fully flushed to framebuffer
memory and the DMCUB can hang due to invalid inst being parsed.

[How]
Like the fix to flush ringbuffer commands before updating the inbox
write pointer we need to read back inst memory before writing the
CW0 registers.

Add a helper to read 64-byte chunks to avoid a large temporary buffer.
Read the remaining leftover bytes if the inst_fb isn't fully aligned.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c