Skip to content

Commit

Permalink
Revert "drm/i915: Nuke ORIGIN_GTT"
Browse files Browse the repository at this point in the history
This reverts commit 6154356.

Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
  • Loading branch information
Timo Aaltonen committed Jun 27, 2022
1 parent 0ab156b commit db0d119
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion drivers/gpu/drm/i915/display/intel_fbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ void intel_fbc_invalidate(struct drm_i915_private *dev_priv,
if (!HAS_FBC(dev_priv))
return;

if (origin == ORIGIN_FLIP)
if (origin == ORIGIN_GTT || origin == ORIGIN_FLIP)
return;

mutex_lock(&fbc->lock);
Expand All @@ -1157,6 +1157,14 @@ 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;
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/i915/display/intel_frontbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
struct drm_i915_private;

enum fb_op_origin {
ORIGIN_CPU = 0,
ORIGIN_GTT,
ORIGIN_CPU,
ORIGIN_CS,
ORIGIN_FLIP,
ORIGIN_DIRTYFB,
Expand Down

0 comments on commit db0d119

Please sign in to comment.