]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/amd/display: Drop dm_determine_update_type_for_commit
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tue, 28 Jul 2020 15:08:02 +0000 (11:08 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Aug 2020 19:49:15 +0000 (15:49 -0400)
commitf6d7c7faf0ee69569bc2ad309f48ab76785d2972
treebc6fdef5d9c3b3cc1d37e6e82965f3879cd2775b
parentdc4cb30deec713888d31ec6d81c8ca34605089d5
drm/amd/display: Drop dm_determine_update_type_for_commit

[Why]
This was added in the past to solve the issue of not knowing when
to stall for medium and full updates in DM.

Since DC is ultimately decides what requires bandwidth changes we
wanted to make use of it directly to determine this.

The problem is that we can't actually pass any of the stream or surface
updates into DC global validation, so we don't actually check if the new
configuration is valid - we just validate the old existing config
instead and stall for outstanding commits to finish.

There's also the problem of grabbing the DRM private object for
pageflips which can lead to page faults in the case where commits
execute out of order and free a DRM private object state that was
still required for commit tail.

[How]
Now that we reset the plane in DM with the same conditions DC checks
we can have planes go through DC validation and we know when we need
to check and stall based on whether the stream or planes changed.

We mark lock_and_validation_needed whenever we've done this, so just
go back to using that instead of dm_determine_update_type_for_commit.

Since we'll skip resetting the plane for a pageflip we will no longer
grab the DRM private object for pageflips as well, avoiding the
page fault issued caused by pageflipping under load with commits
executing out of order.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c