drm/tilcdc: Call drm_crtc_vblank_on() and *_off() in start() and stop()
authorJyri Sarha <jsarha@ti.com>
Wed, 15 Jun 2016 08:16:23 +0000 (11:16 +0300)
committerJyri Sarha <jsarha@ti.com>
Mon, 8 Aug 2016 20:04:54 +0000 (23:04 +0300)
Add drm_crtc_vblank_on() and *_off() calls to start() and stop()
functions, to make sure any vblank waits etc. gets properly cleaned
up.

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

index 8013a74b5d1270495b7b4d81e5925310677001b3..dfbeba5f0435754f2f105833e636103028cbb52b 100644 (file)
@@ -109,6 +109,8 @@ static void start(struct drm_crtc *crtc)
        tilcdc_clear(dev, LCDC_DMA_CTRL_REG, LCDC_DUAL_FRAME_BUFFER_ENABLE);
        tilcdc_set(dev, LCDC_RASTER_CTRL_REG, LCDC_PALETTE_LOAD_MODE(DATA_ONLY));
        tilcdc_set(dev, LCDC_RASTER_CTRL_REG, LCDC_RASTER_ENABLE);
+
+       drm_crtc_vblank_on(crtc);
 }
 
 static void stop(struct drm_crtc *crtc)
@@ -132,6 +134,8 @@ static void stop(struct drm_crtc *crtc)
                        dev_err(dev->dev, "%s: timeout waiting for framedone\n",
                                __func__);
        }
+
+       drm_crtc_vblank_off(crtc);
 }
 
 static void tilcdc_crtc_destroy(struct drm_crtc *crtc)