]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
drm: rework flip-work helpers to avoid calling func when the FIFO is full
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Fri, 14 Nov 2014 18:30:29 +0000 (19:30 +0100)
committerDave Airlie <airlied@redhat.com>
Fri, 14 Nov 2014 23:25:35 +0000 (09:25 +1000)
commit8bd4ae202813ac04f35dacf43263e1cf96743292
tree3271272039fa98b8482120dd559f197b00cdf774
parent7fd36c0bae07d8c7fa9668ea6ba28dbcb4f9955b
drm: rework flip-work helpers to avoid calling func when the FIFO is full

Make use of lists instead of kfifo in order to dynamically allocate
task entry when someone require some delayed work, and thus preventing
drm_flip_work_queue from directly calling func instead of queuing this
call.
This allow drm_flip_work_queue to be safely called even within irq
handlers.

Add new helper functions to allocate a flip work task and queue it when
needed. This prevents allocating data within irq context (which might
impact the time spent in the irq handler).

Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_flip_work.c
include/drm/drm_flip_work.h