Commit 78dfe8a0 authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm: Remove struct drm_flip_task from DRM interfaces

Contain struct drm_flip_task and its helper functions
drm_flip_work_allocate_task() and drm_flip_work_queue_task() within
drm_flip_work.c There are no callers outside of the flip-work code.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20231101103618.23806-2-tzimmermann@suse.de
parent c6698750
...@@ -27,14 +27,12 @@ ...@@ -27,14 +27,12 @@
#include <drm/drm_print.h> #include <drm/drm_print.h>
#include <drm/drm_util.h> #include <drm/drm_util.h>
/** struct drm_flip_task {
* drm_flip_work_allocate_task - allocate a flip-work task struct list_head node;
* @data: data associated to the task void *data;
* @flags: allocator flags };
*
* Allocate a drm_flip_task object and attach private data to it. static struct drm_flip_task *drm_flip_work_allocate_task(void *data, gfp_t flags)
*/
struct drm_flip_task *drm_flip_work_allocate_task(void *data, gfp_t flags)
{ {
struct drm_flip_task *task; struct drm_flip_task *task;
...@@ -44,18 +42,8 @@ struct drm_flip_task *drm_flip_work_allocate_task(void *data, gfp_t flags) ...@@ -44,18 +42,8 @@ struct drm_flip_task *drm_flip_work_allocate_task(void *data, gfp_t flags)
return task; return task;
} }
EXPORT_SYMBOL(drm_flip_work_allocate_task);
/** static void drm_flip_work_queue_task(struct drm_flip_work *work, struct drm_flip_task *task)
* drm_flip_work_queue_task - queue a specific task
* @work: the flip-work
* @task: the task to handle
*
* Queues task, that will later be run (passed back to drm_flip_func_t
* func) on a work queue after drm_flip_work_commit() is called.
*/
void drm_flip_work_queue_task(struct drm_flip_work *work,
struct drm_flip_task *task)
{ {
unsigned long flags; unsigned long flags;
...@@ -63,7 +51,6 @@ void drm_flip_work_queue_task(struct drm_flip_work *work, ...@@ -63,7 +51,6 @@ void drm_flip_work_queue_task(struct drm_flip_work *work,
list_add_tail(&task->node, &work->queued); list_add_tail(&task->node, &work->queued);
spin_unlock_irqrestore(&work->lock, flags); spin_unlock_irqrestore(&work->lock, flags);
} }
EXPORT_SYMBOL(drm_flip_work_queue_task);
/** /**
* drm_flip_work_queue - queue work * drm_flip_work_queue - queue work
......
...@@ -33,9 +33,8 @@ ...@@ -33,9 +33,8 @@
* *
* Util to queue up work to run from work-queue context after flip/vblank. * Util to queue up work to run from work-queue context after flip/vblank.
* Typically this can be used to defer unref of framebuffer's, cursor * Typically this can be used to defer unref of framebuffer's, cursor
* bo's, etc until after vblank. The APIs are all thread-safe. * bo's, etc until after vblank. The APIs are all thread-safe. Moreover,
* Moreover, drm_flip_work_queue_task and drm_flip_work_queue can be called * drm_flip_work_queue can be called in atomic context.
* in atomic context.
*/ */
struct drm_flip_work; struct drm_flip_work;
...@@ -51,16 +50,6 @@ struct drm_flip_work; ...@@ -51,16 +50,6 @@ struct drm_flip_work;
*/ */
typedef void (*drm_flip_func_t)(struct drm_flip_work *work, void *val); typedef void (*drm_flip_func_t)(struct drm_flip_work *work, void *val);
/**
* struct drm_flip_task - flip work task
* @node: list entry element
* @data: data to pass to &drm_flip_work.func
*/
struct drm_flip_task {
struct list_head node;
void *data;
};
/** /**
* struct drm_flip_work - flip work queue * struct drm_flip_work - flip work queue
* @name: debug name * @name: debug name
...@@ -79,9 +68,6 @@ struct drm_flip_work { ...@@ -79,9 +68,6 @@ struct drm_flip_work {
spinlock_t lock; spinlock_t lock;
}; };
struct drm_flip_task *drm_flip_work_allocate_task(void *data, gfp_t flags);
void drm_flip_work_queue_task(struct drm_flip_work *work,
struct drm_flip_task *task);
void drm_flip_work_queue(struct drm_flip_work *work, void *val); void drm_flip_work_queue(struct drm_flip_work *work, void *val);
void drm_flip_work_commit(struct drm_flip_work *work, void drm_flip_work_commit(struct drm_flip_work *work,
struct workqueue_struct *wq); struct workqueue_struct *wq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment