drm/i915/display: Extend DP HDR support to hsw+
Subsystems (3)
PATCH v3 1/1 drm/i915/display: Extend DP HDR support to hsw+
HSW+ platforms are able to send out HDR Metadata SDP DIP packet as GMP. Hence, extending the support for HDR on DP encoders for the same.
v2: Limited to non eDP ports on hsw/bdw and removed it for lspcon as it is done separately (suggested by Ville)
v3: Added helper and limited eDP restriction to port A (Ville)
--- drivers/gpu/drm/i915/display/intel_dp.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dp.c +21 -1
@@ -4913,6 +4913,26 @@ bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port)return intel_bios_is_port_edp (dev_priv, port); } +static bool +has_gamut_metadata_dip (struct drm_i915_private *dev_priv, +struct intel_dp *intel_dp,enum port port) +{ +if (intel_bios_is_lspcon_present (dev_priv, port)) +return false; + +if (DISPLAY_VER (dev_priv) >=10 && !IS_GEMINILAKE (dev_priv)) +return true; + +if (port ==PORT_A &&intel_dp_is_edp (intel_dp)) +return false; + +if (IS_HASWELL (dev_priv) ||IS_BROADWELL (dev_priv) || +IS_GEMINILAKE (dev_priv) ||DISPLAY_VER (dev_priv) >=9 ) +return true; + +return false; +} +static void intel_dp_add_properties (struct intel_dp *intel_dp,struct drm_connector *connector) {
@@ -4939,7 +4959,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connectintel_attach_dp_colorspace_property (connector); } -if (IS_GEMINILAKE (dev_priv) ||DISPLAY_VER (dev_priv) >=11 ) +if (has_gamut_metadata_dip (dev_priv, intel_dp, port))drm_object_attach_property (&connector->base, connector->dev->mode_config.hdr_output_metadata_property,0 );
Signature · 1 line
2.25.1
Quoted 21 lines · Uma Shankar
HSW+ platforms are able to send out HDR Metadata SDP DIP packet as GMP. Hence, extending the support for HDR on DP encoders for the same.
v2: Limited to non eDP ports on hsw/bdw and removed it for lspcon as it is done separately (suggested by Ville)
v3: Added helper and limited eDP restriction to port A (Ville)
Cc Ville Syrjälä <[email protected]>Signed-off-by Uma Shankar <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port) · line 4917
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c +2
-0@@ -4913,6 +4913,26 @@ bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port)return intel_bios_is_port_edp (dev_priv, port); } +static bool +has_gamut_metadata_dip(struct drm_i915_private *dev_priv,
s/dev_priv/i915/ for modern style
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port) · line 4924
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_dp.c +7
-0+ struct intel_dp *intel_dp, enum port port) +{ + if (intel_bios_is_lspcon_present(dev_priv, port)) + return false; + +if (DISPLAY_VER (dev_priv) >=10 && !IS_GEMINILAKE (dev_priv)) +return true;
DISPLAY_VER >= 11
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port) · line 4926
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_dp.c +2
-0+ +if (port ==PORT_A &&intel_dp_is_edp (intel_dp))
The is_edp check is still wrong. Should be just port==A. Also allows you to drop the intel_dp argument to the function.
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port) · line 4931
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c +5
-0+return false; + +if (IS_HASWELL (dev_priv) ||IS_BROADWELL (dev_priv) || +IS_GEMINILAKE (dev_priv) ||DISPLAY_VER (dev_priv) >=9 ) +return true;
The IS_GLK check is redundant.
Quoted 18 lines
drivers/gpu/drm/i915/display/intel_dp.c +5
-1+ +return false; +} +static void intel_dp_add_properties (struct intel_dp *intel_dp,struct drm_connector *connector) {@@ -4939,7 +4959,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connectintel_attach_dp_colorspace_property (connector); } -if (IS_GEMINILAKE (dev_priv) ||DISPLAY_VER (dev_priv) >=11 ) +if (has_gamut_metadata_dip (dev_priv, intel_dp, port))drm_object_attach_property (&connector->base, connector->dev->mode_config.hdr_output_metadata_property,0 );Signature · 1 line
2.25.1
Signature · 2 lines
Ville Syrjälä Intel
Quoted 33 lines
-----Original Message-----
From: Ville Syrjälä <[email protected]>
Sent: Thursday, March 24, 2022 5:12 PM
To: Shankar, Uma <[email protected]>
Cc: [email protected]
Subject: Re: [v3] drm/i915/display: Extend DP HDR support to hsw+drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_is_port_edp(struct drm_i915_private
Quoted 22 lines · Uma Shankar
HSW+ platforms are able to send out HDR Metadata SDP DIP packet as GMP. Hence, extending the support for HDR on DP encoders for the same.
v2: Limited to non eDP ports on hsw/bdw and removed it for lspcon as it is done separately (suggested by Ville)
v3: Added helper and limited eDP restriction to port A (Ville)
Cc Ville Syrjälä <[email protected]>Signed-off-by Uma Shankar <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -4913,6 +4913,26 @@ bool intel_dp_is_port_edp(struct drm_i915_private
*dev_priv, enum port port)
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port) · line 4917
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_dp.c +2
-0return intel_bios_is_port_edp (dev_priv, port); } +static bool +has_gamut_metadata_dip(struct drm_i915_private *dev_priv,s/dev_priv/i915/ for modern style
Ok, will update
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port) · line 4924
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_dp.c +6
-0+ struct intel_dp *intel_dp, enum port port) { + if (intel_bios_is_lspcon_present(dev_priv, port)) + return false; + +if (DISPLAY_VER (dev_priv) >=10 && !IS_GEMINILAKE (dev_priv)) +return true;
DISPLAY_VER>= 11
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_is_port_edp(struct drm_i915_private · line 4924
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_dp.c +2
-0+ +if (port ==PORT_A &&intel_dp_is_edp (intel_dp))The
is_edpcheck is still wrong. Should be just port==A. Also allows you to drop theintel_dpargument to the function.
In the register description for VIDEO_DIP_CTL, (Bspec:7748)
BitField: VDIP Enable GMP
[BDW, SKL, BXT, KBL, KBLH, GLK, GLV, CFL, WHL, AML, CML, CNL, LKFR] GMP is not supported on transcoder EDP going to DDI A.
That's why was checking for eDP. But port A check should be good enough. Will drop it.
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port) · line 4931
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c +5
-0+return false; + +if (IS_HASWELL (dev_priv) ||IS_BROADWELL (dev_priv) || +IS_GEMINILAKE (dev_priv) ||DISPLAY_VER (dev_priv) >=9 ) +return true;The
IS_GLKcheck is redundant.
Yeah will drop it.
Quoted 23 lines
Quoted 15 lines
drivers/gpu/drm/i915/display/intel_dp.c +4
-0+ +return false; +} + static void intel_dp_add_properties(struct intel_dp *intel_dp, struct
drm_connector*connector) { @@ -4939,7 +4959,7 @@ intel_dp_add_properties(structintel_dp*intel_dp, structdrm_connector*connectdrivers/gpu/drm/i915/display/intel_dp.c +1
-1intel_attach_dp_colorspace_property (connector); } -if (IS_GEMINILAKE (dev_priv) ||DISPLAY_VER (dev_priv) >=11 ) +if (has_gamut_metadata_dip (dev_priv, intel_dp, port)) drm_object_attach_property(&connector->base, connector->dev-Quoted 4 lines
mode_config.hdr_output_metadata_property,
0);
--
2.25.1--
Ville Syrjälä
Intel
Quoted 58 lines · Uma
Quoted 33 lines
-----Original Message-----
From: Ville Syrjälä <[email protected]>
Sent: Thursday, March 24, 2022 5:12 PM
To: Shankar, Uma <[email protected]>
Cc: [email protected]
Subject: Re: [v3] drm/i915/display: Extend DP HDR support to hsw+drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_is_port_edp(struct drm_i915_private
Quoted 22 lines · Uma Shankar
HSW+ platforms are able to send out HDR Metadata SDP DIP packet as GMP. Hence, extending the support for HDR on DP encoders for the same.
v2: Limited to non eDP ports on hsw/bdw and removed it for lspcon as it is done separately (suggested by Ville)
v3: Added helper and limited eDP restriction to port A (Ville)
Cc Ville Syrjälä <[email protected]>Signed-off-by Uma Shankar <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -4913,6 +4913,26 @@ bool intel_dp_is_port_edp(struct drm_i915_private
*dev_priv, enum port port)Quoted 6 lines
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port) · line 4917
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_dp.c +2
-0return intel_bios_is_port_edp (dev_priv, port); } +static bool +has_gamut_metadata_dip(struct drm_i915_private *dev_priv,s/dev_priv/i915/ for modern style
Ok, will update
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port) · line 4924
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_dp.c +6
-0+ struct intel_dp *intel_dp, enum port port) { + if (intel_bios_is_lspcon_present(dev_priv, port)) + return false; + +if (DISPLAY_VER (dev_priv) >=10 && !IS_GEMINILAKE (dev_priv)) +return true;
DISPLAY_VER>= 11Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_is_port_edp(struct drm_i915_private · line 4924
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_dp.c +2
-0+ +if (port ==PORT_A &&intel_dp_is_edp (intel_dp))The
is_edpcheck is still wrong. Should be just port==A. Also allows you to drop theintel_dpargument to the function.
Quoted 6 lines
In the register description for
VIDEO_DIP_CTL, (Bspec:7748)
BitField: VDIP Enable GMP
[BDW, SKL, BXT, KBL, KBLH, GLK, GLV, CFL, WHL, AML, CML, CNL, LKFR] GMP is not supported on transcoder EDP going to DDI A.That's why was checking for eDP. But port A check should be good enough.
Transcoder EDP is hardwired to DDI A. Despite the name it has nothing to do with eDP vs. DP.
Having the eDP check would be just wrong because it would then attach the property to DDI A when it is used as an external DP port. And yes, such machines do in fact exist.
Quoted 35 lines
Will drop it.
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port) · line 4931
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c +5
-0+return false; + +if (IS_HASWELL (dev_priv) ||IS_BROADWELL (dev_priv) || +IS_GEMINILAKE (dev_priv) ||DISPLAY_VER (dev_priv) >=9 ) +return true;The
IS_GLKcheck is redundant.Yeah will drop it.
Quoted 23 lines
Quoted 15 lines
drivers/gpu/drm/i915/display/intel_dp.c +4
-0+ +return false; +} + static void intel_dp_add_properties(struct intel_dp *intel_dp, struct
drm_connector*connector) { @@ -4939,7 +4959,7 @@ intel_dp_add_properties(structintel_dp*intel_dp, structdrm_connector*connectdrivers/gpu/drm/i915/display/intel_dp.c +1
-1intel_attach_dp_colorspace_property (connector); } -if (IS_GEMINILAKE (dev_priv) ||DISPLAY_VER (dev_priv) >=11 ) +if (has_gamut_metadata_dip (dev_priv, intel_dp, port)) drm_object_attach_property(&connector->base, connector->dev-Quoted 4 lines
mode_config.hdr_output_metadata_property,
0);
--
2.25.1--
Ville Syrjälä
Intel
Signature · 2 lines
Ville Syrjälä Intel
Quoted 75 lines
-----Original Message-----
From: Ville Syrjälä <[email protected]>
Sent: Thursday, March 24, 2022 6:30 PM
To: Shankar, Uma <[email protected]>
Cc: [email protected]
Subject: Re: [v3] drm/i915/display: Extend DP HDR support to hsw+Quoted 65 lines · Uma
Quoted 35 lines
-----Original Message-----
From: Ville Syrjälä <[email protected]>
Sent: Thursday, March 24, 2022 5:12 PM
To: Shankar, Uma <[email protected]>
Cc: [email protected]
Subject: Re: [v3] drm/i915/display: Extend DP HDR support to hsw+Quoted 23 lines · Uma Shankar
HSW+ platforms are able to send out HDR Metadata SDP DIP packet as GMP. Hence, extending the support for HDR on DP encoders for the same.
v2: Limited to non eDP ports on hsw/bdw and removed it for lspcon as it is done separately (suggested by Ville)
v3: Added helper and limited eDP restriction to port A (Ville)
Cc Ville Syrjälä <[email protected]>Signed-off-by Uma Shankar <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -4913,6 +4913,26 @@ bool intel_dp_is_port_edp(structQuoted 1 line
drm_i915_private
*dev_priv, enum port port)Quoted 6 lines
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port) · line 4917
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_dp.c +2
-0return intel_bios_is_port_edp (dev_priv, port); } +static bool +has_gamut_metadata_dip(struct drm_i915_private *dev_priv,s/dev_priv/i915/ for modern style
Ok, will update
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port) · line 4924
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_dp.c +6
-0+ struct intel_dp *intel_dp, enum port port) { + if (intel_bios_is_lspcon_present(dev_priv, port)) + return false; + +if (DISPLAY_VER (dev_priv) >=10 && !IS_GEMINILAKE (dev_priv)) +return true;
DISPLAY_VER>= 11Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_dp.c +2
-0+ +if (port ==PORT_A &&intel_dp_is_edp (intel_dp))The
is_edpcheck is still wrong. Should be just port==A. Also allows you to drop theintel_dpargument to the function.In the register description for
VIDEO_DIP_CTL, (Bspec:7748)
BitField: VDIP Enable GMP
[BDW, SKL, BXT, KBL, KBLH, GLK, GLV, CFL, WHL, AML, CML, CNL, LKFR] GMP is not supported on transcoder EDP going to DDI A.
Quoted 8 lines
Quoted 1 line
That's why was checking for eDP. But port A check should be good enough.
Transcoder EDP is hardwired to DDI A. Despite the name it has nothing to do with eDP vs. DP.
Having the eDP check would be just wrong because it would then attach the property to DDI A when it is used as an external DP port. And yes, such machines do in fact exist.
Yeah got the point. Thanks Ville for the review and valuable comments.
Regards,
Uma Shankar
Quoted 41 lines
Quoted 13 lines
Will drop it.
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_dp.c bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port) · line 4931
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp.c +5
-0+return false; + +if (IS_HASWELL (dev_priv) ||IS_BROADWELL (dev_priv) || +IS_GEMINILAKE (dev_priv) ||DISPLAY_VER (dev_priv) >=9 ) +return true;The
IS_GLKcheck is redundant.Yeah will drop it.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_dp.c +4
-0+ +return false; +} + static void intel_dp_add_properties(struct intel_dp *intel_dp, struct
drm_connector*connector) { @@ -4939,7 +4959,7 @@ intel_dp_add_properties(structintel_dp*intel_dp, structdrm_connector*connect
Quoted 15 lines
Quoted 15 lines
Quoted 11 lines
drivers/gpu/drm/i915/display/intel_dp.c +1
-1intel_attach_dp_colorspace_property (connector); } -if (IS_GEMINILAKE (dev_priv) ||DISPLAY_VER (dev_priv) >=11 ) +if (has_gamut_metadata_dip (dev_priv, intel_dp, port)) drm_object_attach_property(&connector->base, connector->dev-mode_config.hdr_output_metadata_property,
0);
--
2.25.1--
Ville Syrjälä
Intel--
Ville Syrjälä
Intel