drm/i915: Ditch intel_edp_psr_update
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 18 Jun 2014 11:59:03 +0000 (13:59 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 19 Jun 2014 07:58:58 +0000 (09:58 +0200)
We have _enable/_disable interfaces now for the modeset sequence and
intel_edp_psr_exit for workarounds.

The callsites in intel_display.c are all redundant with the modeset
sequence enable/disable calls in intel_ddi.c. The one in
intel_sprite.c is real and needs to be switched to psr_exit.

If this breaks anything then we need to augment the enable/disable
functions accordingly.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_sprite.c

index 5e8e7113b453511a839c4715f82dcdd32be6523c..88d9d815cd20d880d33c3f0bc66365368ea9ceba 100644 (file)
@@ -2763,7 +2763,6 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
 
        mutex_lock(&dev->struct_mutex);
        intel_update_fbc(dev);
-       intel_edp_psr_update(dev);
        mutex_unlock(&dev->struct_mutex);
 
        return 0;
@@ -3943,7 +3942,6 @@ static void intel_crtc_enable_planes(struct drm_crtc *crtc)
 
        mutex_lock(&dev->struct_mutex);
        intel_update_fbc(dev);
-       intel_edp_psr_update(dev);
        mutex_unlock(&dev->struct_mutex);
 }
 
@@ -4236,7 +4234,6 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)
 
        mutex_lock(&dev->struct_mutex);
        intel_update_fbc(dev);
-       intel_edp_psr_update(dev);
        mutex_unlock(&dev->struct_mutex);
 }
 
@@ -4284,7 +4281,6 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)
 
        mutex_lock(&dev->struct_mutex);
        intel_update_fbc(dev);
-       intel_edp_psr_update(dev);
        mutex_unlock(&dev->struct_mutex);
 }
 
@@ -4836,7 +4832,6 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)
 
        mutex_lock(&dev->struct_mutex);
        intel_update_fbc(dev);
-       intel_edp_psr_update(dev);
        mutex_unlock(&dev->struct_mutex);
 }
 
index 74e194d66bba8d3146760653c21d81d3d1a5f57c..b373b895fe4836e23138a406d71c393aaa6f0c5c 100644 (file)
@@ -1875,19 +1875,6 @@ void intel_edp_psr_disable(struct intel_dp *intel_dp)
        dev_priv->psr.enabled = false;
 }
 
-void intel_edp_psr_update(struct drm_device *dev)
-{
-       struct drm_i915_private *dev_priv = dev->dev_private;
-
-       if (!HAS_PSR(dev))
-               return;
-
-       if (!dev_priv->psr.setup_done)
-               return;
-
-       intel_edp_psr_exit(dev, true);
-}
-
 static void intel_edp_psr_work(struct work_struct *work)
 {
        struct drm_i915_private *dev_priv =
index ab5962b80f48ff46cc637e8cb99966f8c53551cf..e92354c9bb44e7d5f6f86c8bd232120664921f9c 100644 (file)
@@ -834,7 +834,6 @@ void intel_edp_panel_on(struct intel_dp *intel_dp);
 void intel_edp_panel_off(struct intel_dp *intel_dp);
 void intel_edp_psr_enable(struct intel_dp *intel_dp);
 void intel_edp_psr_disable(struct intel_dp *intel_dp);
-void intel_edp_psr_update(struct drm_device *dev);
 void intel_dp_set_drrs_state(struct drm_device *dev, int refresh_rate);
 void intel_edp_psr_exit(struct drm_device *dev, bool schedule_back);
 void intel_edp_psr_init(struct drm_device *dev);
index 404335d53a89545edfc69d984ebfab07a3e6ec64..2a211c64ec8dcec9d4ca10288a892d76490a2299 100644 (file)
@@ -1051,7 +1051,7 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
                mutex_unlock(&dev->struct_mutex);
        }
 
-       intel_edp_psr_update(dev);
+       intel_edp_psr_exit(dev, true);
 
        return 0;
 }