[RFC PATCH 16/22] drm/i915/display: Remove origin from frontbuffer tracking interface
Jouni Högander
jouni.hogander at intel.com
Mon Mar 27 12:37:26 UTC 2023
Only dirtyfb is now used to perform frontbuffer flush. We can remove
origin from intel_frontbuffer_flush.
Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
---
drivers/gpu/drm/i915/display/intel_display_trace.h | 10 ++++------
drivers/gpu/drm/i915/display/intel_fb.c | 2 +-
drivers/gpu/drm/i915/display/intel_frontbuffer.c | 11 ++++-------
drivers/gpu/drm/i915/display/intel_frontbuffer.h | 6 ++----
drivers/gpu/drm/i915/display/intel_overlay.c | 2 +-
5 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display_trace.h b/drivers/gpu/drm/i915/display/intel_display_trace.h
index ae3dfca2b005..7efb94ec0b61 100644
--- a/drivers/gpu/drm/i915/display/intel_display_trace.h
+++ b/drivers/gpu/drm/i915/display/intel_display_trace.h
@@ -604,23 +604,21 @@ TRACE_EVENT(intel_pipe_update_end,
TRACE_EVENT(intel_frontbuffer_flush,
TP_PROTO(struct drm_i915_private *i915,
- unsigned int frontbuffer_bits, unsigned int origin),
- TP_ARGS(i915, frontbuffer_bits, origin),
+ unsigned int frontbuffer_bits),
+ TP_ARGS(i915, frontbuffer_bits),
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)
+ TP_printk("dev %s, frontbuffer_bits=0x%08x",
+ __get_str(dev), __entry->frontbuffer_bits)
);
#endif /* __INTEL_DISPLAY_TRACE_H__ */
diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
index c739a1fb395d..62d2d152f9b2 100644
--- a/drivers/gpu/drm/i915/display/intel_fb.c
+++ b/drivers/gpu/drm/i915/display/intel_fb.c
@@ -1869,7 +1869,7 @@ static int intel_user_framebuffer_dirty(struct drm_framebuffer *fb,
drm_WARN_ON(&(i915)->drm, ret <= 0);
i915_gem_object_flush_if_display(obj);
- intel_frontbuffer_flush(to_intel_framebuffer(fb), ORIGIN_DIRTYFB);
+ intel_frontbuffer_flush(to_intel_framebuffer(fb));
return 0;
}
diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
index f57a6e56fe6d..40673e47c483 100644
--- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
+++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
@@ -68,7 +68,6 @@
* frontbuffer_flush - flush frontbuffer
* @i915: i915 device
* @frontbuffer_bits: frontbuffer plane tracking bits
- * @origin: which operation caused the flush
*
* This function gets called every time rendering on the given planes has
* completed and frontbuffer caching can be started again. Flushes will get
@@ -77,10 +76,9 @@
* Can be called without any locks held.
*/
void frontbuffer_flush(struct drm_i915_private *i915,
- unsigned int frontbuffer_bits,
- enum fb_op_origin origin)
+ unsigned int frontbuffer_bits)
{
- trace_intel_frontbuffer_flush(i915, frontbuffer_bits, origin);
+ trace_intel_frontbuffer_flush(i915, frontbuffer_bits);
might_sleep();
intel_drrs_flush(i915, frontbuffer_bits);
@@ -96,8 +94,7 @@ void frontbuffer_flush(struct drm_i915_private *i915,
* This function gets called every time rendering on the given object has
* completed and frontbuffer caching can be started again.
*/
-void intel_frontbuffer_flush(struct intel_framebuffer *fb,
- enum fb_op_origin origin)
+void intel_frontbuffer_flush(struct intel_framebuffer *fb)
{
struct drm_i915_private *i915;
unsigned int frontbuffer_bits;
@@ -111,7 +108,7 @@ void intel_frontbuffer_flush(struct intel_framebuffer *fb,
if (!frontbuffer_bits)
return;
- frontbuffer_flush(i915, origin, frontbuffer_bits);
+ frontbuffer_flush(i915, frontbuffer_bits);
}
/**
diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.h b/drivers/gpu/drm/i915/display/intel_frontbuffer.h
index 213dd2e96fd0..a0c5b5a8685f 100644
--- a/drivers/gpu/drm/i915/display/intel_frontbuffer.h
+++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.h
@@ -58,10 +58,8 @@ enum fb_op_origin {
INTEL_FRONTBUFFER_BITS_PER_PIPE * (pipe))
void frontbuffer_flush(struct drm_i915_private *i915,
- unsigned int frontbuffer_bits,
- enum fb_op_origin origin);
-void intel_frontbuffer_flush(struct intel_framebuffer *fb,
- enum fb_op_origin origin);
+ unsigned int frontbuffer_bits);
+void intel_frontbuffer_flush(struct intel_framebuffer *fb);
void intel_frontbuffer_track(struct intel_framebuffer *old,
struct intel_framebuffer *new,
diff --git a/drivers/gpu/drm/i915/display/intel_overlay.c b/drivers/gpu/drm/i915/display/intel_overlay.c
index 6d12d991cea7..17245144bae9 100644
--- a/drivers/gpu/drm/i915/display/intel_overlay.c
+++ b/drivers/gpu/drm/i915/display/intel_overlay.c
@@ -344,7 +344,7 @@ static void intel_overlay_release_old_vma(struct intel_overlay *overlay)
if (drm_WARN_ON(&overlay->i915->drm, !vma))
return;
- frontbuffer_flush(i915, INTEL_FRONTBUFFER_OVERLAY(pipe), ORIGIN_FLIP);
+ frontbuffer_flush(i915, INTEL_FRONTBUFFER_OVERLAY(pipe));
i915_vma_unpin(vma);
i915_vma_put(vma);
--
2.34.1
More information about the Intel-gfx-trybot
mailing list