alistair23-linux/include
Laurent Pinchart 4bb7267dc4 [media] v4l: vb2: Add fatal error condition flag
When a fatal error occurs that render the device unusable, the only
options for a driver to signal the error condition to userspace is to
set the V4L2_BUF_FLAG_ERROR flag when dequeuing buffers and to return an
error from the buffer prepare handler when queuing buffers.

The buffer error flag indicates a transient error and can't be used by
applications to detect fatal errors. Returning an error from vb2_qbuf()
is thus the only real indication that a fatal error occurred. However,
this is difficult to handle for multithreaded applications that requeue
buffers from a thread other than the control thread. In particular the
poll() call in the control thread will not notify userspace of the
error.

This patch adds an explicit mechanism to report fatal errors to
userspace. Drivers can call the vb2_queue_error() function to signal a
fatal error. From this moment on, buffer preparation will return -EIO to
userspace, and vb2_poll() will set the POLLERR flag and return
immediately. The error flag is cleared when cancelling the queue, either
at stream off time (through vb2_streamoff) or when releasing the queue
with vb2_queue_release().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 16:19:04 -03:00
..
acpi ACPI / i915: ignore firmware requests for backlight change 2014-07-07 23:38:05 +02:00
asm-generic core: fix typo in percpu read_mostly section 2014-07-01 16:45:22 -04:00
clocksource
crypto crypto: hash - Add real ahash walk interface 2014-05-21 20:56:12 +08:00
drm sound fixes for 3.16-rc4 2014-07-04 08:56:57 -07:00
dt-bindings This batch of fixes is for a handful of clock drivers from Allwinner, 2014-07-13 12:21:04 -07:00
keys
kvm
linux Merge branch 'sched_warn_fix' into patchwork 2014-07-17 10:37:07 -03:00
math-emu
media [media] v4l: vb2: Add fatal error condition flag 2014-07-17 16:19:04 -03:00
memory
misc
net ipv4: fix dst race in sk_dst_get() 2014-06-25 17:41:44 -07:00
pcmcia
ras
rdma Merge branches 'core', 'cxgb3', 'cxgb4', 'iser', 'iwpm', 'misc', 'mlx4', 'mlx5', 'noio', 'ocrdma', 'qib', 'srp' and 'usnic' into for-next 2014-06-10 10:12:14 -07:00
rxrpc
scsi SCSI for-linus on 20140705 2014-07-06 12:08:30 -07:00
sound ALSA: control: Protect user controls against concurrent access 2014-06-18 15:12:33 +02:00
target target: Report correct response length for some commands 2014-06-11 12:15:30 -07:00
trace tracing: Add __field_struct macro for TRACE_EVENT() 2014-06-21 00:18:42 -04:00
uapi [media] v4l: Add premultiplied alpha flag for pixel formats 2014-07-17 12:44:47 -03:00
video Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-06-12 11:32:30 -07:00
xen Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-06-12 14:27:40 -07:00
Kbuild