[Intel-gfx] [PATCH 3/4] drm/i915/psr: Provide block functionality for RPM.

Chris Wilson chris at chris-wilson.co.uk
Thu Aug 4 02:43:06 UTC 2016


On Wed, Aug 03, 2016 at 02:44:37PM -0700, Rodrigo Vivi wrote:
> +void intel_psr_rpm_block(struct drm_i915_private *dev_priv)
> +{
	if (WARN_ON(dev_priv->psr.rpm_block))
		return;

	dev_priv->psr.rpm_block = true;

	if (READ_ONCE(!dev_priv->psr.enabled))
		return;

	mutex_lock(&dev_priv->psr.lock);
	intel_psr_exit(dev_priv);
	mutex_unlock(&dev_priv->psr.lock);
> +}

> +void intel_psr_rpm_unblock(struct drm_i915_private *dev_priv)
> +{
	if (WARN_ON(!dev_priv->psr.rpm_block))
		return;

	dev_priv->psr.rpm_block = false;

	if (READ_ONCE(!dev_priv->psr.enabled))
		return;

	mutex_lock(&dev_priv->psr.lock);
	/* intel_psr_enter() ? */
	if (dev_priv->psr.enabled)
		schedule_delayed_work(&dev_priv->psr.work, msecs_to_jiffies(100));
	mutex_unlock(&dev_priv->psr.lock);
> +}

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list