linux/drivers/gpu/drm/i915/intel_psr.c
/**
 * intel_psr_invalidate - Invalidade PSR
 * @dev_priv: i915 device
 * @frontbuffer_bits: frontbuffer plane tracking bits
 * @origin: which operation caused the invalidate
 *
 * Since the hardware frontbuffer tracking has gaps we need to integrate
 * with the software frontbuffer tracking. This function gets called every
 * time frontbuffer rendering starts and a buffer gets dirtied. PSR must be
 * disabled if the frontbuffer mask contains a buffer relevant to PSR.
 *
 * Dirty frontbuffers relevant to PSR are tracked in busy_frontbuffer_bits."
 */
Invalidade PSR
@dev_priv: i915 device
@frontbuffer_bits: frontbuffer plane tracking bits
@origin: which operation caused the invalidate

Since the hardware frontbuffer tracking has gaps we need to integrate
with the software frontbuffer tracking. This function gets called every
time frontbuffer rendering starts and a buffer gets dirtied. PSR must be
disabled if the frontbuffer mask contains a buffer relevant to PSR.

Dirty frontbuffers relevant to PSR are tracked in busy_frontbuffer_bits."
Invalidade PSR @dev_priv : i915 device @frontbuffer_bits : frontbuffer plane tracking bits @origin : which operation caused the invalidate Since the hardware frontbuffer tracking has gaps we need to integrate with the software frontbuffer tracking . This function gets called every time frontbuffer rendering starts and a buffer gets dirtied . PSR must be disabled if the frontbuffer mask contains a buffer relevant to PSR . Dirty frontbuffers relevant to PSR are tracked in busy_frontbuffer_bits . "
void intel_psr_invalidate(struct drm_i915_private *dev_priv,
			  unsigned frontbuffer_bits, enum fb_op_origin origin)
{
	struct drm_crtc *crtc;
	enum pipe pipe;
	if (!CAN_PSR(dev_priv))
		return;
	if (origin == ORIGIN_FLIP)
		return;
	mutex_lock(&dev_priv->psr.lock);
	if (!dev_priv->psr.enabled) {
		mutex_unlock(&dev_priv->psr.lock);
		return;
	}
	crtc = dp_to_dig_port(dev_priv->psr.enabled)->base.base.crtc;
	pipe = to_intel_crtc(crtc)->pipe;
	frontbuffer_bits &= INTEL_FRONTBUFFER_ALL_MASK(pipe);
	dev_priv->psr.busy_frontbuffer_bits |= frontbuffer_bits;
	if (frontbuffer_bits)
		intel_psr_exit(dev_priv);
	mutex_unlock(&dev_priv->psr.lock);
}
void intel_psr_invalidate ( struct drm_i915_private * dev_priv , unsigned frontbuffer_bits , enum fb_op_origin origin ) { struct drm_crtc * crtc ; enum pipe pipe ; if ( ! CAN_PSR ( dev_priv ) ) return ; if ( origin == ORIGIN_FLIP ) return ; mutex_lock ( & dev_priv -> psr . lock ) ; if ( ! dev_priv -> psr . enabled ) { mutex_unlock ( & dev_priv -> psr . lock ) ; return ; } crtc = dp_to_dig_port ( dev_priv -> psr . enabled ) -> base . base . crtc ; pipe = to_intel_crtc ( crtc ) -> pipe ; frontbuffer_bits &= INTEL_FRONTBUFFER_ALL_MASK ( pipe ) ; dev_priv -> psr . busy_frontbuffer_bits |= frontbuffer_bits ; if ( frontbuffer_bits ) intel_psr_exit ( dev_priv ) ; mutex_unlock ( & dev_priv -> psr . lock ) ; }
intel_psr_invalidate - Invalidade PSR
 @dev_priv: i915 device
 @frontbuffer_bits: frontbuffer plane tracking bits
 @origin: which operation caused the invalidate
intel_psr_invalidate - Invalidade PSR @dev_priv : i915 device @frontbuffer_bits : frontbuffer plane tracking bits @origin : which operation caused the invalidate