aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <[email protected]>2020-04-29 13:10:28 +0300
committerVille Syrjälä <[email protected]>2020-06-30 20:39:18 +0300
commitd838962f165c4bdbed9047b0f4d9ecd783e04b71 (patch)
treec47d2df22938969010dfe161bb96be5e06bdd422
parent5331889b5ffb11d6257953e418291a9f04c02bed (diff)
drm/i915/fbc: Don't clear busy_bits for origin==GTT
The hardware host tracking won't nuke the entire cfb (unless the entire fb is written through the gtt) so don't clear the busy_bits for gtt tracking. Not that it really matters anymore since we've lost ORIGIN_GTT usage everywhere. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: José Roberto de Souza <[email protected]>
-rw-r--r--drivers/gpu/drm/i915/display/intel_fbc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
index 2312e70e2e5e..90088c77c059 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -1078,11 +1078,19 @@ void intel_fbc_flush(struct drm_i915_private *dev_priv,
if (!HAS_FBC(dev_priv))
return;
+ /*
+ * GTT tracking does not nuke the entire cfb
+ * so don't clear busy_bits set for some other
+ * reason.
+ */
+ if (origin == ORIGIN_GTT)
+ return;
+
mutex_lock(&fbc->lock);
fbc->busy_bits &= ~frontbuffer_bits;
- if (origin == ORIGIN_GTT || origin == ORIGIN_FLIP)
+ if (origin == ORIGIN_FLIP)
goto out;
if (!fbc->busy_bits && fbc->crtc &&