This Linux kernel change "Revert “drm/amd/display: Enable fast plane updates when state->allow_modeset = true”" is included in the Linux 5.3 release. This change is authored by Nicholas Kazlauskas <nicholas.kazlauskas [at] amd.com> on Thu Jun 20 08:30:09 2019 -0400. The commit for this change in Linux stable tree is 70a1efa (patch).
Revert "drm/amd/display: Enable fast plane updates when state->allow_modeset = true" This reverts commit ebc8c6f18322ad54275997a888ca1731d74b711f. There are still missing corner cases with cursor interaction and these fast plane updates on Picasso and Raven2 leading to endless PSTATE warnings for typical desktop usage depending on the userspace. This change should be reverted until these issues have been resolved. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110949 Signed-off-by: Nicholas Kazlauskas <email@example.com> Reviewed-by: David Francis <firstname.lastname@example.org> Signed-off-by: Alex Deucher <email@example.com>
There are 8 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 35530f6..6bea5fe 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -6528,6 +6528,14 @@ static bool should_reset_plane(struct drm_atomic_state *state, struct drm_crtc_state *new_crtc_state; int i; + /* + * TODO: Remove this hack once the checks below are sufficient + * enough to determine when we need to reset all the planes on + * the stream. + */ + if (state->allow_modeset) + return true; + /* Exit early if we know that we're adding or removing the plane. */ if (old_plane_state->crtc != new_plane_state->crtc) return true;