Commit 29118f12 authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/i915/fbc: Remove intel_fbc_global_disable()



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: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220315140001.1172-6-ville.syrjala@linux.intel.com


Reviewed-by: default avatarMika Kahola <mika.kahola@intel.com>
parent 7cfd1a18
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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();

+0 −19
Original line number Diff line number Diff line
@@ -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);
+0 −1
Original line number Diff line number Diff line
@@ -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);
+0 −4
Original line number Diff line number Diff line
@@ -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);