drm/nouveau: Stop using drm_crtc_force_disable
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 17 Dec 2018 19:42:58 +0000 (20:42 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 11 Jan 2019 14:56:40 +0000 (15:56 +0100)
The correct way for legacy drivers to update properties that need to
do a full modeset, is to do a full modeset.

Note that we don't need to call the drm_mode_config_internal helper
because we're not changing any of the refcounted paramters.

v2: Fixup error handling (Ville). Since the old code didn't bother
I decided to just delete it instead of adding even more code for just
error handling.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
Cc: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181217194303.14397-2-daniel.vetter@ffwll.ch
drivers/gpu/drm/nouveau/dispnv04/tvnv17.c

index 6a4ca139cf5d71efb67427dd2f79eb886482d817..8fd8124d72ba7100bc02050013323aa5b7e272df 100644 (file)
@@ -750,7 +750,9 @@ static int nv17_tv_set_property(struct drm_encoder *encoder,
                /* Disable the crtc to ensure a full modeset is
                 * performed whenever it's turned on again. */
                if (crtc)
-                       drm_crtc_force_disable(crtc);
+                       drm_crtc_helper_set_mode(crtc, &crtc->mode,
+                                                crtc->x, crtc->y,
+                                                crtc->primary->fb);
        }
 
        return 0;