linux/drivers/gpu/drm/i915/intel_psr.c
/**
 * intel_psr_init - Init basic PSR work and mutex.
 * @dev_priv: i915 device private
 *
 * This function is  called only once at driver load to initialize basic
 * PSR stuff.
 */
Init basic PSR work and mutex.
@dev_priv: i915 device private

This function is  called only once at driver load to initialize basic
PSR stuff.
Init basic PSR work and mutex . @dev_priv : i915 device private This function is called only once at driver load to initialize basic PSR stuff .
void intel_psr_init(struct drm_i915_private *dev_priv)
{
	if (!HAS_PSR(dev_priv))
		return;
	dev_priv->psr_mmio_base = IS_HASWELL(dev_priv) ?
		HSW_EDP_PSR_BASE : BDW_EDP_PSR_BASE;
	if (!dev_priv->psr.sink_support)
		return;
	if (i915_modparams.enable_psr == -1) {
		i915_modparams.enable_psr = dev_priv->vbt.psr.enable;
		i915_modparams.enable_psr = 0;
	}
	if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
		dev_priv->psr.link_standby = false;
	else
		dev_priv->psr.link_standby = dev_priv->vbt.psr.full_link;
	INIT_WORK(&dev_priv->psr.work, intel_psr_work);
	mutex_init(&dev_priv->psr.lock);
}
void intel_psr_init ( struct drm_i915_private * dev_priv ) { if ( ! HAS_PSR ( dev_priv ) ) return ; dev_priv -> psr_mmio_base = IS_HASWELL ( dev_priv ) ? HSW_EDP_PSR_BASE : BDW_EDP_PSR_BASE ; if ( ! dev_priv -> psr . sink_support ) return ; if ( i915_modparams . enable_psr == -1 ) { i915_modparams . enable_psr = dev_priv -> vbt . psr . enable ; i915_modparams . enable_psr = 0 ; } if ( IS_HASWELL ( dev_priv ) || IS_BROADWELL ( dev_priv ) ) dev_priv -> psr . link_standby = false ; else dev_priv -> psr . link_standby = dev_priv -> vbt . psr . full_link ; INIT_WORK ( & dev_priv -> psr . work , intel_psr_work ) ; mutex_init ( & dev_priv -> psr . lock ) ; }
intel_psr_init - Init basic PSR work and mutex.
intel_psr_init - Init basic PSR work and mutex .
/* Per platform default: all disabled. */ /* Set link_standby x link_off defaults */ /* HSW and BDW require workarounds that we don't implement. */ /* For new platforms let's respect VBT back again */