Message ID | 20230525191809.3524-3-harry.wentland@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Enable Colorspace connector property in amdgpu | expand |
On Thu, 25 May 2023 15:17:58 -0400 Harry Wentland <harry.wentland@amd.com> wrote: > From: Joshua Ashton <joshua@froggi.es> > > 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 > > 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> > > 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: Ville Syrjälä <ville.syrjala@linux.intel.com> > Cc: Melissa Wen <mwen@igalia.com> > Cc: dri-devel@lists.freedesktop.org > Cc: amd-gfx@lists.freedesktop.org > --- > include/drm/drm_connector.h | 62 +++++++++++++++++++++++++++++++++++-- > 1 file changed, 60 insertions(+), 2 deletions(-) > > diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h > index 77401e425341..ee597593d7e6 100644 > --- a/include/drm/drm_connector.h > +++ b/include/drm/drm_connector.h > @@ -363,13 +363,71 @@ enum drm_privacy_screen_status { > PRIVACY_SCREEN_ENABLED_LOCKED, > }; > > -/* > - * This is a consolidated colorimetry list supported by HDMI and > +/** > + * enum drm_colorspace - color space > + * > + * This enum is a consolidated colorimetry list supported by HDMI and > * DP protocol standard. The respective connectors will register > * a property with the subset of this list (supported by that > * respective protocol). Userspace will set the colorspace through > * a colorspace property which will be created and exposed to > * userspace. > + * > + * DP definitions come from the DP v2.0 spec > + * HDMI definitions come from the CTA-861-H spec > + * > + * @DRM_MODE_COLORIMETRY_DEFAULT: > + * Driver specific behavior. > + * @DRM_MODE_COLORIMETRY_NO_DATA: > + * Driver specific behavior. > + * @DRM_MODE_COLORIMETRY_SMPTE_170M_YCC: > + * (HDMI) > + * SMPTE ST 170M colorimetry format > + * @DRM_MODE_COLORIMETRY_BT709_YCC: > + * (HDMI, DP) > + * ITU-R BT.709 colorimetry format > + * @DRM_MODE_COLORIMETRY_XVYCC_601: > + * (HDMI, DP) > + * xvYCC601 colorimetry format > + * @DRM_MODE_COLORIMETRY_XVYCC_709: > + * (HDMI, DP) > + * xvYCC709 colorimetry format > + * @DRM_MODE_COLORIMETRY_SYCC_601: > + * (HDMI, DP) > + * sYCC601 colorimetry format > + * @DRM_MODE_COLORIMETRY_OPYCC_601: > + * (HDMI, DP) > + * opYCC601 colorimetry format > + * @DRM_MODE_COLORIMETRY_OPRGB: > + * (HDMI, DP) > + * opRGB colorimetry format > + * @DRM_MODE_COLORIMETRY_BT2020_CYCC: > + * (HDMI, DP) > + * ITU-R BT.2020 Y'c C'bc C'rc (constant luminance) colorimetry format > + * @DRM_MODE_COLORIMETRY_BT2020_RGB: > + * (HDMI, DP) > + * ITU-R BT.2020 R' G' B' colorimetry format > + * @DRM_MODE_COLORIMETRY_BT2020_YCC: > + * (HDMI, DP) > + * ITU-R BT.2020 Y' C'b C'r colorimetry format > + * @DRM_MODE_COLORIMETRY_DCI_P3_RGB_D65: > + * (HDMI) > + * SMPTE ST 2113 P3D65 colorimetry format > + * @DRM_MODE_COLORIMETRY_DCI_P3_RGB_THEATER: > + * (HDMI) > + * SMPTE ST 2113 P3DCI colorimetry format > + * @DRM_MODE_COLORIMETRY_RGB_WIDE_FIXED: > + * (DP) > + * RGB wide gamut fixed point colorimetry format > + * @DRM_MODE_COLORIMETRY_RGB_WIDE_FLOAT: > + * (DP) > + * RGB wide gamut floating point > + * (scRGB (IEC 61966-2-2)) colorimetry format > + * @DRM_MODE_COLORIMETRY_BT601_YCC: > + * (DP) > + * ITU-R BT.601 colorimetry format > + * The DP spec does not say whether this is the 525 or the 625 > + * line version. > */ > enum drm_colorspace { > /* For Default case, driver will set the colorspace */ This is probably as good as possible, having references to chase when questions arise. Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com> Thanks, pq
On Thu, May 25, 2023 at 9:18 PM Harry Wentland <harry.wentland@amd.com> wrote: > > From: Joshua Ashton <joshua@froggi.es> > > 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 > > 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> > > 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: Ville Syrjälä <ville.syrjala@linux.intel.com> > Cc: Melissa Wen <mwen@igalia.com> > Cc: dri-devel@lists.freedesktop.org > Cc: amd-gfx@lists.freedesktop.org > --- > include/drm/drm_connector.h | 62 +++++++++++++++++++++++++++++++++++-- > 1 file changed, 60 insertions(+), 2 deletions(-) > > diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h > index 77401e425341..ee597593d7e6 100644 > --- a/include/drm/drm_connector.h > +++ b/include/drm/drm_connector.h > @@ -363,13 +363,71 @@ enum drm_privacy_screen_status { > PRIVACY_SCREEN_ENABLED_LOCKED, > }; > > -/* > - * This is a consolidated colorimetry list supported by HDMI and > +/** > + * enum drm_colorspace - color space > + * > + * This enum is a consolidated colorimetry list supported by HDMI and > * DP protocol standard. The respective connectors will register > * a property with the subset of this list (supported by that > * respective protocol). Userspace will set the colorspace through > * a colorspace property which will be created and exposed to > * userspace. > + * > + * DP definitions come from the DP v2.0 spec > + * HDMI definitions come from the CTA-861-H spec > + * > + * @DRM_MODE_COLORIMETRY_DEFAULT: > + * Driver specific behavior. > + * @DRM_MODE_COLORIMETRY_NO_DATA: > + * Driver specific behavior. TBH this is still confusing me. Is DEFAULT really just driver specific behavior? What's the difference to NO_DATA? Is NO_DATA actually not driver-specific but display-specific? I.e. the default colorimetry of the display? > + * @DRM_MODE_COLORIMETRY_SMPTE_170M_YCC: > + * (HDMI) > + * SMPTE ST 170M colorimetry format > + * @DRM_MODE_COLORIMETRY_BT709_YCC: > + * (HDMI, DP) > + * ITU-R BT.709 colorimetry format > + * @DRM_MODE_COLORIMETRY_XVYCC_601: > + * (HDMI, DP) > + * xvYCC601 colorimetry format > + * @DRM_MODE_COLORIMETRY_XVYCC_709: > + * (HDMI, DP) > + * xvYCC709 colorimetry format > + * @DRM_MODE_COLORIMETRY_SYCC_601: > + * (HDMI, DP) > + * sYCC601 colorimetry format > + * @DRM_MODE_COLORIMETRY_OPYCC_601: > + * (HDMI, DP) > + * opYCC601 colorimetry format > + * @DRM_MODE_COLORIMETRY_OPRGB: > + * (HDMI, DP) > + * opRGB colorimetry format > + * @DRM_MODE_COLORIMETRY_BT2020_CYCC: > + * (HDMI, DP) > + * ITU-R BT.2020 Y'c C'bc C'rc (constant luminance) colorimetry format > + * @DRM_MODE_COLORIMETRY_BT2020_RGB: > + * (HDMI, DP) > + * ITU-R BT.2020 R' G' B' colorimetry format > + * @DRM_MODE_COLORIMETRY_BT2020_YCC: > + * (HDMI, DP) > + * ITU-R BT.2020 Y' C'b C'r colorimetry format > + * @DRM_MODE_COLORIMETRY_DCI_P3_RGB_D65: > + * (HDMI) > + * SMPTE ST 2113 P3D65 colorimetry format > + * @DRM_MODE_COLORIMETRY_DCI_P3_RGB_THEATER: > + * (HDMI) > + * SMPTE ST 2113 P3DCI colorimetry format > + * @DRM_MODE_COLORIMETRY_RGB_WIDE_FIXED: > + * (DP) > + * RGB wide gamut fixed point colorimetry format > + * @DRM_MODE_COLORIMETRY_RGB_WIDE_FLOAT: > + * (DP) > + * RGB wide gamut floating point > + * (scRGB (IEC 61966-2-2)) colorimetry format > + * @DRM_MODE_COLORIMETRY_BT601_YCC: > + * (DP) > + * ITU-R BT.601 colorimetry format > + * The DP spec does not say whether this is the 525 or the 625 > + * line version. > */ > enum drm_colorspace { > /* For Default case, driver will set the colorspace */ > -- > 2.40.1 >
On Friday, May 26th, 2023 at 18:27, Sebastian Wick <sebastian.wick@redhat.com> wrote: > > + * @DRM_MODE_COLORIMETRY_DEFAULT: > > + * Driver specific behavior. > > + * @DRM_MODE_COLORIMETRY_NO_DATA: > > + * Driver specific behavior. > > TBH this is still confusing me. Is DEFAULT really just driver specific > behavior? What's the difference to NO_DATA? Is NO_DATA actually not > driver-specific but display-specific? I.e. the default colorimetry of > the display? DEFAULT == NO_DATA == 0
On Fri, May 26, 2023 at 6:37 PM Simon Ser <contact@emersion.fr> wrote: > > On Friday, May 26th, 2023 at 18:27, Sebastian Wick <sebastian.wick@redhat.com> wrote: > > > > + * @DRM_MODE_COLORIMETRY_DEFAULT: > > > + * Driver specific behavior. > > > + * @DRM_MODE_COLORIMETRY_NO_DATA: > > > + * Driver specific behavior. > > > > TBH this is still confusing me. Is DEFAULT really just driver specific > > behavior? What's the difference to NO_DATA? Is NO_DATA actually not > > driver-specific but display-specific? I.e. the default colorimetry of > > the display? > > DEFAULT == NO_DATA == 0 > *sight* and backwards compat... Alright, not much we can do then.
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index 77401e425341..ee597593d7e6 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -363,13 +363,71 @@ enum drm_privacy_screen_status { PRIVACY_SCREEN_ENABLED_LOCKED, }; -/* - * This is a consolidated colorimetry list supported by HDMI and +/** + * enum drm_colorspace - color space + * + * This enum is a consolidated colorimetry list supported by HDMI and * DP protocol standard. The respective connectors will register * a property with the subset of this list (supported by that * respective protocol). Userspace will set the colorspace through * a colorspace property which will be created and exposed to * userspace. + * + * DP definitions come from the DP v2.0 spec + * HDMI definitions come from the CTA-861-H spec + * + * @DRM_MODE_COLORIMETRY_DEFAULT: + * Driver specific behavior. + * @DRM_MODE_COLORIMETRY_NO_DATA: + * Driver specific behavior. + * @DRM_MODE_COLORIMETRY_SMPTE_170M_YCC: + * (HDMI) + * SMPTE ST 170M colorimetry format + * @DRM_MODE_COLORIMETRY_BT709_YCC: + * (HDMI, DP) + * ITU-R BT.709 colorimetry format + * @DRM_MODE_COLORIMETRY_XVYCC_601: + * (HDMI, DP) + * xvYCC601 colorimetry format + * @DRM_MODE_COLORIMETRY_XVYCC_709: + * (HDMI, DP) + * xvYCC709 colorimetry format + * @DRM_MODE_COLORIMETRY_SYCC_601: + * (HDMI, DP) + * sYCC601 colorimetry format + * @DRM_MODE_COLORIMETRY_OPYCC_601: + * (HDMI, DP) + * opYCC601 colorimetry format + * @DRM_MODE_COLORIMETRY_OPRGB: + * (HDMI, DP) + * opRGB colorimetry format + * @DRM_MODE_COLORIMETRY_BT2020_CYCC: + * (HDMI, DP) + * ITU-R BT.2020 Y'c C'bc C'rc (constant luminance) colorimetry format + * @DRM_MODE_COLORIMETRY_BT2020_RGB: + * (HDMI, DP) + * ITU-R BT.2020 R' G' B' colorimetry format + * @DRM_MODE_COLORIMETRY_BT2020_YCC: + * (HDMI, DP) + * ITU-R BT.2020 Y' C'b C'r colorimetry format + * @DRM_MODE_COLORIMETRY_DCI_P3_RGB_D65: + * (HDMI) + * SMPTE ST 2113 P3D65 colorimetry format + * @DRM_MODE_COLORIMETRY_DCI_P3_RGB_THEATER: + * (HDMI) + * SMPTE ST 2113 P3DCI colorimetry format + * @DRM_MODE_COLORIMETRY_RGB_WIDE_FIXED: + * (DP) + * RGB wide gamut fixed point colorimetry format + * @DRM_MODE_COLORIMETRY_RGB_WIDE_FLOAT: + * (DP) + * RGB wide gamut floating point + * (scRGB (IEC 61966-2-2)) colorimetry format + * @DRM_MODE_COLORIMETRY_BT601_YCC: + * (DP) + * ITU-R BT.601 colorimetry format + * The DP spec does not say whether this is the 525 or the 625 + * line version. */ enum drm_colorspace { /* For Default case, driver will set the colorspace */