drm/i915: Wait for vblank in hsw_enable_ips()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 15 Apr 2014 18:41:35 +0000 (21:41 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 21 May 2014 07:55:52 +0000 (09:55 +0200)
Now that the vblank wait is gone from intel_enable_primary_plane(),
hsw_enable_ips() needs to do the vblank wait itself.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_sprite.c

index 930746527e9d8c0e46a4ed0ce0e48aa0b7d8dbe2..bcfe0a8692ddccdb994aba29b714737676247f74 100644 (file)
@@ -3734,17 +3734,17 @@ static void intel_disable_planes(struct drm_crtc *crtc)
 
 void hsw_enable_ips(struct intel_crtc *crtc)
 {
-       struct drm_i915_private *dev_priv = crtc->base.dev->dev_private;
+       struct drm_device *dev = crtc->base.dev;
+       struct drm_i915_private *dev_priv = dev->dev_private;
 
        if (!crtc->config.ips_enabled)
                return;
 
-       /* We can only enable IPS after we enable a plane and wait for a vblank.
-        * We guarantee that the plane is enabled by calling intel_enable_ips
-        * only after intel_enable_plane. And intel_enable_plane already waits
-        * for a vblank, so all we need to do here is to enable the IPS bit. */
+       /* We can only enable IPS after we enable a plane and wait for a vblank */
+       intel_wait_for_vblank(dev, crtc->pipe);
+
        assert_plane_enabled(dev_priv, crtc->plane);
-       if (IS_BROADWELL(crtc->base.dev)) {
+       if (IS_BROADWELL(dev)) {
                mutex_lock(&dev_priv->rps.hw_lock);
                WARN_ON(sandybridge_pcode_write(dev_priv, DISPLAY_IPS_CONTROL, 0xc0000000));
                mutex_unlock(&dev_priv->rps.hw_lock);
index 213cd58f041252ef19573d8d15a1182aea8f1d5c..7780f6ce73ec2c8dc667d200325910c7161aa1d9 100644 (file)
@@ -696,10 +696,7 @@ intel_post_enable_primary(struct drm_crtc *crtc)
         * when going from primary only to sprite only and vice
         * versa.
         */
-       if (intel_crtc->config.ips_enabled) {
-               intel_wait_for_vblank(dev, intel_crtc->pipe);
-               hsw_enable_ips(intel_crtc);
-       }
+       hsw_enable_ips(intel_crtc);
 
        mutex_lock(&dev->struct_mutex);
        intel_update_fbc(dev);