]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Recalculate pitch when buffers change
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Thu, 28 Mar 2019 13:46:23 +0000 (09:46 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Apr 2019 05:20:59 +0000 (00:20 -0500)
commit223fe39f82cb08d51abf3778da2a5c6c0c5be3f0
tree7e5de3539df4017e6395fca92e13275009e91985
parent0da9495ed71d993ea69898b2a2d30040805a5a5f
drm/amd/display: Recalculate pitch when buffers change

[Why]
Pitch was only calculated based on format whenever the plane state
was recreated. This could result in surface corruption due to the
incorrect pitch being programmed when the surface pitch changed during
commits where state->allow_modeset = false.

[How]
Recalculate pitch at the same time we update the buffer address and
other buffer attributes. This function was previously called
fill_plane_tiling_attributes but I've also renamed it to
fill_plane_buffer_attributes to clarify the actual intent of the
function now that it's handling most buffer related attributes.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: David Francis <David.Francis@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c