Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20231101103618.23806-2-tzimmermann@suse.de

+9 -36
+7 -20
drivers/gpu/drm/drm_flip_work.c
··· 27 27 #include <drm/drm_print.h> 28 28 #include <drm/drm_util.h> 29 29 30 - /** 31 - * drm_flip_work_allocate_task - allocate a flip-work task 32 - * @data: data associated to the task 33 - * @flags: allocator flags 34 - * 35 - * Allocate a drm_flip_task object and attach private data to it. 36 - */ 37 - struct drm_flip_task *drm_flip_work_allocate_task(void *data, gfp_t flags) 30 + struct drm_flip_task { 31 + struct list_head node; 32 + void *data; 33 + }; 34 + 35 + static struct drm_flip_task *drm_flip_work_allocate_task(void *data, gfp_t flags) 38 36 { 39 37 struct drm_flip_task *task; 40 38 ··· 42 44 43 45 return task; 44 46 } 45 - EXPORT_SYMBOL(drm_flip_work_allocate_task); 46 47 47 - /** 48 - * drm_flip_work_queue_task - queue a specific task 49 - * @work: the flip-work 50 - * @task: the task to handle 51 - * 52 - * Queues task, that will later be run (passed back to drm_flip_func_t 53 - * func) on a work queue after drm_flip_work_commit() is called. 54 - */ 55 - void drm_flip_work_queue_task(struct drm_flip_work *work, 56 - struct drm_flip_task *task) 48 + static void drm_flip_work_queue_task(struct drm_flip_work *work, struct drm_flip_task *task) 57 49 { 58 50 unsigned long flags; 59 51 ··· 51 63 list_add_tail(&task->node, &work->queued); 52 64 spin_unlock_irqrestore(&work->lock, flags); 53 65 } 54 - EXPORT_SYMBOL(drm_flip_work_queue_task); 55 66 56 67 /** 57 68 * drm_flip_work_queue - queue work
+2 -16
include/drm/drm_flip_work.h
··· 33 33 * 34 34 * Util to queue up work to run from work-queue context after flip/vblank. 35 35 * Typically this can be used to defer unref of framebuffer's, cursor 36 - * bo's, etc until after vblank. The APIs are all thread-safe. 37 - * Moreover, drm_flip_work_queue_task and drm_flip_work_queue can be called 38 - * in atomic context. 36 + * bo's, etc until after vblank. The APIs are all thread-safe. Moreover, 37 + * drm_flip_work_queue can be called in atomic context. 39 38 */ 40 39 41 40 struct drm_flip_work; ··· 49 50 * drm_flip_work_commit() is called. 50 51 */ 51 52 typedef void (*drm_flip_func_t)(struct drm_flip_work *work, void *val); 52 - 53 - /** 54 - * struct drm_flip_task - flip work task 55 - * @node: list entry element 56 - * @data: data to pass to &drm_flip_work.func 57 - */ 58 - struct drm_flip_task { 59 - struct list_head node; 60 - void *data; 61 - }; 62 53 63 54 /** 64 55 * struct drm_flip_work - flip work queue ··· 68 79 spinlock_t lock; 69 80 }; 70 81 71 - struct drm_flip_task *drm_flip_work_allocate_task(void *data, gfp_t flags); 72 - void drm_flip_work_queue_task(struct drm_flip_work *work, 73 - struct drm_flip_task *task); 74 82 void drm_flip_work_queue(struct drm_flip_work *work, void *val); 75 83 void drm_flip_work_commit(struct drm_flip_work *work, 76 84 struct workqueue_struct *wq);