linux/include/uapi/drm
Brian Starkey 935774cd71 drm: Add writeback connector type
Writeback connectors represent writeback engines which can write the
CRTC output to a memory framebuffer. Add a writeback connector type and
related support functions.

Drivers should initialize a writeback connector with
drm_writeback_connector_init() which takes care of setting up all the
writeback-specific details on top of the normal functionality of
drm_connector_init().

Writeback connectors have a WRITEBACK_FB_ID property, used to set the
output framebuffer, and a WRITEBACK_PIXEL_FORMATS blob used to expose the
supported writeback formats to userspace.

When a framebuffer is attached to a writeback connector with the
WRITEBACK_FB_ID property, it is used only once (for the commit in which
it was included), and userspace can never read back the value of
WRITEBACK_FB_ID. WRITEBACK_FB_ID can only be set if the connector is
attached to a CRTC.

Changes since v1:
 - Added drm_writeback.c + documentation
 - Added helper to initialize writeback connector in one go
 - Added core checks
 - Squashed into a single commit
 - Dropped the client cap
 - Writeback framebuffers are no longer persistent

Changes since v2:
 Daniel Vetter:
 - Subclass drm_connector to drm_writeback_connector
 - Relax check to allow CRTC to be set without an FB
 - Add some writeback_ prefixes
 - Drop PIXEL_FORMATS_SIZE property, as it was unnecessary
 Gustavo Padovan:
 - Add drm_writeback_job to handle writeback signalling centrally

Changes since v3:
 - Rebased
 - Rename PIXEL_FORMATS -> WRITEBACK_PIXEL_FORMATS

Chances since v4:
 - Embed a drm_encoder inside the drm_writeback_connector to
   reduce the amount of boilerplate code required from the drivers
   that are using it.

Changes since v5:
 - Added Rob Clark's atomic_commit() vfunc to connector helper
   funcs, so that writeback jobs are committed from atomic helpers
 - Updated create_writeback_properties() signature to return an
   error code rather than a boolean false for failure.
 - Free writeback job with the connector state rather than when
   doing the cleanup_work()

Changes since v7:
 - fix extraneous use of out_fence that is only introduced in a
   subsequent patch.

Changes since v8:
 - whitespace changes pull from subsequent patch

Changes since v9:
 - Revert the v6 changes that free the writeback job in the connector
   state cleanup and return to doing it in the cleanup_work() function

Signed-off-by: Brian Starkey <brian.starkey@arm.com>
[rebased and fixed conflicts]
Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
[rebased and added atomic_commit() vfunc for writeback jobs]
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/229037/
2018-06-20 15:27:49 +01:00
..
amdgpu_drm.h drm/amdgpu: add VCN to firmware query interface 2018-03-20 23:42:49 -05:00
armada_drm.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
drm_fourcc.h drm/vc4: Add support for SAND modifier. 2018-05-31 11:42:44 -07:00
drm_mode.h drm: Add writeback connector type 2018-06-20 15:27:49 +01:00
drm_sarea.h drm: add extern C guard for the UAPI headers 2016-05-13 13:57:17 +01:00
drm.h drm: Add DRM client cap for aspect-ratio 2018-05-11 09:05:03 +02:00
etnaviv_drm.h drm/etnaviv: add more minor features fields 2018-03-09 12:22:36 +01:00
exynos_drm.h drm/exynos: ipp: Remove Exynos DRM IPP subsystem 2018-01-02 08:41:22 +09:00
i810_drm.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
i915_drm.h drm/i915: expose rcs topology through query uAPI 2018-03-08 10:07:24 +00:00
mga_drm.h drm/mga: add extern C guard for the UAPI header 2016-05-13 14:06:07 +01:00
msm_drm.h drm/msm: add sudo flag to submit ioctl 2018-02-20 10:41:20 -05:00
nouveau_drm.h drm/nouveau: drop drm/ prefix from include 2016-05-13 14:06:10 +01:00
omap_drm.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
qxl_drm.h drm/qxl: fix __user annotations 2017-06-23 10:06:31 +02:00
r128_drm.h drm/r128: add extern C guard for the UAPI header 2016-05-13 14:06:13 +01:00
radeon_drm.h drm/radeon: add extern C guard for the UAPI header 2016-05-13 14:06:14 +01:00
savage_drm.h drm/savage: add extern C guard for the UAPI header 2016-05-13 14:06:15 +01:00
sis_drm.h drm/sis: add extern C guard for the UAPI header 2016-05-13 14:06:16 +01:00
tegra_drm.h drm/tegra: add extern C guard for the UAPI header 2016-05-13 14:06:17 +01:00
v3d_drm.h drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+ 2018-05-03 16:26:30 -07:00
vc4_drm.h drm/vc4: Add a pad field to align drm_vc4_submit_cl to 64 bits. 2018-05-03 15:20:09 -07:00
vgem_drm.h drm/vgem: Attach sw fences to exported vGEM dma-buf (ioctl) 2016-07-18 08:54:55 +02:00
via_drm.h drm/via: add extern C guard for the UAPI header 2016-05-13 14:06:19 +01:00
virtgpu_drm.h virtio-gpu: fix ioctl and expose the fixed status to userspace. 2018-02-27 08:37:58 +01:00
vmwgfx_drm.h drm/vmwgfx: Prepare to support fence fd 2017-08-28 17:51:28 +02:00