[RFC PATCH 17/22] drm/i915/display: Move checking frontbuffer bits
Jouni Högander
jouni.hogander at intel.com
Fri Mar 24 08:07:37 UTC 2023
Check frontbuffer bits in frontbuffer_flush to cover also user of
frontbuffer_flush.
Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
---
drivers/gpu/drm/i915/display/intel_frontbuffer.c | 3 +++
drivers/gpu/drm/i915/display/intel_frontbuffer.h | 2 --
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
index 601b6b51912b..a2aa2f796637 100644
--- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
+++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
@@ -80,6 +80,9 @@ void frontbuffer_flush(struct drm_i915_private *i915,
{
trace_intel_frontbuffer_flush(i915, frontbuffer_bits);
+ if (!frontbuffer_bits)
+ return;
+
might_sleep();
intel_drrs_flush(i915, frontbuffer_bits);
intel_psr_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 e820bd54512a..e0f004ab8804 100644
--- a/drivers/gpu/drm/i915/display/intel_frontbuffer.h
+++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.h
@@ -79,8 +79,6 @@ static inline void intel_frontbuffer_flush(struct intel_framebuffer *fb)
i915 = to_i915(fb->base.dev);
frontbuffer_bits = atomic_read(&fb->bits);
- if (!frontbuffer_bits)
- return;
frontbuffer_flush(i915, frontbuffer_bits);
}
--
2.34.1
More information about the Intel-gfx-trybot
mailing list