All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Shankar, Uma" <uma.shankar@intel.com>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Ilia Mirkin <imirkin@alum.mit.edu>
Subject: Re: [PATCH v4 3/7] drm: Add DisplayPort colorspace property
Date: Fri, 6 Sep 2019 14:42:55 +0300	[thread overview]
Message-ID: <20190906114255.GS7482@intel.com> (raw)
In-Reply-To: <E7C9878FBA1C6D42A1CA3F62AEB6945F821DC31F@BGSMSX104.gar.corp.intel.com>

On Fri, Sep 06, 2019 at 11:31:55AM +0000, Shankar, Uma wrote:
> 
> 
> >-----Original Message-----
> >From: Ilia Mirkin <imirkin@alum.mit.edu>
> >Sent: Tuesday, September 3, 2019 6:12 PM
> >To: Mun, Gwan-gyeong <gwan-gyeong.mun@intel.com>
> >Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>; Shankar, Uma
> ><uma.shankar@intel.com>; dri-devel <dri-devel@lists.freedesktop.org>
> >Subject: Re: [PATCH v4 3/7] drm: Add DisplayPort colorspace property
> >
> >So how would this work with a DP++ connector? Should it list the HDMI or DP
> >properties? Or do we need a custom property checker which is aware of what is
> >currently plugged in to validate the values?
> 
> AFAIU For DP++ cases, we detect what kind of sink its driving DP or HDMI (with a passive dongle).
> Based on the type of sink detected, we should expose DP or HDMI colorspaces to userspace.

For i915 DP connector always drives DP mode, HDMI connector always drives
HDMI mode, even when the physical connector is DP++.

