]> git.baikalelectronics.ru Git - kernel.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)
commitb6ce9c818d5214057e29106360f8d9fc64d2786e
tree3271272039fa98b8482120dd559f197b00cdf774
parent609305dc3dffd47b83a3cca31a3db83634fd120c
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