summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLyude Paul <lyude@redhat.com>2020-02-12 18:11:49 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-28 16:38:55 +0100
commit0e3a6e86d43bd24d8ab02e2343d73f85ec093839 (patch)
treeee5a62b6cce7e7e9295cc92d6bef672c07c1fb87
parentda3418ad747fa035a1a88c6883dd2c7d7142ffc4 (diff)
downloadlinux-0e3a6e86d43bd24d8ab02e2343d73f85ec093839.tar.gz
linux-0e3a6e86d43bd24d8ab02e2343d73f85ec093839.tar.bz2
linux-0e3a6e86d43bd24d8ab02e2343d73f85ec093839.zip
drm/nouveau/kms/gv100-: Re-set LUT after clearing for modesets
[ Upstream commit f287d3d19769b1d22cba4e51fa0487f2697713c9 ] While certain modeset operations on gv100+ need us to temporarily disable the LUT, we make the mistake of sometimes neglecting to reprogram the LUT after such modesets. In particular, moving a head from one encoder to another seems to trigger this quite often. GV100+ is very picky about having a LUT in most scenarios, so this causes the display engine to hang with the following error code: disp: chid 1 stat 00005080 reason 5 [INVALID_STATE] mthd 0200 data 00000001 code 0000002d) So, fix this by always re-programming the LUT if we're clearing it in a state where the wndw is still visible, and has a XLUT handle programmed. Signed-off-by: Lyude Paul <lyude@redhat.com> Fixes: facaed62b4cb ("drm/nouveau/kms/gv100: initial support") Cc: <stable@vger.kernel.org> # v4.18+ Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/wndw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.c b/drivers/gpu/drm/nouveau/dispnv50/wndw.c
index b3db4553098d..d343ae66c64f 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/wndw.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/wndw.c
@@ -405,6 +405,8 @@ nv50_wndw_atomic_check(struct drm_plane *plane, struct drm_plane_state *state)
asyw->clr.ntfy = armw->ntfy.handle != 0;
asyw->clr.sema = armw->sema.handle != 0;
asyw->clr.xlut = armw->xlut.handle != 0;
+ if (asyw->clr.xlut && asyw->visible)
+ asyw->set.xlut = asyw->xlut.handle != 0;
if (wndw->func->image_clr)
asyw->clr.image = armw->image.handle[0] != 0;
}