]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fix plane address updates for video surface formats
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Mon, 11 Mar 2019 13:38:35 +0000 (09:38 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Mar 2019 20:36:50 +0000 (15:36 -0500)
commitb22cb3fecf761254e978e363b08aafe28aec4059
tree8a5d4f166844aadf797f1cb32113917e860c4d74
parentb4e0cc4138e08e82e3b694785c963db22729e0a4
drm/amd/display: Fix plane address updates for video surface formats

[Why]
For new DC planes the correct plane address fields are filled based
on whether the plane had a graphics or video format.

However, when we perform stream and plane updates using DC we only ever
fill in the graphics format fields. This causing corruption and hangs
when using video surface formats like NV12 for planes.

[How]
Use the same logic everywhere we update dc_plane_address - always
fill in the correct fields based on the surface format type.

There are 3 places this is done:

- Atomic check, during DC plane creation
- Atomic commit, during plane prepare_fb
- Atomic commit tail, during amdgpu_dm_commit_planes

We use the fill_plane_tiling_attributes in all 3 locations and it
already needs the address to update DCC attributes, so the surface
address update logic can be moved into this helper.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c