]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
drm/amd/display: Clear stream->mode_changed after commit
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Fri, 25 Jan 2019 20:23:09 +0000 (15:23 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 May 2019 18:55:24 +0000 (20:55 +0200)
commit901542048f28cb1aa84511348743f19c1a5282d0
tree878d9514e1150f070c716c8aa33fd78f5ce7f9d1
parent48aad1f6068bbf3c3666c3599e2c7559a5fa0d41
drm/amd/display: Clear stream->mode_changed after commit

BugLink: https://bugs.launchpad.net/bugs/1828410
[ Upstream commit d8d2f174bcc2c26c3485c70e0c6fe22b27bce739 ]

[Why]
The stream->mode_changed flag can persist in the following sequence
of atomic commits:

Commit 1:
Enable CRTC0 (mode_changed = true), Enable CRTC1 (mode_changed = true)

Commit 2:
Disable CRTC1 (mode_changed = false)

In this sequence we want to keep the exiting CRTC0 but it's not in the
atomic state for the commit since it hasn't been modified. In this case
the stream->mode_changed flag persists as true and we don't re-program
the planes for the existing stream.

[How]
The flag needs to be cleared and it makes the most sense to do it within
DC after the state has been committed. Nothing following dc_commit_state
should think that the stream's mode has changed.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
Acked-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/gpu/drm/amd/display/dc/core/dc.c