media: v4l2-core: fix v4l2-core to use fence
authorJanghyuck Kim <janghyuck.kim@samsung.com>
Tue, 3 Apr 2018 06:47:28 +0000 (15:47 +0900)
committerSeungchul Kim <sc377.kim@samsung.com>
Mon, 28 May 2018 05:28:45 +0000 (14:28 +0900)
commit7a1326cf5f85d223511b912f96fa9db0ee7daf00
treedfe827d1fda26e4ffe9bce1c1a9358a6afd1dbe2
parentf7b93f477ce5468709c10d7481658e0cdc664f54
media: v4l2-core: fix v4l2-core to use fence

V4L2 explicit synchronization is supported by v4l2-core, however, some
changes were needed for compatiblity of other v4l2 driver.

fence_fd in v4l2_buffer is changed from reserved2 to reserved.
reserved2 field has been used for other driver, and legacy scaler driver
used reserved field for their fence information. This change could
guarantee compatibility of previous user API.

Some spinlock location of fence_cb_lock were moved to avoid running
buf_queue callback in interrupt context.

Finally, additional check routine was removed in vb2_buffer_done().
This routine made invalid address access, and it is used for unordered
queue. Currently it is not needed, so it will be reverted later after
find the reason of invalid address access.

Change-Id: I618b1d4320cfb95508727fc418ebe0f9fae7183a
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
drivers/media/v4l2-core/v4l2-compat-ioctl32.c
drivers/media/v4l2-core/videobuf2-core.c
include/uapi/linux/videodev2.h