OSDN Git Service

drm/i915/fbc: Remove intel_fbc_global_disable()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 15 Mar 2022 13:59:59 +0000 (15:59 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 13 Apr 2022 14:19:04 +0000 (17:19 +0300)
By the time intel_fbc_global_disable() gets called during driver
teardown we should have already disabled all the crtcs, so
no way FBC should be enabled at this point.

And I have no idea what the other user (i915_restore_display())
is even trying to achieve.

So let's just throw intel_fbc_global_disable() into the bin.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220315140001.1172-6-ville.syrjala@linux.intel.com
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_fbc.c
drivers/gpu/drm/i915/display/intel_fbc.h
drivers/gpu/drm/i915/i915_suspend.c

index ca997a0..5b020ff 100644 (file)
@@ -10568,8 +10568,6 @@ void intel_modeset_driver_remove_noirq(struct drm_i915_private *i915)
 
        intel_unregister_dsm_handler();
 
-       intel_fbc_global_disable(i915);
-
        /* flush any delayed tasks or pending work */
        flush_scheduled_work();
 
index a4b6c8c..79be87c 100644 (file)
@@ -1517,25 +1517,6 @@ void intel_fbc_update(struct intel_atomic_state *state,
        }
 }
 
-/**
- * intel_fbc_global_disable - globally disable FBC
- * @i915: i915 device instance
- *
- * This function disables FBC regardless of which CRTC is associated with it.
- */
-void intel_fbc_global_disable(struct drm_i915_private *i915)
-{
-       struct intel_fbc *fbc;
-       enum intel_fbc_id fbc_id;
-
-       for_each_intel_fbc(i915, fbc, fbc_id) {
-               mutex_lock(&fbc->lock);
-               if (fbc->state.plane)
-                       __intel_fbc_disable(fbc);
-               mutex_unlock(&fbc->lock);
-       }
-}
-
 static void intel_fbc_underrun_work_fn(struct work_struct *work)
 {
        struct intel_fbc *fbc = container_of(work, typeof(*fbc), underrun_work);
index 8c5a733..29e4216 100644 (file)
@@ -33,7 +33,6 @@ void intel_fbc_cleanup(struct drm_i915_private *dev_priv);
 void intel_fbc_update(struct intel_atomic_state *state,
                      struct intel_crtc *crtc);
 void intel_fbc_disable(struct intel_crtc *crtc);
-void intel_fbc_global_disable(struct drm_i915_private *dev_priv);
 void intel_fbc_invalidate(struct drm_i915_private *dev_priv,
                          unsigned int frontbuffer_bits,
                          enum fb_op_origin origin);
index 889f5b7..81def10 100644 (file)
@@ -25,7 +25,6 @@
  */
 
 #include "display/intel_de.h"
-#include "display/intel_fbc.h"
 #include "display/intel_gmbus.h"
 #include "display/intel_vga.h"
 
@@ -119,9 +118,6 @@ void i915_restore_display(struct drm_i915_private *dev_priv)
        if (GRAPHICS_VER(dev_priv) <= 4)
                intel_de_write(dev_priv, DSPARB, dev_priv->regfile.saveDSPARB);
 
-       /* only restore FBC info on the platform that supports FBC*/
-       intel_fbc_global_disable(dev_priv);
-
        intel_vga_redisable(dev_priv);
 
        intel_gmbus_reset(dev_priv);