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)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:22:17 +0000 (20:22 +0300)
commit9bd7df9b6d8eb17359f9cc43999350ae864fadd6
treefe9f771fd00b3f0d8f3ec4783b04b6c2520c7c48
parentffbd2a3a98d2126f52cedb1dc43f489e4cb4bf4f
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