]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.19.34/drm-nouveau-stop-using-drm_crtc_force_disable.patch
Linux 4.19.34
[thirdparty/kernel/stable-queue.git] / releases / 4.19.34 / drm-nouveau-stop-using-drm_crtc_force_disable.patch
1 From 98e9c9d6078aabe6e0d2db577ed916d33ce66de2 Mon Sep 17 00:00:00 2001
2 From: Daniel Vetter <daniel.vetter@ffwll.ch>
3 Date: Mon, 17 Dec 2018 20:42:58 +0100
4 Subject: drm/nouveau: Stop using drm_crtc_force_disable
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 [ Upstream commit 934c5b32a5e43d8de2ab4f1566f91d7c3bf8cb64 ]
10
11 The correct way for legacy drivers to update properties that need to
12 do a full modeset, is to do a full modeset.
13
14 Note that we don't need to call the drm_mode_config_internal helper
15 because we're not changing any of the refcounted paramters.
16
17 v2: Fixup error handling (Ville). Since the old code didn't bother
18 I decided to just delete it instead of adding even more code for just
19 error handling.
20
21 Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
22 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
23 Cc: Sean Paul <seanpaul@chromium.org>
24 Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
25 Link: https://patchwork.freedesktop.org/patch/msgid/20181217194303.14397-2-daniel.vetter@ffwll.ch
26 Signed-off-by: Sasha Levin <sashal@kernel.org>
27 ---
28 drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 4 +++-
29 1 file changed, 3 insertions(+), 1 deletion(-)
30
31 diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
32 index 6a4ca139cf5d..8fd8124d72ba 100644
33 --- a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
34 +++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
35 @@ -750,7 +750,9 @@ static int nv17_tv_set_property(struct drm_encoder *encoder,
36 /* Disable the crtc to ensure a full modeset is
37 * performed whenever it's turned on again. */
38 if (crtc)
39 - drm_crtc_force_disable(crtc);
40 + drm_crtc_helper_set_mode(crtc, &crtc->mode,
41 + crtc->x, crtc->y,
42 + crtc->primary->fb);
43 }
44
45 return 0;
46 --
47 2.19.1
48