[PATCH 5/5] drm/i915/frontbuffer: make struct intel_frontbuffer opaque
Jani Nikula
jani.nikula at intel.com
Mon Jun 17 14:19:02 UTC 2024
Hide struct intel_frontbuffer implementation details within
intel_frontbuffer.c.
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
.../gpu/drm/i915/display/intel_frontbuffer.c | 10 ++++++++++
.../gpu/drm/i915/display/intel_frontbuffer.h | 18 ++++--------------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
index dd5fd1e2859e..53a4cbc43ae3 100644
--- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
+++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
@@ -67,6 +67,16 @@
#include "intel_psr.h"
#include "intel_tdf.h"
+struct intel_frontbuffer {
+ struct kref ref;
+ atomic_t bits;
+ struct i915_active write;
+ struct drm_i915_gem_object *obj;
+ struct rcu_head rcu;
+
+ struct work_struct flush_work;
+};
+
unsigned int intel_frontbuffer_bits(struct intel_frontbuffer *front)
{
return atomic_read(&front->bits);
diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.h b/drivers/gpu/drm/i915/display/intel_frontbuffer.h
index 62d6e3cedea4..a6212ee4ed12 100644
--- a/drivers/gpu/drm/i915/display/intel_frontbuffer.h
+++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.h
@@ -24,13 +24,13 @@
#ifndef __INTEL_FRONTBUFFER_H__
#define __INTEL_FRONTBUFFER_H__
-#include <linux/atomic.h>
#include <linux/bits.h>
-#include <linux/kref.h>
-
-#include "i915_active_types.h"
+#include <linux/types.h>
+struct drm_i915_gem_object;
struct drm_i915_private;
+struct i915_active;
+struct intel_frontbuffer;
enum fb_op_origin {
ORIGIN_CPU = 0,
@@ -40,16 +40,6 @@ enum fb_op_origin {
ORIGIN_CURSOR_UPDATE,
};
-struct intel_frontbuffer {
- struct kref ref;
- atomic_t bits;
- struct i915_active write;
- struct drm_i915_gem_object *obj;
- struct rcu_head rcu;
-
- struct work_struct flush_work;
-};
-
/*
* Frontbuffer tracking bits. Set in obj->frontbuffer_bits while a gem bo is
* considered to be the frontbuffer for the given plane interface-wise. This
--
2.39.2
More information about the Intel-gfx
mailing list