linux_dsm_epyc7002/drivers/gpu/drm
Gustavo Padovan 9626014258 drm/fence: add in-fences support
There is now a new property called IN_FENCE_FD attached to every plane
state that receives sync_file fds from userspace via the atomic commit
IOCTL.

The fd is then translated to a fence (that may be a fence_array
subclass or just a normal fence) and then used by DRM to fence_wait() for
all fences in the sync_file to signal. So it only commits when all
framebuffers are ready to scanout.

v2: Comments by Daniel Vetter:
	- remove set state->fence = NULL in destroy phase
	- accept fence -1 as valid and just return 0
	- do not call fence_get() - sync_file_fences_get() already calls it
	- fence_put() if state->fence is already set, in case userspace
	set the property more than once.

v3: WARN_ON if fence is set but state has no FB

v4: Comment from Maarten Lankhorst
	- allow set fence with no related fb

v5: rename FENCE_FD to IN_FENCE_FD

v6: Comments by Daniel Vetter:
	- rename plane_state->in_fence back to "fence"
	- re-introduce WARN_ON if fence set but no fb

     - rebase after fence -> dma_fence rename

v7: Comments by Brian Starkey
	- set state->fence to NULL when duplicating the state
	- fail if IN_FENCE_FD was already set

v8: rebase against latest drm-misc

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Brian Starkey <brian.starkey@arm.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Tested-by: Robert Foss <robert.foss@collabora.com>
[danvet: Rebase onto extracted drm_mode_config.[hc].]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-11-16 09:55:27 +01:00
..
amd drm/irq: Unexport drm_vblank_on/off 2016-11-15 23:33:48 +01:00
arc drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs 2016-11-02 11:33:47 -04:00
arm Merge branch 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-next 2016-11-11 10:00:58 +10:00
armada drm/armada: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops 2016-11-14 07:54:13 +01:00
ast drm/ast: free correct pointer in astfb_create() error paths 2016-11-14 07:45:16 +01:00
atmel-hlcdc drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs 2016-11-02 11:33:47 -04:00
bochs drm/bochs: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops 2016-11-14 07:54:38 +01:00
bridge drm/bridge: analogix_dp: return error if transfer none byte 2016-11-16 11:16:13 +05:30
cirrus Merge tag 'topic/drm-misc-2016-11-10' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-11-11 09:28:44 +10:00
etnaviv drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs 2016-11-02 11:33:47 -04:00
exynos drm/exynos: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops 2016-11-14 07:54:50 +01:00
fsl-dcu drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs 2016-11-02 11:33:47 -04:00
gma500 drm/gma500: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops 2016-11-14 08:01:01 +01:00
hisilicon drm: move allocation out of drm_get_format_name() 2016-11-12 14:19:38 +01:00
i2c drm/i2c/tda998x: mark symbol static where possible 2016-10-24 16:27:16 +02:00
i810 drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs 2016-11-02 11:33:47 -04:00
i915 drm/i915: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops 2016-11-14 07:58:20 +01:00
imx drm/imx: Switch to drm_fb_cma_prepare_fb() helper 2016-11-15 08:25:06 +01:00
mediatek drm/irq: Unexport drm_vblank_count 2016-11-15 23:33:47 +01:00
mga
mgag200 Merge tag 'topic/drm-misc-2016-11-10' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-11-11 09:28:44 +10:00
msm drm/msm: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops 2016-11-14 07:58:04 +01:00
nouveau drm/nouveau: Use drm_crtc_vblank_off/on 2016-11-15 23:33:37 +01:00
omapdrm drm/omapdrm: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops 2016-11-14 07:58:15 +01:00
panel
qxl drm/qxl: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops 2016-11-14 07:55:33 +01:00
r128
radeon drm/radeon: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops 2016-11-14 07:56:52 +01:00
rcar-du Merge tag 'topic/drm-misc-2016-11-10' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-11-11 09:28:44 +10:00
rockchip drm/rockchip: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops 2016-11-14 07:56:47 +01:00
savage drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs 2016-11-02 11:33:47 -04:00
shmobile drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs 2016-11-02 11:33:47 -04:00
sis drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs 2016-11-02 11:33:47 -04:00
sti Merge tag 'topic/drm-misc-2016-11-10' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-11-11 09:28:44 +10:00
sun4i drm/sun4i: constify component_ops structures 2016-11-13 11:42:48 +01:00
tdfx drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs 2016-11-02 11:33:47 -04:00
tegra drm/tegra: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops 2016-11-14 07:56:58 +01:00
tilcdc drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs 2016-11-02 11:33:47 -04:00
ttm drm/ttm: fix ttm_bo_wait 2016-11-09 00:46:04 +05:30
udl drm/udl: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops 2016-11-14 07:57:59 +01:00
vc4 drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs 2016-11-02 11:33:47 -04:00
vgem dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
via drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs 2016-11-02 11:33:47 -04:00
virtio drm/virtio: use DRM_FB_HELPER_DEFAULT_OPS for fb_ops 2016-11-14 07:58:10 +01:00
vmwgfx drm: move allocation out of drm_get_format_name() 2016-11-12 14:19:38 +01:00
zte drm: zte: checking for NULL instead of IS_ERR() 2016-11-15 11:00:42 +01:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic_helper.c drm/fence: add in-fences support 2016-11-16 09:55:27 +01:00
drm_atomic.c drm/fence: add in-fences support 2016-11-16 09:55:27 +01:00
drm_auth.c
drm_blend.c drm: RIP mode_config->rotation_property 2016-10-22 10:42:11 +02:00
drm_bridge.c
drm_bufs.c
drm_cache.c
drm_color_mgmt.c drm/color: document NULL values and default settings better 2016-11-15 22:39:48 +01:00
drm_connector.c drm: Move tile group code into drm_connector.c 2016-11-15 15:30:38 +01:00
drm_context.c
drm_crtc_helper_internal.h
drm_crtc_helper.c
drm_crtc_internal.h drm: Extract drm_mode_config.[hc] 2016-11-15 15:23:29 +01:00
drm_crtc.c drm: Move tile group code into drm_connector.c 2016-11-15 15:30:38 +01:00
drm_debugfs_crc.c drm: fix sparse warnings on undeclared symbols in crc debugfs 2016-10-19 14:10:29 +03:00
drm_debugfs.c drm/atomic: add debugfs file to dump out atomic state 2016-11-08 16:38:03 -05:00
drm_dma.c
drm_dp_aux_dev.c
drm_dp_dual_mode_helper.c drm: Print some debug/error info during DP dual mode detect 2016-10-26 15:57:11 -04:00
drm_dp_helper.c Merge tag 'drm-for-v4.9' of git://people.freedesktop.org/~airlied/linux 2016-10-11 18:12:22 -07:00
drm_dp_mst_topology.c drm/dp/mst: Check peer device type before attempting EDID read 2016-10-26 18:53:44 +02:00
drm_drv.c drm: Extract drm_drv.h 2016-11-15 12:50:30 +01:00
drm_dumb_buffers.c drm: Consolidate dumb buffer docs 2016-11-15 12:51:49 +01:00
drm_edid_load.c
drm_edid.c drm/edid: Add the missing "Hz" to VIC 58,59 comment 2016-11-08 11:09:06 +01:00
drm_encoder_slave.c
drm_encoder.c
drm_fb_cma_helper.c drm/fb_cma_helper: Add drm_fb_cma_prepare_fb() helper 2016-11-14 12:43:58 +01:00
drm_fb_helper.c drm/fb-helper: fix segfaults in drm_fb_helper_debug_* 2016-11-14 07:47:34 +01:00
drm_flip_work.c
drm_fops.c drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs 2016-11-02 11:33:47 -04:00
drm_fourcc.c drm: move allocation out of drm_get_format_name() 2016-11-12 14:19:38 +01:00
drm_framebuffer.c drm: move allocation out of drm_get_format_name() 2016-11-12 14:19:38 +01:00
drm_gem_cma_helper.c
drm_gem.c
drm_global.c
drm_hashtab.c
drm_info.c drm: Print device information again in debugfs 2016-10-17 16:20:53 +10:00
drm_internal.h drm: drm_irq.h header cleanup 2016-11-15 23:33:48 +01:00
drm_ioc32.c
drm_ioctl.c
drm_irq.c drm/irq: Unexport drm_vblank_on/off 2016-11-15 23:33:48 +01:00
drm_kms_helper_common.c
drm_legacy.h
drm_lock.c
drm_memory.c
drm_mipi_dsi.c
drm_mm.c drm: Add stackdepot include for DRM_DEBUG_MM 2016-11-08 13:46:49 +01:00
drm_mode_config.c drm/fence: add in-fences support 2016-11-16 09:55:27 +01:00
drm_mode_object.c
drm_modes.c Revert "drm: Add aspect ratio parsing in DRM layer" 2016-11-15 15:01:42 +01:00
drm_modeset_helper.c drm: move allocation out of drm_get_format_name() 2016-11-12 14:19:38 +01:00
drm_modeset_lock.c drm: don't let crtc_ww_class leak out 2016-11-15 08:33:35 +01:00
drm_of.c drm: convert DT component matching to component_match_add_release() 2016-10-25 11:52:38 -04:00
drm_panel.c
drm_pci.c
drm_plane_helper.c drm: add helpers to go from plane state to drm_rect 2016-11-08 16:38:03 -05:00
drm_plane.c drm/fence: add in-fences support 2016-11-16 09:55:27 +01:00
drm_platform.c
drm_prime.c drm: Fix up kerneldoc for new drm_gem_dmabuf_export() 2016-10-10 11:19:42 +02:00
drm_print.c drm/print: Move kerneldoc next to definition 2016-11-15 12:55:24 +01:00
drm_probe_helper.c
drm_property.c
drm_rect.c drm: helper macros to print composite types 2016-11-08 16:38:03 -05:00
drm_scatter.c
drm_simple_kms_helper.c
drm_sysfs.c
drm_trace_points.c
drm_trace.h
drm_vm.c
drm_vma_manager.c
Kconfig drm/fence: add in-fences support 2016-11-16 09:55:27 +01:00
Makefile drm: Extract drm_mode_config.[hc] 2016-11-15 15:23:29 +01:00