drm/i915/gem: relocate __i915_gem_object_{flush, invalidate}_frontbuffer()

Move __i915_gem_object_{flush,invalidate}_frontbuffer() to
i915_gem_object_frontbuffer.c. All the other i915 gem object frontbuffer
functions are there already, and the relevant declarations are in
i915_gem_object_frontbuffer.h too.

Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://patch.msgid.link/d779ef44b4b43feda9df63f1225a947a9cd23ba8.1772475391.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
Jani Nikula 2026-03-02 20:17:33 +02:00
parent cda15ff39d
commit 8828edabb9
2 changed files with 24 additions and 24 deletions

View File

@ -474,30 +474,6 @@ static void i915_gem_free_object(struct drm_gem_object *gem_obj)
queue_work(i915->wq, &i915->mm.free_work);
}
void __i915_gem_object_flush_frontbuffer(struct drm_i915_gem_object *obj,
enum fb_op_origin origin)
{
struct i915_frontbuffer *front;
front = i915_gem_object_frontbuffer_lookup(obj);
if (front) {
intel_frontbuffer_flush(&front->base, origin);
i915_gem_object_frontbuffer_put(front);
}
}
void __i915_gem_object_invalidate_frontbuffer(struct drm_i915_gem_object *obj,
enum fb_op_origin origin)
{
struct i915_frontbuffer *front;
front = i915_gem_object_frontbuffer_lookup(obj);
if (front) {
intel_frontbuffer_invalidate(&front->base, origin);
i915_gem_object_frontbuffer_put(front);
}
}
static void
i915_gem_object_read_from_page_kmap(struct drm_i915_gem_object *obj, u64 offset, void *dst, int size)
{

View File

@ -101,3 +101,27 @@ void i915_gem_object_frontbuffer_put(struct i915_frontbuffer *front)
kref_put_lock(&front->ref, frontbuffer_release,
&i915->frontbuffer_lock);
}
void __i915_gem_object_flush_frontbuffer(struct drm_i915_gem_object *obj,
enum fb_op_origin origin)
{
struct i915_frontbuffer *front;
front = i915_gem_object_frontbuffer_lookup(obj);
if (front) {
intel_frontbuffer_flush(&front->base, origin);
i915_gem_object_frontbuffer_put(front);
}
}
void __i915_gem_object_invalidate_frontbuffer(struct drm_i915_gem_object *obj,
enum fb_op_origin origin)
{
struct i915_frontbuffer *front;
front = i915_gem_object_frontbuffer_lookup(obj);
if (front) {
intel_frontbuffer_invalidate(&front->base, origin);
i915_gem_object_frontbuffer_put(front);
}
}