linux-uconsole/include
Daniel Vetter 40c9d1c263 UPSTREAM: dma-buf: Add ioctls to allow userspace to flush
The userspace might need some sort of cache coherency management e.g. when CPU
and GPU domains are being accessed through dma-buf at the same time. To
circumvent this problem there are begin/end coherency markers, that forward
directly to existing dma-buf device drivers vfunc hooks. Userspace can make use
of those markers through the DMA_BUF_IOCTL_SYNC ioctl. The sequence would be
used like following:
     - mmap dma-buf fd
     - for each drawing/upload cycle in CPU 1. SYNC_START ioctl, 2. read/write
       to mmap area 3. SYNC_END ioctl. This can be repeated as often as you
       want (with the new data being consumed by the GPU or say scanout device)
     - munmap once you don't need the buffer any more

BackPort:
  upstream kernel change dma-buf api with the commit(831e9da
  dma-buf: Remove range-based flush), avoid effect too much to
  current kernel, Just compatible dma-buf api to current version.

v2 (Tiago): Fix header file type names (u64 -> __u64)
v3 (Tiago): Add documentation. Use enum dma_buf_sync_flags to the begin/end
dma-buf functions. Check for overflows in start/length.
v4 (Tiago): use 2d regions for sync.
v5 (Tiago): forget about 2d regions (v4); use _IOW in DMA_BUF_IOCTL_SYNC and
remove range information from struct dma_buf_sync.
v6 (Tiago): use __u64 structured padded flags instead enum. Adjust
documentation about the recommendation on using sync ioctls.
v7 (Tiago): Alex' nit on flags definition and being even more wording in the
doc about sync usage.
v9 (Tiago): remove useless is_dma_buf_file check. Fix sync.flags conditionals
and its mask order check. Add <linux/types.h> include in dma-buf.h.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1455228291-29640-1-git-send-email-tiago.vignatti@intel.com
(cherry picked from commit c11e391da2)

Change-Id: I92916babe7fb0ab3bf3ce9dc966408f2e05fe83d
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-05-16 18:33:15 +08:00
..
acpi
asm-generic Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git 2017-05-06 14:23:00 +08:00
clocksource arm64: KVM: Implement timer save/restore 2016-11-09 22:15:41 +08:00
crypto Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android 2017-04-23 12:02:14 +08:00
drm drm: add drm_device_get_by_name support 2017-05-10 15:28:18 +08:00
dt-bindings dt-bindings: suspend: rockchip: add PMU_USB_LINESTAE_WAKEUP_EN config for wakeup 2017-05-11 19:34:55 +08:00
keys
kvm KVM: arm/arm64: vgic-v3: Make the LR indexing macro public 2016-11-09 22:15:40 +08:00
linux sip: rockchip: fix bus about make kernel failure 2017-05-10 16:17:21 +08:00
math-emu
media isp10: rockchip: v0.1.6 2016-11-29 21:11:43 +08:00
memory
misc
net UPSTREAM: ipv6 addrconf: implement RFC7559 router solicitation backoff 2017-04-10 13:29:27 +05:30
pcmcia
ras
rdma RDMA/core: Fix incorrect structure packing for booleans 2017-03-12 06:37:29 +01:00
rxrpc
scsi scsi: libiscsi: add lock around task lists to fix list corruption regression 2017-03-26 12:13:19 +02:00
soc drm/rockchip: vop: export rockchip_drm_register_notifier_to_dmc 2017-05-11 14:47:15 +08:00
sound ASoC: codec: hdmi-codec: add support for audio mode config 2017-04-13 19:19:08 +08:00
target target: Fix NULL dereference during LUN lookup + active I/O shutdown 2017-03-15 09:57:14 +08:00
trace Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git 2017-05-06 14:23:00 +08:00
uapi UPSTREAM: dma-buf: Add ioctls to allow userspace to flush 2017-05-16 18:33:15 +08:00
video video: rockchip: screen: add refresh mode for cmd mode screen 2016-10-26 16:54:56 +08:00
xen
Kbuild