aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/display/intel_frontbuffer.c
diff options
context:
space:
mode:
authorJani Nikula <[email protected]>2024-09-17 16:13:53 +0000
committerJani Nikula <[email protected]>2024-09-19 13:37:11 +0000
commitff992dbfbe34360e3cdfb9ff19166a27478c6e51 (patch)
tree0e43f220eae5d94e163cfa173438807698dfdb08 /drivers/gpu/drm/i915/display/intel_frontbuffer.c
parentdrm/i915/display: add intel_bo_read_from_page() and use it (diff)
downloadkernel-ff992dbfbe34360e3cdfb9ff19166a27478c6e51.tar.gz
kernel-ff992dbfbe34360e3cdfb9ff19166a27478c6e51.zip
drm/i915/display: add intel_bo_get/set_frontbuffer() and use them
Add the struct drm_gem_object based interfaces. Reviewed-by: Maarten Lankhorst <[email protected]> Acked-by: Rodrigo Vivi <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/3120ec430656f04701077dda39cce5f1ed415eee.1726589119.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_frontbuffer.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_frontbuffer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
index e56d596485c3..1be72901efb0 100644
--- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
+++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
@@ -59,6 +59,7 @@
#include "gem/i915_gem_object_types.h"
#include "i915_active.h"
#include "i915_drv.h"
+#include "intel_bo.h"
#include "intel_display_trace.h"
#include "intel_display_types.h"
#include "intel_dp.h"
@@ -266,7 +267,7 @@ static void frontbuffer_release(struct kref *ref)
i915_ggtt_clear_scanout(obj);
- ret = i915_gem_object_set_frontbuffer(obj, NULL);
+ ret = intel_bo_set_frontbuffer(intel_bo_to_drm_bo(obj), NULL);
drm_WARN_ON(&intel_bo_to_i915(obj)->drm, ret);
spin_unlock(&intel_bo_to_i915(obj)->display.fb_tracking.lock);
@@ -280,7 +281,7 @@ intel_frontbuffer_get(struct drm_i915_gem_object *obj)
struct drm_i915_private *i915 = intel_bo_to_i915(obj);
struct intel_frontbuffer *front, *cur;
- front = i915_gem_object_get_frontbuffer(obj);
+ front = intel_bo_get_frontbuffer(intel_bo_to_drm_bo(obj));
if (front)
return front;
@@ -298,7 +299,7 @@ intel_frontbuffer_get(struct drm_i915_gem_object *obj)
INIT_WORK(&front->flush_work, intel_frontbuffer_flush_work);
spin_lock(&i915->display.fb_tracking.lock);
- cur = i915_gem_object_set_frontbuffer(obj, front);
+ cur = intel_bo_set_frontbuffer(intel_bo_to_drm_bo(obj), front);
spin_unlock(&i915->display.fb_tracking.lock);
if (cur != front)
kfree(front);