Commit de9cb5f2 authored by Jyri Sarha's avatar Jyri Sarha

drm/tilcdc: Fix module unloading

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: default avatarJyri Sarha <jsarha@ti.com>
Acked-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent ba155e2d
...@@ -135,11 +135,12 @@ static void stop(struct drm_crtc *crtc) ...@@ -135,11 +135,12 @@ static void stop(struct drm_crtc *crtc)
tilcdc_clear(dev, LCDC_RASTER_CTRL_REG, LCDC_RASTER_ENABLE); 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) static void tilcdc_crtc_destroy(struct drm_crtc *crtc)
{ {
struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_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_crtc_cleanup(crtc);
drm_flip_work_cleanup(&tilcdc_crtc->unref_work); drm_flip_work_cleanup(&tilcdc_crtc->unref_work);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment