mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
drm/i915/frontbuffer: call parent interface directly
Do away with the redundant intel_frontbuffer_get(), intel_frontbuffer_put(), and intel_frontbuffer_ref() functions, and call the parent interface functions directly. Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://patch.msgid.link/7451574d6840fe9a4af16d2d6b81ffb7739b5b76.1772475391.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
2cca25160d
commit
fa5f1836f9
|
|
@ -2113,7 +2113,7 @@ static void intel_user_framebuffer_destroy(struct drm_framebuffer *fb)
|
|||
|
||||
intel_fb_bo_framebuffer_fini(intel_fb_bo(fb));
|
||||
|
||||
intel_frontbuffer_put(intel_fb->frontbuffer);
|
||||
intel_parent_frontbuffer_put(display, intel_fb->frontbuffer);
|
||||
|
||||
kfree(intel_fb->panic);
|
||||
kfree(intel_fb);
|
||||
|
|
@ -2221,10 +2221,10 @@ int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
|
|||
return -ENOMEM;
|
||||
|
||||
/*
|
||||
* intel_frontbuffer_get() must be done before
|
||||
* intel_parent_frontbuffer_get() must be done before
|
||||
* intel_fb_bo_framebuffer_init() to avoid set_tiling vs. addfb race.
|
||||
*/
|
||||
intel_fb->frontbuffer = intel_frontbuffer_get(obj);
|
||||
intel_fb->frontbuffer = intel_parent_frontbuffer_get(display, obj);
|
||||
if (!intel_fb->frontbuffer) {
|
||||
ret = -ENOMEM;
|
||||
goto err_free_panic;
|
||||
|
|
@ -2335,7 +2335,7 @@ int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
|
|||
err_bo_framebuffer_fini:
|
||||
intel_fb_bo_framebuffer_fini(obj);
|
||||
err_frontbuffer_put:
|
||||
intel_frontbuffer_put(intel_fb->frontbuffer);
|
||||
intel_parent_frontbuffer_put(display, intel_fb->frontbuffer);
|
||||
err_free_panic:
|
||||
kfree(intel_fb->panic);
|
||||
|
||||
|
|
|
|||
|
|
@ -164,18 +164,13 @@ void __intel_fb_flush(struct intel_frontbuffer *front,
|
|||
frontbuffer_flush(display, frontbuffer_bits, origin);
|
||||
}
|
||||
|
||||
static void intel_frontbuffer_ref(struct intel_frontbuffer *front)
|
||||
{
|
||||
intel_parent_frontbuffer_ref(front->display, front);
|
||||
}
|
||||
|
||||
static void intel_frontbuffer_flush_work(struct work_struct *work)
|
||||
{
|
||||
struct intel_frontbuffer *front =
|
||||
container_of(work, struct intel_frontbuffer, flush_work);
|
||||
|
||||
intel_frontbuffer_flush(front, ORIGIN_DIRTYFB);
|
||||
intel_frontbuffer_put(front);
|
||||
intel_parent_frontbuffer_put(front->display, front);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -190,9 +185,9 @@ void intel_frontbuffer_queue_flush(struct intel_frontbuffer *front)
|
|||
if (!front)
|
||||
return;
|
||||
|
||||
intel_frontbuffer_ref(front);
|
||||
intel_parent_frontbuffer_ref(front->display, front);
|
||||
if (!schedule_work(&front->flush_work))
|
||||
intel_frontbuffer_put(front);
|
||||
intel_parent_frontbuffer_put(front->display, front);
|
||||
}
|
||||
|
||||
void intel_frontbuffer_init(struct intel_frontbuffer *front, struct drm_device *drm)
|
||||
|
|
@ -207,18 +202,6 @@ void intel_frontbuffer_fini(struct intel_frontbuffer *front)
|
|||
drm_WARN_ON(front->display->drm, atomic_read(&front->bits));
|
||||
}
|
||||
|
||||
struct intel_frontbuffer *intel_frontbuffer_get(struct drm_gem_object *obj)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(obj->dev);
|
||||
|
||||
return intel_parent_frontbuffer_get(display, obj);
|
||||
}
|
||||
|
||||
void intel_frontbuffer_put(struct intel_frontbuffer *front)
|
||||
{
|
||||
intel_parent_frontbuffer_put(front->display, front);
|
||||
}
|
||||
|
||||
/**
|
||||
* intel_frontbuffer_track - update frontbuffer tracking
|
||||
* @old: current buffer for the frontbuffer slots
|
||||
|
|
|
|||
|
|
@ -66,11 +66,6 @@ struct intel_frontbuffer {
|
|||
void intel_frontbuffer_flip(struct intel_display *display,
|
||||
unsigned frontbuffer_bits);
|
||||
|
||||
void intel_frontbuffer_put(struct intel_frontbuffer *front);
|
||||
|
||||
struct intel_frontbuffer *
|
||||
intel_frontbuffer_get(struct drm_gem_object *obj);
|
||||
|
||||
void __intel_fb_invalidate(struct intel_frontbuffer *front,
|
||||
enum fb_op_origin origin,
|
||||
unsigned int frontbuffer_bits);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user