diff options
| author | Jani Nikula <[email protected]> | 2024-09-17 16:13:54 +0000 |
|---|---|---|
| committer | Jani Nikula <[email protected]> | 2024-09-19 13:37:11 +0000 |
| commit | bca1cec057d08ce3b227ad214616cbebfe675582 (patch) | |
| tree | 1e4cb275cb43daad37c9c3ae5b4bb585b2672703 /drivers/gpu/drm/i915/display/intel_frontbuffer.c | |
| parent | drm/i915/display: add intel_bo_get/set_frontbuffer() and use them (diff) | |
| download | kernel-bca1cec057d08ce3b227ad214616cbebfe675582.tar.gz kernel-bca1cec057d08ce3b227ad214616cbebfe675582.zip | |
drm/i915/frontbuffer: convert intel_frontbuffer_get() to struct drm_gem_object
Prefer the driver agnostic struct drm_gem_object over i915 specific
struct drm_i915_gem_object.
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/358cfcb5eb666732cd7ae21e4f63d07837960ec2.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.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c index 1be72901efb0..8d8b0a905cc3 100644 --- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c +++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c @@ -216,7 +216,7 @@ static void intel_frontbuffer_flush_work(struct work_struct *work) struct intel_frontbuffer *front = container_of(work, struct intel_frontbuffer, flush_work); - i915_gem_object_flush_if_display(front->obj); + intel_bo_flush_if_display(intel_bo_to_drm_bo(front->obj)); intel_frontbuffer_flush(front, ORIGIN_DIRTYFB); intel_frontbuffer_put(front); } @@ -276,12 +276,12 @@ static void frontbuffer_release(struct kref *ref) } struct intel_frontbuffer * -intel_frontbuffer_get(struct drm_i915_gem_object *obj) +intel_frontbuffer_get(struct drm_gem_object *obj) { - struct drm_i915_private *i915 = intel_bo_to_i915(obj); + struct drm_i915_private *i915 = to_i915(obj->dev); struct intel_frontbuffer *front, *cur; - front = intel_bo_get_frontbuffer(intel_bo_to_drm_bo(obj)); + front = intel_bo_get_frontbuffer(obj); if (front) return front; @@ -289,7 +289,7 @@ intel_frontbuffer_get(struct drm_i915_gem_object *obj) if (!front) return NULL; - front->obj = obj; + front->obj = to_intel_bo(obj); kref_init(&front->ref); atomic_set(&front->bits, 0); i915_active_init(&front->write, @@ -299,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 = intel_bo_set_frontbuffer(intel_bo_to_drm_bo(obj), front); + cur = intel_bo_set_frontbuffer(obj, front); spin_unlock(&i915->display.fb_tracking.lock); if (cur != front) kfree(front); |
