]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fix ABM memory alignment issue
authorWyatt Wood <wyatt.wood@amd.com>
Fri, 1 May 2020 00:04:47 +0000 (20:04 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 May 2020 18:00:48 +0000 (14:00 -0400)
commit0972a6585df9b36981dfadba5477516ee83aad08
treefbd311bb3a3f0fa113f15ef8682893754e3f2322
parent43a9bc513e5ec12b00646d5259e814deb20cf2a9
drm/amd/display: Fix ABM memory alignment issue

[Why]
Due to packing of abm_config_table, memory addresses aren't aligned to
32 bit boundary dmcub prefers.  Therefore when using pointers to this
structure, it's possible that dmcub will automatically align the data
read from that address, yielding incorrect values.

[How]
Instead of packing 1 byte boundary, explicitly pack values to 4 byte
boundary. Since there is a dependency on the existing iram table
structure on driver side, we must copy to a second structure, which is
aligned correctly, before passing to fw.

Signed-off-by: Wyatt Wood <wyatt.wood@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/power/power_helpers.c