]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/display: calculate the remain segments for all pipes
authorZhikai Zhai <zhikai.zhai@amd.com>
Thu, 27 Feb 2025 12:09:14 +0000 (20:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:42:00 +0000 (14:42 +0200)
commit1da3dc73724bb0927b7f4ddfb7071b62ab0564e4
tree549211aeb1370701fc2866853e23b658c286d806
parent4c2a3488756463d97e86240c2a26ed7c2f06f613
drm/amd/display: calculate the remain segments for all pipes

[ Upstream commit d3069feecdb5542604d29b59acfd1fd213bad95b ]

[WHY]
In some cases the remain de-tile buffer segments will be greater
than zero if we don't add the non-top pipe to calculate, at
this time the override de-tile buffer size will be valid and used.
But it makes the de-tile buffer segments used finally for all of pipes
exceed the maximum.

[HOW]
Add the non-top pipe to calculate the remain de-tile buffer segments.
Don't set override size to use the average according to pipe count
if the value exceed the maximum.

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Signed-off-by: Zhikai Zhai <zhikai.zhai@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c