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.syrjala@xxxxxxxxxxxxxxx> Cc: Pekka Paalanen <pekka.paalanen@xxxxxxxxxxxxx> Cc: Simon Ser <contact@xxxxxxxxxxx> Cc: Harry Wentland <harry.wentland@xxxxxxx> Cc: Melissa Wen <mwen@xxxxxxxxxx> Cc: Jonas Ådahl <jadahl@xxxxxxxxxx> Cc: Sebastian Wick <sebastian.wick@xxxxxxxxxx> Cc: Shashank Sharma <shashank.sharma@xxxxxxx> Cc: Alexander Goins <agoins@xxxxxxxxxx> Cc: Joshua Ashton <joshua@xxxxxxxxx> Cc: Michel Dänzer <mdaenzer@xxxxxxxxxx> Cc: Aleix Pol <aleixpol@xxxxxxx> Cc: Xaver Hugl <xaver.hugl@xxxxxxxxx> Cc: Victoria Brekenfeld <victoria@xxxxxxxxxxxx> Cc: Daniel Vetter <daniel@xxxxxxxx> Cc: Uma Shankar <uma.shankar@xxxxxxxxx> Cc: Naseer Ahmed <quic_naseer@xxxxxxxxxxx> Cc: Christopher Braga <quic_cbraga@xxxxxxxxxxx> 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