OSDN Git Service

drm/amd/display: Fix update type for multiple planes
authorRoman Li <roman.li@amd.com>
Mon, 13 Jan 2020 15:26:19 +0000 (10:26 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 22 Jan 2020 21:55:28 +0000 (16:55 -0500)
commit7527791e1fbd595a294cf6e6f41999d8acf6c43f
tree87f1d2606c9910962077162a93e03698efb2d76d
parent022205ffbb8fc48bb12c7941f07c6e19bdf11155
drm/amd/display: Fix update type for multiple planes

[Why]
determine_update_type_for_commit() uses pointers to single instance
of local variable to fill scaling/color info for all planes updates.
This is a bug, that leads to incorrect update type for commit in case
of multiple planes per crtc.
Each plane should refer to separate scaling/color data.

[How]
Use arrays for plane properties.
Bundle all properties into a single structure to simplify memory allocation.

Signed-off-by: Roman Li <roman.li@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@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