]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
drm/tilcdc: Fix module unloading
authorJyri Sarha <jsarha@ti.com>
Thu, 26 Feb 2015 08:12:41 +0000 (10:12 +0200)
committerJyri Sarha <jsarha@ti.com>
Wed, 27 May 2015 10:13:31 +0000 (13:13 +0300)
Force crtc dpms off before destroying the crtc instead of just
checking the dpms state. This fixes warning message and frozen picture
after tilcdc module unloading.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/tilcdc/tilcdc_crtc.c

index c73588483be02e0ba97e52017ff972e59841c4d7..c2d5980b996529117a9c412a3d48c02a0aea37a6 100644 (file)
@@ -135,11 +135,12 @@ static void stop(struct drm_crtc *crtc)
        tilcdc_clear(dev, LCDC_RASTER_CTRL_REG, LCDC_RASTER_ENABLE);
 }
 
+static void tilcdc_crtc_dpms(struct drm_crtc *crtc, int mode);
 static void tilcdc_crtc_destroy(struct drm_crtc *crtc)
 {
        struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
 
-       WARN_ON(tilcdc_crtc->dpms == DRM_MODE_DPMS_ON);
+       tilcdc_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
 
        drm_crtc_cleanup(crtc);
        drm_flip_work_cleanup(&tilcdc_crtc->unref_work);