drm/i915: Fix DRRS frontbuffer_bits handling
Now that DRRS can operate on multiple pipes we need to make sure one pipe doesn't throw away the other pipe's frontbuffer_bits before said pipe can handle them. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220315132752.11849-4-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
This commit is contained in:
parent
ead8fb9c78
commit
18f23b9218
@ -258,7 +258,7 @@ static void intel_drrs_downclock_work(struct work_struct *work)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void intel_drrs_frontbuffer_update(struct drm_i915_private *dev_priv,
|
static void intel_drrs_frontbuffer_update(struct drm_i915_private *dev_priv,
|
||||||
unsigned int frontbuffer_bits,
|
unsigned int all_frontbuffer_bits,
|
||||||
bool invalidate)
|
bool invalidate)
|
||||||
{
|
{
|
||||||
struct intel_crtc *crtc;
|
struct intel_crtc *crtc;
|
||||||
@ -267,6 +267,8 @@ static void intel_drrs_frontbuffer_update(struct drm_i915_private *dev_priv,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
for_each_intel_crtc(&dev_priv->drm, crtc) {
|
for_each_intel_crtc(&dev_priv->drm, crtc) {
|
||||||
|
unsigned int frontbuffer_bits;
|
||||||
|
|
||||||
cancel_delayed_work(&crtc->drrs.work);
|
cancel_delayed_work(&crtc->drrs.work);
|
||||||
|
|
||||||
mutex_lock(&crtc->drrs.mutex);
|
mutex_lock(&crtc->drrs.mutex);
|
||||||
@ -276,7 +278,7 @@ static void intel_drrs_frontbuffer_update(struct drm_i915_private *dev_priv,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
frontbuffer_bits &= INTEL_FRONTBUFFER_ALL_MASK(crtc->pipe);
|
frontbuffer_bits = all_frontbuffer_bits & INTEL_FRONTBUFFER_ALL_MASK(crtc->pipe);
|
||||||
if (invalidate)
|
if (invalidate)
|
||||||
crtc->drrs.busy_frontbuffer_bits |= frontbuffer_bits;
|
crtc->drrs.busy_frontbuffer_bits |= frontbuffer_bits;
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user