]> git.hungrycats.org Git - linux/commit
drm/amd/display: Clip rect size changes should be full updates
authorJoshua Aberback <joshua.aberback@amd.com>
Thu, 12 Sep 2024 22:47:22 +0000 (18:47 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 1 Oct 2024 21:33:15 +0000 (17:33 -0400)
commitce5057885ff70d0b61f5c332639e685b7ea720e8
tree89c0e69c94bf14343009dc27ca7692541cd10525
parente4dc767f1f38fd350775ea182cab2193292f1d98
drm/amd/display: Clip rect size changes should be full updates

[Why]
In cases where an MPO plane is being dragged around partially off-screen,
it is possible to get a flip where the only scaling parameters to change
are the clip rect size and position. Currently, clip rect size changes
are considered medium updates, which can result in the clip rect being used
for HW programming being larger than the clip rect that was used for the
last DML validation. This can lead to mismatches in different parts of the
pipe and can result in a p-state hang.

[How]
 - consider clip rect size changes scaling changes, therefore full updates
 - refactor get_scaling_info_update_type for clarity
 - remove clip_size_change update flag

Clip rect size changes were previously demoted from full updates as an
optimization when the MPO + ODM policy changed to always pre-allocate MPO
pipes, but it created the issue described above. Personally testing this
use case, the performance feels fine with full update spam, and we expect
this is a fairly infrequent use case. If the performance needs to be
optimized in the future, consider reworking the entire update type logic
to run a DML pass and determine the update type based on what DML says
will actually change.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Joshua Aberback <joshua.aberback@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c