Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c937ab3e authored by Paulo Zanoni's avatar Paulo Zanoni
Browse files

drm/i915/fbc: rename the FBC disable functions



Instead of:
 - intel_fbc_disable_crtc(crtc)
 - intel_fbc_disable(dev_priv)
we now have:
 - intel_fbc_disable(crtc)
 - intel_fbc_global_disable(dev_priv)

This is because all the other functions that take a CRTC are called
 - intel_fbc_something(crtc)
Instead of:
 - intel_fbc_something_crtc(crtc)

And I also hope that the word "global" is going to help make it more
explicit that "global" is the unusual case, not the opposite.

Reported-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1453210558-7875-14-git-send-email-paulo.r.zanoni@intel.com
parent 60eb2cc7
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -92,7 +92,7 @@ static void i915_restore_display(struct drm_device *dev)
	}
	}


	/* only restore FBC info on the platform that supports FBC*/
	/* only restore FBC info on the platform that supports FBC*/
	intel_fbc_disable(dev_priv);
	intel_fbc_global_disable(dev_priv);


	/* restore FBC interval */
	/* restore FBC interval */
	if (HAS_FBC(dev) && INTEL_INFO(dev)->gen <= 4 && !IS_G4X(dev))
	if (HAS_FBC(dev) && INTEL_INFO(dev)->gen <= 4 && !IS_G4X(dev))
+4 −4
Original line number Original line Diff line number Diff line
@@ -5124,7 +5124,7 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)


	intel_set_pch_fifo_underrun_reporting(dev_priv, pipe, true);
	intel_set_pch_fifo_underrun_reporting(dev_priv, pipe, true);


	intel_fbc_disable_crtc(intel_crtc);
	intel_fbc_disable(intel_crtc);
}
}


static void haswell_crtc_disable(struct drm_crtc *crtc)
static void haswell_crtc_disable(struct drm_crtc *crtc)
@@ -5176,7 +5176,7 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)
						      true);
						      true);
	}
	}


	intel_fbc_disable_crtc(intel_crtc);
	intel_fbc_disable(intel_crtc);
}
}


static void i9xx_pfit_enable(struct intel_crtc *crtc)
static void i9xx_pfit_enable(struct intel_crtc *crtc)
@@ -6352,7 +6352,7 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)
	if (!IS_GEN2(dev))
	if (!IS_GEN2(dev))
		intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, false);
		intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, false);


	intel_fbc_disable_crtc(intel_crtc);
	intel_fbc_disable(intel_crtc);
}
}


static void intel_crtc_disable_noatomic(struct drm_crtc *crtc)
static void intel_crtc_disable_noatomic(struct drm_crtc *crtc)
@@ -16041,7 +16041,7 @@ void intel_modeset_cleanup(struct drm_device *dev)


	intel_unregister_dsm_handler();
	intel_unregister_dsm_handler();


	intel_fbc_disable(dev_priv);
	intel_fbc_global_disable(dev_priv);


	/* flush any delayed tasks or pending work */
	/* flush any delayed tasks or pending work */
	flush_scheduled_work();
	flush_scheduled_work();
+2 −2
Original line number Original line Diff line number Diff line
@@ -1334,8 +1334,8 @@ void intel_fbc_pre_update(struct intel_crtc *crtc);
void intel_fbc_post_update(struct intel_crtc *crtc);
void intel_fbc_post_update(struct intel_crtc *crtc);
void intel_fbc_init(struct drm_i915_private *dev_priv);
void intel_fbc_init(struct drm_i915_private *dev_priv);
void intel_fbc_enable(struct intel_crtc *crtc);
void intel_fbc_enable(struct intel_crtc *crtc);
void intel_fbc_disable(struct drm_i915_private *dev_priv);
void intel_fbc_disable(struct intel_crtc *crtc);
void intel_fbc_disable_crtc(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,
void intel_fbc_invalidate(struct drm_i915_private *dev_priv,
			  unsigned int frontbuffer_bits,
			  unsigned int frontbuffer_bits,
			  enum fb_op_origin origin);
			  enum fb_op_origin origin);
+4 −4
Original line number Original line Diff line number Diff line
@@ -1078,12 +1078,12 @@ static void __intel_fbc_disable(struct drm_i915_private *dev_priv)
}
}


/**
/**
 * intel_fbc_disable_crtc - disable FBC if it's associated with crtc
 * intel_fbc_disable - disable FBC if it's associated with crtc
 * @crtc: the CRTC
 * @crtc: the CRTC
 *
 *
 * This function disables FBC if it's associated with the provided CRTC.
 * This function disables FBC if it's associated with the provided CRTC.
 */
 */
void intel_fbc_disable_crtc(struct intel_crtc *crtc)
void intel_fbc_disable(struct intel_crtc *crtc)
{
{
	struct drm_i915_private *dev_priv = crtc->base.dev->dev_private;
	struct drm_i915_private *dev_priv = crtc->base.dev->dev_private;
	struct intel_fbc *fbc = &dev_priv->fbc;
	struct intel_fbc *fbc = &dev_priv->fbc;
@@ -1101,12 +1101,12 @@ void intel_fbc_disable_crtc(struct intel_crtc *crtc)
}
}


/**
/**
 * intel_fbc_disable - globally disable FBC
 * intel_fbc_global_disable - globally disable FBC
 * @dev_priv: i915 device instance
 * @dev_priv: i915 device instance
 *
 *
 * This function disables FBC regardless of which CRTC is associated with it.
 * This function disables FBC regardless of which CRTC is associated with it.
 */
 */
void intel_fbc_disable(struct drm_i915_private *dev_priv)
void intel_fbc_global_disable(struct drm_i915_private *dev_priv)
{
{
	struct intel_fbc *fbc = &dev_priv->fbc;
	struct intel_fbc *fbc = &dev_priv->fbc;