> 
> >On Tue, Sep 3, 2019 at 5:12 AM Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> >wrote:
> >>
> >> In order to use colorspace property to Display Port connectors, it
> >> extends DRM_MODE_CONNECTOR_DisplayPort connector_type on
> >> drm_mode_create_colorspace_property function.
> >>
> >> v3: Addressed review comments from Ville
> >>     - Add new colorimetry options for DP 1.4a spec.
> >>     - Separate set of colorimetry enum values for DP.
> >> v4: Add additional comments to struct drm_prop_enum_list.
> >>     Polishing an enum string of struct drm_prop_enum_list
> >> Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> >> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
> >> ---
> >>  drivers/gpu/drm/drm_connector.c | 46 +++++++++++++++++++++++++++++++++
> >>  include/drm/drm_connector.h     |  8 ++++++
> >>  2 files changed, 54 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/drm_connector.c
> >> b/drivers/gpu/drm/drm_connector.c index 4c766624b20d..5834e6d330a0
> >> 100644
> >> --- a/drivers/gpu/drm/drm_connector.c
> >> +++ b/drivers/gpu/drm/drm_connector.c
> >> @@ -882,6 +882,44 @@ static const struct drm_prop_enum_list
> >hdmi_colorspaces[] = {
> >>         { DRM_MODE_COLORIMETRY_DCI_P3_RGB_THEATER,
> >> "DCI-P3_RGB_Theater" },  };
> >>
> >> +/*
> >> + * As per DP 1.4a spec, 2.2.5.7.5 VSC SDP Payload for Pixel
> >> +Encoding/Colorimetry
> >> + * Format Table 2-120
> >> + */
> >> +static const struct drm_prop_enum_list dp_colorspaces[] = {
> >> +       /* For Default case, driver will set the colorspace */
> >> +       { DRM_MODE_COLORIMETRY_DEFAULT, "Default" },
> >> +       /* Colorimetry based on IEC 61966-2-1 */
> >> +       { DRM_MODE_COLORIMETRY_SRGB, "sRGB" },
> >> +       { DRM_MODE_COLORIMETRY_WIDE_GAMUT_FIXED_POINT_RGB,
> >"wide_gamut_fixed_point_RGB" },
> >> +       /* Colorimetry based on IEC 61966-2-2, wide gamut floating point RGB */
> >> +       { DRM_MODE_COLORIMETRY_SCRGB, "scRGB" },
> >> +       { DRM_MODE_COLORIMETRY_ADOBE_RGB, "Adobe_RGB" },
> >> +       /* Colorimetry based on SMPTE RP 431-2 */
> >> +       { DRM_MODE_COLORIMETRY_DCP_P3_RGB, "DCI-P3_RGB" },
> >> +       /* Colorimetry based on ITU-R BT.2020 */
> >> +       { DRM_MODE_COLORIMETRY_BT2020_RGB, "BT2020_RGB" },
> >> +       { DRM_MODE_COLORIMETRY_BT601_YCC, "BT601_YCC" },
> >> +       { DRM_MODE_COLORIMETRY_BT709_YCC, "BT709_YCC" },
> >> +       /* Standard Definition Colorimetry based on IEC 61966-2-4 */
> >> +       { DRM_MODE_COLORIMETRY_XVYCC_601, "XVYCC_601" },
> >> +       /* High Definition Colorimetry based on IEC 61966-2-4 */
> >> +       { DRM_MODE_COLORIMETRY_XVYCC_709, "XVYCC_709" },
> >> +       /* Colorimetry based on IEC 61966-2-1/Amendment 1 */
> >> +       { DRM_MODE_COLORIMETRY_SYCC_601, "SYCC_601" },
> >> +       /* Colorimetry based on IEC 61966-2-5 [33] */
> >> +       { DRM_MODE_COLORIMETRY_OPYCC_601, "opYCC_601" },
> >> +       /* Colorimetry based on ITU-R BT.2020 */
> >> +       { DRM_MODE_COLORIMETRY_BT2020_CYCC, "BT2020_CYCC" },
> >> +       /* Colorimetry based on ITU-R BT.2020 */
> >> +       { DRM_MODE_COLORIMETRY_BT2020_YCC, "BT2020_YCC" },
> >> +       /*
> >> +        * Colorumetry based on Digital Imaging and Communications in Medicine
> >> +        * (DICOM) Part 14: Grayscale Standard Display Function
> >> +        */
> >> +       { DRM_MODE_COLORIMETRY_DICOM_PART_14_GRAYSCALE,
> >> +"DICOM_Part_14_Grayscale" }, };
> >> +
> >>  /**
> >>   * DOC: standard connector properties
> >>   *
> >> @@ -1710,6 +1748,14 @@ int drm_mode_create_colorspace_property(struct
> >drm_connector *connector)
> >>                                                 ARRAY_SIZE(hdmi_colorspaces));
> >>                 if (!prop)
> >>                         return -ENOMEM;
> >> +       } else if (connector->connector_type ==
> >DRM_MODE_CONNECTOR_DisplayPort ||
> >> +                  connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
> >> +               prop = drm_property_create_enum(dev, DRM_MODE_PROP_ENUM,
> >> +                                               "Colorspace",
> >> +                                               dp_colorspaces,
> >> +                                               ARRAY_SIZE(dp_colorspaces));
> >> +               if (!prop)
> >> +                       return -ENOMEM;
> >>         } else {
> >>                 DRM_DEBUG_KMS("Colorspace property not supported\n");
> >>                 return 0;
> >> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> >> index 681cb590f952..8848e5d6b0c4 100644
> >> --- a/include/drm/drm_connector.h
> >> +++ b/include/drm/drm_connector.h
> >> @@ -281,6 +281,14 @@ enum drm_panel_orientation {
> >>  /* Additional Colorimetry extension added as part of CTA 861.G */
> >>  #define DRM_MODE_COLORIMETRY_DCI_P3_RGB_D65            11
> >>  #define DRM_MODE_COLORIMETRY_DCI_P3_RGB_THEATER                12
> >> +/* Additional Colorimetry Options added for DP 1.4a VSC Colorimetry Format */
> >> +#define DRM_MODE_COLORIMETRY_SRGB                      13
> >> +#define DRM_MODE_COLORIMETRY_WIDE_GAMUT_FIXED_POINT_RGB        14
> >> +#define DRM_MODE_COLORIMETRY_SCRGB                     15
> >> +#define DRM_MODE_COLORIMETRY_ADOBE_RGB                 16
> >> +#define DRM_MODE_COLORIMETRY_DCP_P3_RGB                        17
> >> +#define DRM_MODE_COLORIMETRY_BT601_YCC                 18
> >> +#define DRM_MODE_COLORIMETRY_DICOM_PART_14_GRAYSCALE   19
> >>
> >>  /**
> >>   * enum drm_bus_flags - bus_flags info for &drm_display_info
> >> --
> >> 2.23.0
> >>
> >> _______________________________________________
> >> dri-devel mailing list
> >> dri-devel@lists.freedesktop.org
> >> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-09-06 11:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03  9:12 [PATCH v4 0/6] drm/i915/dp: Support for DP HDR outputs Gwan-gyeong Mun
2019-09-03  9:12 ` [PATCH v4 1/7] drm/i915/dp: Extend program of VSC Header and DB for Colorimetry Format Gwan-gyeong Mun
2019-09-03  9:12 ` [PATCH v4 2/7] drm/i915/dp: Add support of BT.2020 Colorimetry to DP MSA Gwan-gyeong Mun
2019-09-03  9:12 ` [PATCH v4 3/7] drm: Add DisplayPort colorspace property Gwan-gyeong Mun
2019-09-03 12:42   ` Ilia Mirkin
2019-09-06 11:31     ` Shankar, Uma
2019-09-06 11:42       ` Ville Syrjälä [this message]
2019-09-06 13:24         ` Ilia Mirkin
2019-09-07 23:19           ` Mun, Gwan-gyeong
2019-09-08  1:43             ` Ilia Mirkin
2019-09-10  7:34               ` Mun, Gwan-gyeong
2019-09-10  7:42                 ` Ville Syrjälä
2019-09-10 13:21                 ` Ilia Mirkin
2019-09-10 16:14                   ` Ilia Mirkin
2019-09-09 10:25             ` Ville Syrjälä
2019-09-10  7:21               ` Mun, Gwan-gyeong
2019-09-03 14:11   ` Shankar, Uma
2019-09-03  9:12 ` [PATCH v4 4/7] drm/i915/dp: Attach " Gwan-gyeong Mun
2019-09-03  9:12 ` [PATCH v4 5/7] drm/i915: Add new GMP register size for GEN11 Gwan-gyeong Mun
2019-09-03 14:17   ` Shankar, Uma
2019-09-03  9:12 ` [PATCH v4 6/7] drm/i915/dp: Program an Infoframe SDP Header and DB for HDR Static Metadata Gwan-gyeong Mun
2019-09-03 14:30   ` Shankar, Uma
2019-09-03  9:12 ` [PATCH v4 7/7] drm/i915/dp: Attach HDR metadata property to DP connector Gwan-gyeong Mun
2019-09-03 10:27 ` ✓ Fi.CI.BAT: success for drm/i915/dp: Support for DP HDR outputs (rev4) Patchwork
2019-09-03 12:34 ` ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190906114255.GS7482@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imirkin@alum.mit.edu \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=uma.shankar@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.