]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/kernel-video.git/commit
v4l: ti-vps: vip: Different list_head for dequeue list vip
authorNikhil Devshatwar <nikhil.nd@ti.com>
Mon, 28 Apr 2014 14:21:14 +0000 (19:51 +0530)
committerRakesh Movva <r-movva@ti.com>
Thu, 1 May 2014 19:30:21 +0000 (14:30 -0500)
commitad429e8ade4bd66323f02e16ac6db79aa45a06ba
treeb6d7a8aa1490092869c7d5067f929e15b813e861
parent4faa75be0042faa66c54600d3c13b2c164303747
v4l: ti-vps: vip: Different list_head for dequeue list

VIP driver maintains two lists
stream->vidq = List of buffers which are queued by user space (queue)
dev->vip_bufs = List of buffers waiting for DMA completion (dequeue)

At any point of time, a buffer would be present in only one of them.
But when buffers are dropped continously, and suddenly user space starts
queueing the buffers, some buffers need to be held by the dequeue list
even if they are already dequeued. This scenario causes list corruption
and eventually kernel crash.

Solution to this problem would be to use a different list for maintaining
buffers which are waiting for DMA. This would allow referencing the buffer
from both lists.

Change-Id: I5a615f32a183eecc33e01a3f71b2a4885be9b047
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
drivers/media/platform/ti-vps/vip.c
drivers/media/platform/ti-vps/vip.h