OSDN Git Service

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)
commite0634e8d6b90b4be1287dde7e0688c70d4fef0a5
tree8a5d4f166844aadf797f1cb32113917e860c4d74
parent533aed278afeaa68bb5d0600856ab02268cfa3b8
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