[PATCH 4/5] drm/i915/frontbuffer: hide ->write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add accessor to frontbuffer ->write to avoid direct access from outside
of intel_frontbuffer.c in preparation for making struct
intel_frontbuffer opaque.

Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
---
 drivers/gpu/drm/i915/display/intel_frontbuffer.c | 5 +++++
 drivers/gpu/drm/i915/display/intel_frontbuffer.h | 2 ++
 drivers/gpu/drm/i915/i915_vma.c                  | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
index 42defe2b7661..dd5fd1e2859e 100644
--- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
+++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
@@ -87,6 +87,11 @@ void intel_frontbuffer_get_raw(struct intel_frontbuffer *front)
 	kref_get(&front->ref);
 }
 
+struct i915_active *intel_frontbuffer_active(struct intel_frontbuffer *front)
+{
+	return &front->write;
+}
+
 /**
  * frontbuffer_flush - flush frontbuffer
  * @i915: i915 device
diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.h b/drivers/gpu/drm/i915/display/intel_frontbuffer.h
index 221f41096416..62d6e3cedea4 100644
--- a/drivers/gpu/drm/i915/display/intel_frontbuffer.h
+++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.h
@@ -134,4 +134,6 @@ void intel_frontbuffer_track(struct intel_frontbuffer *old,
 			     struct intel_frontbuffer *new,
 			     unsigned int frontbuffer_bits);
 
+struct i915_active *intel_frontbuffer_active(struct intel_frontbuffer *front);
+
 #endif /* __INTEL_FRONTBUFFER_H__ */
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index d2f064d2525c..2b5cc7af19c5 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -1975,7 +1975,7 @@ int _i915_vma_move_to_active(struct i915_vma *vma,
 		front = i915_gem_object_get_frontbuffer(obj);
 		if (unlikely(front)) {
 			if (intel_frontbuffer_invalidate(front, ORIGIN_CS))
-				i915_active_add_request(&front->write, rq);
+				i915_active_add_request(intel_frontbuffer_active(front), rq);
 			intel_frontbuffer_put(front);
 		}
 	}
-- 
2.39.2




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux