This is an early RFC set for a color pipeline API, along with a sample implementation in VKMS. All the key API bits are here, but I would like to show a larger variety of colorop types, as well as examples of different possible color pipelines for a given plane.
The first patch is a doc patch that will explain the motivation and reasoning behind this approach and give an overview over the API. IGT tests can be found at https://gitlab.freedesktop.org/hwentland/igt-gpu-tools/-/merge_requests/1 IGT patches are also being sent to the igt-dev mailing list. libdrm changes to support the new IOCTLs are at https://gitlab.freedesktop.org/hwentland/drm/-/merge_requests/1 If you prefer a gitlab MR for review you can find it at https://gitlab.freedesktop.org/hwentland/linux/-/merge_requests/5 A slightly different approach for a Color Pipeline API was sent by Uma Shankar and can be found at https://patchwork.freedesktop.org/series/123024/ The main difference is that his approach is not introducing a new DRM core object but instead exposes color pipelines via blob properties. There are pros and cons to both approaches. Cc: Ville Syrjala <ville.syrj...@linux.intel.com> Cc: Pekka Paalanen <pekka.paala...@collabora.com> Cc: Simon Ser <cont...@emersion.fr> Cc: Harry Wentland <harry.wentl...@amd.com> Cc: Melissa Wen <m...@igalia.com> Cc: Jonas Ådahl <jad...@redhat.com> Cc: Sebastian Wick <sebastian.w...@redhat.com> Cc: Shashank Sharma <shashank.sha...@amd.com> Cc: Alexander Goins <ago...@nvidia.com> Cc: Joshua Ashton <jos...@froggi.es> Cc: Michel Dänzer <mdaen...@redhat.com> Cc: Aleix Pol <aleix...@kde.org> Cc: Xaver Hugl <xaver.h...@gmail.com> Cc: Victoria Brekenfeld <victo...@system76.com> Cc: Daniel Vetter <dan...@ffwll.ch> Cc: Uma Shankar <uma.shan...@intel.com> Cc: Naseer Ahmed <quic_nas...@quicinc.com> Cc: Christopher Braga <quic_cbr...@quicinc.com> Harry Wentland (10): drm/doc/rfc: Describe why prescriptive color pipeline is needed drm/colorop: Introduce new drm_colorop mode object drm/colorop: Add TYPE property drm/color: Add 1D Curve subtype drm/colorop: Add BYPASS property drm/colorop: Add NEXT property drm/colorop: Add atomic state print for drm_colorop drm/colorop: Add new IOCTLs to retrieve drm_colorop objects drm/plane: Add COLOR PIPELINE property drm/vkms: Add enumerated 1D curve colorop Documentation/gpu/rfc/color_pipeline.rst | 278 ++++++++++++++++++ drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/drm_atomic.c | 154 ++++++++++ drivers/gpu/drm/drm_atomic_helper.c | 12 + drivers/gpu/drm/drm_atomic_state_helper.c | 5 + drivers/gpu/drm/drm_atomic_uapi.c | 110 +++++++ drivers/gpu/drm/drm_colorop.c | 343 ++++++++++++++++++++++ drivers/gpu/drm/drm_crtc_internal.h | 4 + drivers/gpu/drm/drm_ioctl.c | 5 + drivers/gpu/drm/drm_mode_config.c | 7 + drivers/gpu/drm/drm_plane_helper.c | 2 +- drivers/gpu/drm/vkms/Makefile | 3 +- drivers/gpu/drm/vkms/vkms_colorop.c | 108 +++++++ drivers/gpu/drm/vkms/vkms_composer.c | 316 ++++++++++++++++++++ drivers/gpu/drm/vkms/vkms_drv.h | 4 + drivers/gpu/drm/vkms/vkms_plane.c | 2 + include/drm/drm_atomic.h | 82 ++++++ include/drm/drm_atomic_uapi.h | 3 + include/drm/drm_colorop.h | 233 +++++++++++++++ include/drm/drm_mode_config.h | 18 ++ include/drm/drm_plane.h | 10 + include/uapi/drm/drm.h | 3 + include/uapi/drm/drm_mode.h | 22 ++ 23 files changed, 1723 insertions(+), 2 deletions(-) create mode 100644 Documentation/gpu/rfc/color_pipeline.rst create mode 100644 drivers/gpu/drm/drm_colorop.c create mode 100644 drivers/gpu/drm/vkms/vkms_colorop.c create mode 100644 include/drm/drm_colorop.h -- 2.42.0