drm/amd/display: fix an incorrect ODM policy assigned for subvp
authorWenjing Liu <wenjing.liu@amd.com>
Fri, 22 Mar 2024 19:29:56 +0000 (15:29 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Apr 2024 02:15:10 +0000 (22:15 -0400)
commit339126b5294468409bfb4cd49ec4745d1b7bf3bf
tree5db046d64e4771344a20c9aa2543be6ae2fb7799
parent4a5b171299e59d51322f4c6bd376c5acbeca0a4a
drm/amd/display: fix an incorrect ODM policy assigned for subvp

[why]
When Subvp pipe's index is smaller than main pipe's index, the main
pipe's ODM policy is not yet assigned. If we assign subvp pipe's ODM
policy based on main pipe, we will assign uninitialized ODM policy.

[how]
Instead of copying main pipe's policy we copy the main pipe ODM policy
logic. So it doesn't matter whether if main pipe's ODM policy is set,
phantom pipe will always have the same policy because it running the
same calcualtion to derive ODM policy.

Cc: stable@vger.kernel.org
Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c