]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: reuse current context instead of recreating one
authorBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Wed, 6 Jan 2021 16:23:05 +0000 (11:23 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 2 Feb 2021 22:39:06 +0000 (17:39 -0500)
commitcf043f853ba5fb4cfdb811e4960309c1e740fb5f
treeee33b6a3738dc906618338bb5fa3551b1cd00212
parent492a71755cfae0c21d97869143338db2f9cdc27a
drm/amd/display: reuse current context instead of recreating one

[Why]
Currently we discard the current context and recreate it. The current
context is what is applied to the HW so we should be re-using this
rather than creating a new context.

Recreating the context can lead to mismatch between new context and the
current context

For example: gsl groups get changed when we create a new context this
can cause issues in a multi display config (with flip immediate) because
we don't align the existing gsl groups in the new and current context.
If we reuse the current context the gsl group assignment stays the same.

[How]
Instead of discarding the current context, we instead just copy the
current state and add/remove planes and streams.

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Anson Jacob <Anson.Jacob@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dc_stream.h