diff mbox series

[v2,3/6] drm: Add DisplayPort colorspace property

Message ID 20190823095232.28908-4-gwan-gyeong.mun@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/dp: Support for DP HDR outputs | expand

Commit Message

Gwan-gyeong Mun Aug. 23, 2019, 9:52 a.m. UTC
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.

Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
---
 drivers/gpu/drm/drm_connector.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Uma Shankar Aug. 26, 2019, 7:18 p.m. UTC | #1
>-----Original Message-----
>From: Mun, Gwan-gyeong
>Sent: Friday, August 23, 2019 3:22 PM
>To: intel-gfx@lists.freedesktop.org
>Cc: dri-devel@lists.freedesktop.org; Shankar, Uma <uma.shankar@intel.com>;
>Sharma, Shashank <shashank.sharma@intel.com>
>Subject: [PATCH v2 3/6] drm: Add DisplayPort colorspace property
>
>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.

The changes look good to me.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

>Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
>---
> drivers/gpu/drm/drm_connector.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
>index 4c766624b20d..655ada9d4c16 100644
>--- a/drivers/gpu/drm/drm_connector.c
>+++ b/drivers/gpu/drm/drm_connector.c
>@@ -1703,7 +1703,9 @@ int drm_mode_create_colorspace_property(struct
>drm_connector *connector)
> 	struct drm_property *prop;
>
> 	if (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
>-	    connector->connector_type == DRM_MODE_CONNECTOR_HDMIB) {
>+	    connector->connector_type == DRM_MODE_CONNECTOR_HDMIB ||
>+	    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",
> 						hdmi_colorspaces,
>--
>2.22.0
Ville Syrjala Sept. 2, 2019, 2:44 p.m. UTC | #2
On Fri, Aug 23, 2019 at 12:52:29PM +0300, Gwan-gyeong Mun 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.
> 
> Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> ---
>  drivers/gpu/drm/drm_connector.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 4c766624b20d..655ada9d4c16 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -1703,7 +1703,9 @@ int drm_mode_create_colorspace_property(struct drm_connector *connector)
>  	struct drm_property *prop;
>  
>  	if (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
> -	    connector->connector_type == DRM_MODE_CONNECTOR_HDMIB) {
> +	    connector->connector_type == DRM_MODE_CONNECTOR_HDMIB ||
> +	    connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
> +	    connector->connector_type == DRM_MODE_CONNECTOR_eDP) {

We don't need a separate set of enum values for DP?

>  		prop = drm_property_create_enum(dev, DRM_MODE_PROP_ENUM,
>  						"Colorspace",
>  						hdmi_colorspaces,
> -- 
> 2.22.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Gwan-gyeong Mun Sept. 3, 2019, 4:57 a.m. UTC | #3
On Mon, 2019-09-02 at 17:44 +0300, Ville Syrjälä wrote:
> On Fri, Aug 23, 2019 at 12:52:29PM +0300, Gwan-gyeong Mun 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.
> > 
> > Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> > ---
> >  drivers/gpu/drm/drm_connector.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_connector.c
> > b/drivers/gpu/drm/drm_connector.c
> > index 4c766624b20d..655ada9d4c16 100644
> > --- a/drivers/gpu/drm/drm_connector.c
> > +++ b/drivers/gpu/drm/drm_connector.c
> > @@ -1703,7 +1703,9 @@ int
> > drm_mode_create_colorspace_property(struct drm_connector
> > *connector)
> >  	struct drm_property *prop;
> >  
> >  	if (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
> > -	    connector->connector_type == DRM_MODE_CONNECTOR_HDMIB) {
> > +	    connector->connector_type == DRM_MODE_CONNECTOR_HDMIB ||
> > +	    connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort
> > ||
> > +	    connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
> 
> We don't need a separate set of enum values for DP?
> 
I checked DP 1.4a spec, 2.2.5.7.5 VSC SDP Payload for Pixel
Encoding/Colorimetry again,
Followed your comments, the spec requires more new colorimetry options
for DP 1.4a colorimetry format.
I'll add missed colorimetry options and will separate set of
colorimetry enum values for DP.

> >  		prop = drm_property_create_enum(dev,
> > DRM_MODE_PROP_ENUM,
> >  						"Colorspace",
> >  						hdmi_colorspaces,
> > -- 
> > 2.22.0
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 4c766624b20d..655ada9d4c16 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -1703,7 +1703,9 @@  int drm_mode_create_colorspace_property(struct drm_connector *connector)
 	struct drm_property *prop;
 
 	if (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
-	    connector->connector_type == DRM_MODE_CONNECTOR_HDMIB) {
+	    connector->connector_type == DRM_MODE_CONNECTOR_HDMIB ||
+	    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",
 						hdmi_colorspaces,