[RFC PATCH 07/22] drm/i915/display: Remove intel_frontbuffer_invalidate

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


We are following new strategy to rely purely on dirtyfb
callback. Remove intel_frontbuffer_invalidate.

Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
---
 .../drm/i915/display/intel_display_trace.h    | 21 -------------
 .../gpu/drm/i915/display/intel_frontbuffer.c  | 21 -------------
 .../gpu/drm/i915/display/intel_frontbuffer.h  | 31 -------------------
 3 files changed, 73 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_trace.h b/drivers/gpu/drm/i915/display/intel_display_trace.h
index 651ea8564e1b..ae3dfca2b005 100644
--- a/drivers/gpu/drm/i915/display/intel_display_trace.h
+++ b/drivers/gpu/drm/i915/display/intel_display_trace.h
@@ -602,27 +602,6 @@ TRACE_EVENT(intel_pipe_update_end,
 		      __entry->frame, __entry->scanline)
 );
 
-TRACE_EVENT(intel_frontbuffer_invalidate,
-	    TP_PROTO(struct drm_i915_private *i915,
-		     unsigned int frontbuffer_bits, unsigned int origin),
-	    TP_ARGS(i915, frontbuffer_bits, origin),
-
-	    TP_STRUCT__entry(
-			     __string(dev, __dev_name_i915(i915))
-			     __field(unsigned int, frontbuffer_bits)
-			     __field(unsigned int, origin)
-			     ),
-
-	    TP_fast_assign(
-			   __assign_str(dev, __dev_name_i915(i915));
-			   __entry->frontbuffer_bits = frontbuffer_bits;
-			   __entry->origin = origin;
-			   ),
-
-	    TP_printk("dev %s, frontbuffer_bits=0x%08x, origin=%u",
-		      __get_str(dev), __entry->frontbuffer_bits, __entry->origin)
-);
-
 TRACE_EVENT(intel_frontbuffer_flush,
 	    TP_PROTO(struct drm_i915_private *i915,
 		     unsigned int frontbuffer_bits, unsigned int origin),
diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
index 99d194803520..2031daa24e79 100644
--- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
+++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
@@ -163,27 +163,6 @@ void intel_frontbuffer_flip(struct drm_i915_private *i915,
 	frontbuffer_flush(i915, frontbuffer_bits, ORIGIN_FLIP);
 }
 
-void __intel_fb_invalidate(struct intel_framebuffer *fb,
-			   enum fb_op_origin origin,
-			   unsigned int frontbuffer_bits)
-{
-	struct drm_i915_private *i915 = to_i915(fb->base.dev);
-
-	if (origin == ORIGIN_CS) {
-		spin_lock(&i915->display.fb_tracking.lock);
-		i915->display.fb_tracking.busy_bits |= frontbuffer_bits;
-		i915->display.fb_tracking.flip_bits &= ~frontbuffer_bits;
-		spin_unlock(&i915->display.fb_tracking.lock);
-	}
-
-	trace_intel_frontbuffer_invalidate(i915, frontbuffer_bits, origin);
-
-	might_sleep();
-	intel_psr_invalidate(i915, frontbuffer_bits, origin);
-	intel_drrs_invalidate(i915, frontbuffer_bits);
-	intel_fbc_invalidate(i915, frontbuffer_bits, origin);
-}
-
 void __intel_fb_flush(struct intel_framebuffer *fb,
 		      enum fb_op_origin origin,
 		      unsigned int frontbuffer_bits)
diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.h b/drivers/gpu/drm/i915/display/intel_frontbuffer.h
index b91338651139..9aebd7b8e0cf 100644
--- a/drivers/gpu/drm/i915/display/intel_frontbuffer.h
+++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.h
@@ -64,37 +64,6 @@ void intel_frontbuffer_flip_complete(struct drm_i915_private *i915,
 void intel_frontbuffer_flip(struct drm_i915_private *i915,
 			    unsigned frontbuffer_bits);
 
-void __intel_fb_invalidate(struct intel_framebuffer *front,
-			   enum fb_op_origin origin,
-			   unsigned int frontbuffer_bits);
-
-/**
- * intel_frontbuffer_invalidate - invalidate frontbuffer object
- * @front: GEM object to invalidate
- * @origin: which operation caused the invalidation
- *
- * This function gets called every time rendering on the given object starts and
- * frontbuffer caching (fbc, low refresh rate for DRRS, panel self refresh) must
- * be invalidated. For ORIGIN_CS any subsequent invalidation will be delayed
- * until the rendering completes or a flip on this frontbuffer plane is
- * scheduled.
- */
-static inline bool intel_frontbuffer_invalidate(struct intel_framebuffer *fb,
-						enum fb_op_origin origin)
-{
-	unsigned int frontbuffer_bits;
-
-	if (!fb)
-		return false;
-
-	frontbuffer_bits = atomic_read(&fb->bits);
-	if (!frontbuffer_bits)
-		return false;
-
-	__intel_fb_invalidate(fb, origin, frontbuffer_bits);
-	return true;
-}
-
 void __intel_fb_flush(struct intel_framebuffer *fb,
 		      enum fb_op_origin origin,
 		      unsigned int frontbuffer_bits);
-- 
2.34.1



More information about the Intel-gfx-trybot mailing list