]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/tegra: dc: Reset VBLANK to off
authorThierry Reding <treding@nvidia.com>
Thu, 2 Jul 2015 15:04:06 +0000 (17:04 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 13 Aug 2015 11:47:40 +0000 (13:47 +0200)
Upon driver load, reset the VBLANK machinery to off to reflect the
hardware state. Since the ->reset() callback is called from the initial
drm_mode_config_reset() call, move the latter after the VBLANK machinery
initialization by drm_vblank_init().

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/dc.c
drivers/gpu/drm/tegra/drm.c

index a287e4fec8653d91e55bb2765e2379984b65bef5..8229b3f8213aab43cd3c5ba7cd60b1ef49a93522 100644 (file)
@@ -1015,6 +1015,8 @@ static void tegra_crtc_reset(struct drm_crtc *crtc)
                crtc->state = &state->base;
                crtc->state->crtc = crtc;
        }
+
+       drm_crtc_vblank_reset(crtc);
 }
 
 static struct drm_crtc_state *
index 2b1b0912679437596833d43359cbdd4467542c45..2965783fd0f8f63a2a83e2d945b9168fe1b30515 100644 (file)
@@ -171,8 +171,6 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags)
        if (err < 0)
                goto fbdev;
 
-       drm_mode_config_reset(drm);
-
        /*
         * We don't use the drm_irq_install() helpers provided by the DRM
         * core, so we need to set this manually in order to allow the
@@ -188,6 +186,8 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags)
        if (err < 0)
                goto device;
 
+       drm_mode_config_reset(drm);
+
        err = tegra_drm_fb_init(drm);
        if (err < 0)
                goto vblank;