Commit 18f23b92 authored by Ville Syrjälä's avatar Ville Syrjälä

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: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220315132752.11849-4-ville.syrjala@linux.intel.comReviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
parent ead8fb9c
......@@ -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,
unsigned int frontbuffer_bits,
unsigned int all_frontbuffer_bits,
bool invalidate)
{
struct intel_crtc *crtc;
......@@ -267,6 +267,8 @@ static void intel_drrs_frontbuffer_update(struct drm_i915_private *dev_priv,
return;
for_each_intel_crtc(&dev_priv->drm, crtc) {
unsigned int frontbuffer_bits;
cancel_delayed_work(&crtc->drrs.work);
mutex_lock(&crtc->drrs.mutex);
......@@ -276,7 +278,7 @@ static void intel_drrs_frontbuffer_update(struct drm_i915_private *dev_priv,
continue;
}
frontbuffer_bits &= INTEL_FRONTBUFFER_ALL_MASK(crtc->pipe);
frontbuffer_bits = all_frontbuffer_bits & INTEL_FRONTBUFFER_ALL_MASK(crtc->pipe);
if (invalidate)
crtc->drrs.busy_frontbuffer_bits |= frontbuffer_bits;
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment