Skip to content

Commit f96c61f

Browse files
misyltoadalexdeucher
authored andcommitted
drm/connector: Add enum documentation to drm_colorspace
To match the other enums, and add more information about these values. v2: - Specify where an enum entry comes from - Clarify DEFAULT and NO_DATA behavior - BT.2020 CYCC is "constant luminance" - correct type for BT.601 v4: - drop DP/HDMI clarifications that might create more questions than answers v5: - Add note on YCC and RGB variants Signed-off-by: Joshua Ashton <joshua@froggi.es> Signed-off-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com> Reviewed-by: Simon Ser <contact@emersion.fr> Cc: Pekka Paalanen <ppaalanen@gmail.com> Cc: Sebastian Wick <sebastian.wick@redhat.com> Cc: Vitaly.Prosyak@amd.com Cc: Uma Shankar <uma.shankar@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Joshua Ashton <joshua@froggi.es> Cc: Simon Ser <contact@emersion.fr> Cc: Melissa Wen <mwen@igalia.com> Cc: dri-devel@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 1626761 commit f96c61f

1 file changed

Lines changed: 68 additions & 2 deletions

File tree

include/drm/drm_connector.h

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,13 +419,79 @@ enum drm_privacy_screen_status {
419419
PRIVACY_SCREEN_ENABLED_LOCKED,
420420
};
421421

422-
/*
423-
* This is a consolidated colorimetry list supported by HDMI and
422+
/**
423+
* enum drm_colorspace - color space
424+
*
425+
* This enum is a consolidated colorimetry list supported by HDMI and
424426
* DP protocol standard. The respective connectors will register
425427
* a property with the subset of this list (supported by that
426428
* respective protocol). Userspace will set the colorspace through
427429
* a colorspace property which will be created and exposed to
428430
* userspace.
431+
*
432+
* DP definitions come from the DP v2.0 spec
433+
* HDMI definitions come from the CTA-861-H spec
434+
*
435+
* A note on YCC and RGB variants:
436+
*
437+
* Since userspace is not aware of the encoding on the wire
438+
* (RGB or YCbCr), drivers are free to pick the appropriate
439+
* variant, regardless of what userspace selects. E.g., if
440+
* BT2020_RGB is selected by userspace a driver will pick
441+
* BT2020_YCC if the encoding on the wire is YUV444 or YUV420.
442+
*
443+
* @DRM_MODE_COLORIMETRY_DEFAULT:
444+
* Driver specific behavior.
445+
* @DRM_MODE_COLORIMETRY_NO_DATA:
446+
* Driver specific behavior.
447+
* @DRM_MODE_COLORIMETRY_SMPTE_170M_YCC:
448+
* (HDMI)
449+
* SMPTE ST 170M colorimetry format
450+
* @DRM_MODE_COLORIMETRY_BT709_YCC:
451+
* (HDMI, DP)
452+
* ITU-R BT.709 colorimetry format
453+
* @DRM_MODE_COLORIMETRY_XVYCC_601:
454+
* (HDMI, DP)
455+
* xvYCC601 colorimetry format
456+
* @DRM_MODE_COLORIMETRY_XVYCC_709:
457+
* (HDMI, DP)
458+
* xvYCC709 colorimetry format
459+
* @DRM_MODE_COLORIMETRY_SYCC_601:
460+
* (HDMI, DP)
461+
* sYCC601 colorimetry format
462+
* @DRM_MODE_COLORIMETRY_OPYCC_601:
463+
* (HDMI, DP)
464+
* opYCC601 colorimetry format
465+
* @DRM_MODE_COLORIMETRY_OPRGB:
466+
* (HDMI, DP)
467+
* opRGB colorimetry format
468+
* @DRM_MODE_COLORIMETRY_BT2020_CYCC:
469+
* (HDMI, DP)
470+
* ITU-R BT.2020 Y'c C'bc C'rc (constant luminance) colorimetry format
471+
* @DRM_MODE_COLORIMETRY_BT2020_RGB:
472+
* (HDMI, DP)
473+
* ITU-R BT.2020 R' G' B' colorimetry format
474+
* @DRM_MODE_COLORIMETRY_BT2020_YCC:
475+
* (HDMI, DP)
476+
* ITU-R BT.2020 Y' C'b C'r colorimetry format
477+
* @DRM_MODE_COLORIMETRY_DCI_P3_RGB_D65:
478+
* (HDMI)
479+
* SMPTE ST 2113 P3D65 colorimetry format
480+
* @DRM_MODE_COLORIMETRY_DCI_P3_RGB_THEATER:
481+
* (HDMI)
482+
* SMPTE ST 2113 P3DCI colorimetry format
483+
* @DRM_MODE_COLORIMETRY_RGB_WIDE_FIXED:
484+
* (DP)
485+
* RGB wide gamut fixed point colorimetry format
486+
* @DRM_MODE_COLORIMETRY_RGB_WIDE_FLOAT:
487+
* (DP)
488+
* RGB wide gamut floating point
489+
* (scRGB (IEC 61966-2-2)) colorimetry format
490+
* @DRM_MODE_COLORIMETRY_BT601_YCC:
491+
* (DP)
492+
* ITU-R BT.601 colorimetry format
493+
* The DP spec does not say whether this is the 525 or the 625
494+
* line version.
429495
*/
430496
enum drm_colorspace {
431497
/* For Default case, driver will set the colorspace */

0 commit comments

Comments
 (0)