[RFC PATCH 11/22] drm/i915/display: Remove unused frontbuffer tracking interfaces

Jouni Högander jouni.hogander at intel.com
Mon Mar 27 12:37:21 UTC 2023


We are following new strategy to rely purely on dirtyfb callback. Now
we have removed all other references to frontbuffer tracking code except:

intel_frontbuffer_flush:
  This is supposed to be called from dirtyfb ioctl.

frontbuffer_flush:
  This is purely for intel_overlay.

intel_frontbuffer_track:
  This is called as a part of atomic commit to identify framebuffers
  that are currently frontbuffer.

Remove everything else.

Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
---
 .../gpu/drm/i915/display/intel_frontbuffer.c  | 67 -------------------
 .../gpu/drm/i915/display/intel_frontbuffer.h  |  7 --
 2 files changed, 74 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
index ece2d92ab4a7..95073813bb96 100644
--- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
+++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
@@ -114,73 +114,6 @@ void intel_frontbuffer_flush(struct intel_framebuffer *fb,
 	frontbuffer_flush(i915, origin, frontbuffer_bits);
 }
 
-/**
- * intel_frontbuffer_flip_prepare - prepare asynchronous frontbuffer flip
- * @i915: i915 device
- * @frontbuffer_bits: frontbuffer plane tracking bits
- *
- * This function gets called after scheduling a flip on @obj. The actual
- * frontbuffer flushing will be delayed until completion is signalled with
- * intel_frontbuffer_flip_complete. If an invalidate happens in between this
- * flush will be cancelled.
- *
- * Can be called without any locks held.
- */
-void intel_frontbuffer_flip_prepare(struct drm_i915_private *i915,
-				    unsigned frontbuffer_bits)
-{
-	spin_lock(&i915->display.fb_tracking.lock);
-	i915->display.fb_tracking.flip_bits |= frontbuffer_bits;
-	/* Remove stale busy bits due to the old buffer. */
-	i915->display.fb_tracking.busy_bits &= ~frontbuffer_bits;
-	spin_unlock(&i915->display.fb_tracking.lock);
-}
-
-/**
- * intel_frontbuffer_flip_complete - complete asynchronous frontbuffer flip
- * @i915: i915 device
- * @frontbuffer_bits: frontbuffer plane tracking bits
- *
- * This function gets called after the flip has been latched and will complete
- * on the next vblank. It will execute the flush if it hasn't been cancelled yet.
- *
- * Can be called without any locks held.
- */
-void intel_frontbuffer_flip_complete(struct drm_i915_private *i915,
-				     unsigned frontbuffer_bits)
-{
-	spin_lock(&i915->display.fb_tracking.lock);
-	/* Mask any cancelled flips. */
-	frontbuffer_bits &= i915->display.fb_tracking.flip_bits;
-	i915->display.fb_tracking.flip_bits &= ~frontbuffer_bits;
-	spin_unlock(&i915->display.fb_tracking.lock);
-
-	if (frontbuffer_bits)
-		frontbuffer_flush(i915, frontbuffer_bits, ORIGIN_FLIP);
-}
-
-/**
- * intel_frontbuffer_flip - synchronous frontbuffer flip
- * @i915: i915 device
- * @frontbuffer_bits: frontbuffer plane tracking bits
- *
- * This function gets called after scheduling a flip on @obj. This is for
- * synchronous plane updates which will happen on the next vblank and which will
- * not get delayed by pending gpu rendering.
- *
- * Can be called without any locks held.
- */
-void intel_frontbuffer_flip(struct drm_i915_private *i915,
-			    unsigned frontbuffer_bits)
-{
-	spin_lock(&i915->display.fb_tracking.lock);
-	/* Remove stale busy bits due to the old buffer. */
-	i915->display.fb_tracking.busy_bits &= ~frontbuffer_bits;
-	spin_unlock(&i915->display.fb_tracking.lock);
-
-	frontbuffer_flush(i915, frontbuffer_bits, ORIGIN_FLIP);
-}
-
 /**
  * intel_frontbuffer_track - update frontbuffer tracking
  * @old: current buffer for the frontbuffer slots
diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.h b/drivers/gpu/drm/i915/display/intel_frontbuffer.h
index 051fe066073a..213dd2e96fd0 100644
--- a/drivers/gpu/drm/i915/display/intel_frontbuffer.h
+++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.h
@@ -57,13 +57,6 @@ enum fb_op_origin {
 	GENMASK(INTEL_FRONTBUFFER_BITS_PER_PIPE * ((pipe) + 1) - 1,	\
 		INTEL_FRONTBUFFER_BITS_PER_PIPE * (pipe))
 
-void intel_frontbuffer_flip_prepare(struct drm_i915_private *i915,
-				    unsigned frontbuffer_bits);
-void intel_frontbuffer_flip_complete(struct drm_i915_private *i915,
-				     unsigned frontbuffer_bits);
-void intel_frontbuffer_flip(struct drm_i915_private *i915,
-			    unsigned frontbuffer_bits);
-
 void frontbuffer_flush(struct drm_i915_private *i915,
 			      unsigned int frontbuffer_bits,
 		       enum fb_op_origin origin);
-- 
2.34.1



More information about the Intel-gfx-trybot mailing list