* [PATCH v3 1/4] drm/i915/dp: Drop LSPCON check from intel_dp_has_gamut_metadata_dip()
[not found] <20261121005409.17626-1-fighters390@qq.com>
@ 2026-11-21 0:54 ` Yitian Shao
2026-11-21 1:13 ` Ville Syrjälä
2026-11-21 0:54 ` [PATCH v3 2/4] drm/i915/dp: Attach HDR_OUTPUT_METADATA on eDP with TCON HDR support Yitian Shao
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Yitian Shao @ 2026-11-21 0:54 UTC (permalink / raw)
To: intel-gfx
Cc: dri-devel, ville.syrjala, jani.nikula, sebastian.wick,
uma.shankar, suraj.kandpal
intel_dp_has_gamut_metadata_dip() returns false for LSPCON encoders, which
is not what the function is asking. LSPCON does send the HDR metadata
infoframe, only through lspcon_write_infoframe() instead of the transcoder
DIP.
The check only existed to keep intel_dp_add_properties() from attaching
HDR_OUTPUT_METADATA before intel_lspcon_detect_hdr_capability() has probed
the hardware. Move that check to intel_dp_add_properties() where the
attach decision is made.
Signed-off-by: Yitian Shao <fighters390@qq.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index afd4169..2736a78 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -6672,9 +6672,6 @@ intel_dp_has_gamut_metadata_dip(struct intel_encoder *encoder)
struct intel_display *display = to_intel_display(encoder);
enum port port = encoder->port;
- if (intel_bios_encoder_is_lspcon(encoder->devdata))
- return false;
-
if (DISPLAY_VER(display) >= 11)
return true;
@@ -6715,7 +6712,9 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *_connec
intel_attach_dp_colorspace_property(&connector->base);
}
- if (intel_dp_has_gamut_metadata_dip(&dp_to_dig_port(intel_dp)->base))
+ /* LSPCON attaches the property itself in intel_dp_connector_register() */
+ if (!intel_bios_encoder_is_lspcon(dp_to_dig_port(intel_dp)->base.devdata) &&
+ intel_dp_has_gamut_metadata_dip(&dp_to_dig_port(intel_dp)->base))
drm_connector_attach_hdr_output_metadata_property(&connector->base);
if (HAS_VRR(display))
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH v3 1/4] drm/i915/dp: Drop LSPCON check from intel_dp_has_gamut_metadata_dip()
2026-11-21 0:54 ` [PATCH v3 1/4] drm/i915/dp: Drop LSPCON check from intel_dp_has_gamut_metadata_dip() Yitian Shao
@ 2026-11-21 1:13 ` Ville Syrjälä
0 siblings, 0 replies; 9+ messages in thread
From: Ville Syrjälä @ 2026-11-21 1:13 UTC (permalink / raw)
To: Yitian Shao
Cc: intel-gfx, dri-devel, jani.nikula, sebastian.wick, uma.shankar,
suraj.kandpal
On Sat, Nov 21, 2026 at 08:54:06AM +0800, Yitian Shao wrote:
> intel_dp_has_gamut_metadata_dip() returns false for LSPCON encoders, which
> is not what the function is asking. LSPCON does send the HDR metadata
> infoframe, only through lspcon_write_infoframe() instead of the transcoder
> DIP.
lspcon_write_infoframe() does use the same DIP for this, so this
statement is a bit confusing. I guess we just want to say something
along the lines that the DIP does exist regardless of whether
LSPCON is used or not.
Otherwise this looks good.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The check only existed to keep intel_dp_add_properties() from attaching
> HDR_OUTPUT_METADATA before intel_lspcon_detect_hdr_capability() has probed
> the hardware. Move that check to intel_dp_add_properties() where the
> attach decision is made.
>
> Signed-off-by: Yitian Shao <fighters390@qq.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index afd4169..2736a78 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -6672,9 +6672,6 @@ intel_dp_has_gamut_metadata_dip(struct intel_encoder *encoder)
> struct intel_display *display = to_intel_display(encoder);
> enum port port = encoder->port;
>
> - if (intel_bios_encoder_is_lspcon(encoder->devdata))
> - return false;
> -
> if (DISPLAY_VER(display) >= 11)
> return true;
>
> @@ -6715,7 +6712,9 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *_connec
> intel_attach_dp_colorspace_property(&connector->base);
> }
>
> - if (intel_dp_has_gamut_metadata_dip(&dp_to_dig_port(intel_dp)->base))
> + /* LSPCON attaches the property itself in intel_dp_connector_register() */
> + if (!intel_bios_encoder_is_lspcon(dp_to_dig_port(intel_dp)->base.devdata) &&
> + intel_dp_has_gamut_metadata_dip(&dp_to_dig_port(intel_dp)->base))
> drm_connector_attach_hdr_output_metadata_property(&connector->base);
>
> if (HAS_VRR(display))
> --
> 2.53.0
--
Ville Syrjälä
Intel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 2/4] drm/i915/dp: Attach HDR_OUTPUT_METADATA on eDP with TCON HDR support
[not found] <20261121005409.17626-1-fighters390@qq.com>
2026-11-21 0:54 ` [PATCH v3 1/4] drm/i915/dp: Drop LSPCON check from intel_dp_has_gamut_metadata_dip() Yitian Shao
@ 2026-11-21 0:54 ` Yitian Shao
2026-11-21 1:20 ` Ville Syrjälä
2026-11-21 0:54 ` [PATCH v3 3/4] drm/i915/display: Check gamut metadata DIP support in LSPCON HDR detection Yitian Shao
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Yitian Shao @ 2026-11-21 0:54 UTC (permalink / raw)
To: intel-gfx
Cc: dri-devel, ville.syrjala, jani.nikula, sebastian.wick,
uma.shankar, suraj.kandpal
intel_dp_add_properties() attaches HDR_OUTPUT_METADATA only when the
encoder can send a gamut metadata DIP, so pre-ICL eDP panels on port A
never expose it even when their EDID advertises HDR.
Those panels do not use a DIP at all: the metadata is programmed through
the Intel AUX HDR interface, and the TCON capability is already known
because intel_edp_backlight_setup() runs before intel_dp_add_properties().
Factor the whole decision into intel_dp_hdr_metadata_supported() and let
it accept eDP panels whose TCON advertises PQ (ST2084) decoding through
the Intel AUX HDR backlight interface.
Since no DIP is transmitted in that case, skip computing the infoframe
when the encoder has no gamut metadata DIP, so that the computed state
matches what is actually programmed.
Signed-off-by: Yitian Shao <fighters390@qq.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 31 +++++++++++++++++--
.../drm/i915/display/intel_dp_aux_backlight.c | 5 +++
.../drm/i915/display/intel_dp_aux_backlight.h | 3 ++
3 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 2736a78..eeead26 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -70,6 +70,7 @@
#include "intel_display_types.h"
#include "intel_dp.h"
#include "intel_dp_aux.h"
+#include "intel_dp_aux_backlight.h"
#include "intel_dp_hdcp.h"
#include "intel_dp_link_training.h"
#include "intel_dp_mst.h"
@@ -3085,9 +3086,17 @@ intel_dp_compute_hdr_metadata_infoframe_sdp(struct intel_dp *intel_dp,
const struct drm_connector_state *conn_state)
{
struct intel_display *display = to_intel_display(intel_dp);
+ struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
int ret;
struct hdmi_drm_infoframe *drm_infoframe = &crtc_state->infoframes.drm.drm;
+ /*
+ * Without a gamut metadata DIP there is nothing to program here; on
+ * pre-ICL eDP the metadata goes through the AUX HDR interface instead.
+ */
+ if (!intel_dp_has_gamut_metadata_dip(encoder))
+ return;
+
if (!conn_state->hdr_output_metadata)
return;
@@ -6685,6 +6694,24 @@ intel_dp_has_gamut_metadata_dip(struct intel_encoder *encoder)
return false;
}
+static bool intel_dp_hdr_metadata_supported(struct intel_dp *intel_dp,
+ struct intel_connector *connector)
+{
+ struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
+
+ /* LSPCON attaches the property itself in intel_dp_connector_register() */
+ if (intel_bios_encoder_is_lspcon(encoder->devdata))
+ return false;
+
+ if (intel_dp_has_gamut_metadata_dip(encoder))
+ return true;
+
+ /* Pre-ICL eDP programs the metadata via the AUX HDR interface */
+ return intel_dp_is_edp(intel_dp) &&
+ intel_dp_aux_is_hdr_backlight(connector) &&
+ connector->panel.backlight.edp.intel_cap.supports_2084_decode;
+}
+
static void
intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *_connector)
{
@@ -6712,9 +6739,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *_connec
intel_attach_dp_colorspace_property(&connector->base);
}
- /* LSPCON attaches the property itself in intel_dp_connector_register() */
- if (!intel_bios_encoder_is_lspcon(dp_to_dig_port(intel_dp)->base.devdata) &&
- intel_dp_has_gamut_metadata_dip(&dp_to_dig_port(intel_dp)->base))
+ if (intel_dp_hdr_metadata_supported(intel_dp, connector))
drm_connector_attach_hdr_output_metadata_property(&connector->base);
if (HAS_VRR(display))
diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
index eb05ef4..8c7fd99 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
@@ -630,6 +630,11 @@ static const struct intel_panel_bl_funcs intel_dp_hdr_bl_funcs = {
.get = intel_dp_aux_hdr_get_backlight,
};
+bool intel_dp_aux_is_hdr_backlight(const struct intel_connector *connector)
+{
+ return connector->panel.backlight.funcs == &intel_dp_hdr_bl_funcs;
+}
+
static const struct intel_panel_bl_funcs intel_dp_vesa_bl_funcs = {
.setup = intel_dp_aux_vesa_setup_backlight,
.enable = intel_dp_aux_vesa_enable_backlight,
diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.h b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.h
index ed60c28..1fa1b93 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.h
+++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.h
@@ -6,8 +6,11 @@
#ifndef __INTEL_DP_AUX_BACKLIGHT_H__
#define __INTEL_DP_AUX_BACKLIGHT_H__
+#include <linux/types.h>
+
struct intel_connector;
int intel_dp_aux_init_backlight_funcs(struct intel_connector *intel_connector);
+bool intel_dp_aux_is_hdr_backlight(const struct intel_connector *connector);
#endif /* __INTEL_DP_AUX_BACKLIGHT_H__ */
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH v3 2/4] drm/i915/dp: Attach HDR_OUTPUT_METADATA on eDP with TCON HDR support
2026-11-21 0:54 ` [PATCH v3 2/4] drm/i915/dp: Attach HDR_OUTPUT_METADATA on eDP with TCON HDR support Yitian Shao
@ 2026-11-21 1:20 ` Ville Syrjälä
0 siblings, 0 replies; 9+ messages in thread
From: Ville Syrjälä @ 2026-11-21 1:20 UTC (permalink / raw)
To: Yitian Shao
Cc: intel-gfx, dri-devel, jani.nikula, sebastian.wick, uma.shankar,
suraj.kandpal
On Sat, Nov 21, 2026 at 08:54:07AM +0800, Yitian Shao wrote:
> intel_dp_add_properties() attaches HDR_OUTPUT_METADATA only when the
> encoder can send a gamut metadata DIP, so pre-ICL eDP panels on port A
> never expose it even when their EDID advertises HDR.
>
> Those panels do not use a DIP at all: the metadata is programmed through
> the Intel AUX HDR interface, and the TCON capability is already known
> because intel_edp_backlight_setup() runs before intel_dp_add_properties().
>
> Factor the whole decision into intel_dp_hdr_metadata_supported() and let
> it accept eDP panels whose TCON advertises PQ (ST2084) decoding through
> the Intel AUX HDR backlight interface.
>
> Since no DIP is transmitted in that case, skip computing the infoframe
> when the encoder has no gamut metadata DIP, so that the computed state
> matches what is actually programmed.
>
> Signed-off-by: Yitian Shao <fighters390@qq.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 31 +++++++++++++++++--
> .../drm/i915/display/intel_dp_aux_backlight.c | 5 +++
> .../drm/i915/display/intel_dp_aux_backlight.h | 3 ++
> 3 files changed, 36 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 2736a78..eeead26 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -70,6 +70,7 @@
> #include "intel_display_types.h"
> #include "intel_dp.h"
> #include "intel_dp_aux.h"
> +#include "intel_dp_aux_backlight.h"
> #include "intel_dp_hdcp.h"
> #include "intel_dp_link_training.h"
> #include "intel_dp_mst.h"
> @@ -3085,9 +3086,17 @@ intel_dp_compute_hdr_metadata_infoframe_sdp(struct intel_dp *intel_dp,
> const struct drm_connector_state *conn_state)
> {
> struct intel_display *display = to_intel_display(intel_dp);
> + struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
> int ret;
> struct hdmi_drm_infoframe *drm_infoframe = &crtc_state->infoframes.drm.drm;
>
> + /*
> + * Without a gamut metadata DIP there is nothing to program here; on
> + * pre-ICL eDP the metadata goes through the AUX HDR interface instead.
> + */
> + if (!intel_dp_has_gamut_metadata_dip(encoder))
> + return;
> +
> if (!conn_state->hdr_output_metadata)
> return;
>
> @@ -6685,6 +6694,24 @@ intel_dp_has_gamut_metadata_dip(struct intel_encoder *encoder)
> return false;
> }
>
> +static bool intel_dp_hdr_metadata_supported(struct intel_dp *intel_dp,
> + struct intel_connector *connector)
> +{
> + struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
> +
> + /* LSPCON attaches the property itself in intel_dp_connector_register() */
> + if (intel_bios_encoder_is_lspcon(encoder->devdata))
> + return false;
> +
> + if (intel_dp_has_gamut_metadata_dip(encoder))
> + return true;
> +
> + /* Pre-ICL eDP programs the metadata via the AUX HDR interface */
> + return intel_dp_is_edp(intel_dp) &&
> + intel_dp_aux_is_hdr_backlight(connector) &&
> + connector->panel.backlight.edp.intel_cap.supports_2084_decode;
Had to double check that we init the backlight stuff before this,
and yes we do.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> +}
> +
> static void
> intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *_connector)
> {
> @@ -6712,9 +6739,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *_connec
> intel_attach_dp_colorspace_property(&connector->base);
> }
>
> - /* LSPCON attaches the property itself in intel_dp_connector_register() */
> - if (!intel_bios_encoder_is_lspcon(dp_to_dig_port(intel_dp)->base.devdata) &&
> - intel_dp_has_gamut_metadata_dip(&dp_to_dig_port(intel_dp)->base))
> + if (intel_dp_hdr_metadata_supported(intel_dp, connector))
> drm_connector_attach_hdr_output_metadata_property(&connector->base);
>
> if (HAS_VRR(display))
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> index eb05ef4..8c7fd99 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -630,6 +630,11 @@ static const struct intel_panel_bl_funcs intel_dp_hdr_bl_funcs = {
> .get = intel_dp_aux_hdr_get_backlight,
> };
>
> +bool intel_dp_aux_is_hdr_backlight(const struct intel_connector *connector)
> +{
> + return connector->panel.backlight.funcs == &intel_dp_hdr_bl_funcs;
> +}
> +
> static const struct intel_panel_bl_funcs intel_dp_vesa_bl_funcs = {
> .setup = intel_dp_aux_vesa_setup_backlight,
> .enable = intel_dp_aux_vesa_enable_backlight,
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.h b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.h
> index ed60c28..1fa1b93 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.h
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.h
> @@ -6,8 +6,11 @@
> #ifndef __INTEL_DP_AUX_BACKLIGHT_H__
> #define __INTEL_DP_AUX_BACKLIGHT_H__
>
> +#include <linux/types.h>
> +
> struct intel_connector;
>
> int intel_dp_aux_init_backlight_funcs(struct intel_connector *intel_connector);
> +bool intel_dp_aux_is_hdr_backlight(const struct intel_connector *connector);
>
> #endif /* __INTEL_DP_AUX_BACKLIGHT_H__ */
> --
> 2.53.0
--
Ville Syrjälä
Intel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 3/4] drm/i915/display: Check gamut metadata DIP support in LSPCON HDR detection
[not found] <20261121005409.17626-1-fighters390@qq.com>
2026-11-21 0:54 ` [PATCH v3 1/4] drm/i915/dp: Drop LSPCON check from intel_dp_has_gamut_metadata_dip() Yitian Shao
2026-11-21 0:54 ` [PATCH v3 2/4] drm/i915/dp: Attach HDR_OUTPUT_METADATA on eDP with TCON HDR support Yitian Shao
@ 2026-11-21 0:54 ` Yitian Shao
2026-11-21 1:21 ` Ville Syrjälä
2026-11-21 0:54 ` [PATCH v3 4/4] drm/i915/dp: Prefer SDP over DPCD for HDR content luminance Yitian Shao
2026-11-21 1:17 ` [PATCH v3 0/4] drm/i915/dp: Attach HDR_OUTPUT_METADATA on eDP Yitian Shao
4 siblings, 1 reply; 9+ messages in thread
From: Yitian Shao @ 2026-11-21 0:54 UTC (permalink / raw)
To: intel-gfx
Cc: dri-devel, ville.syrjala, jani.nikula, sebastian.wick,
uma.shankar, suraj.kandpal
intel_lspcon_detect_hdr_capability() asks the LSPCON whether it can do HDR,
but not whether the port can actually transmit the gamut metadata DIP. If
an LSPCON is hooked up to a port without that capability we would advertise
HDR support that cannot be delivered.
Refuse to claim HDR support in that case.
Signed-off-by: Yitian Shao <fighters390@qq.com>
---
drivers/gpu/drm/i915/display/intel_lspcon.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c
index 9ceabbc..797137d 100644
--- a/drivers/gpu/drm/i915/display/intel_lspcon.c
+++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
@@ -137,6 +137,11 @@ bool intel_lspcon_detect_hdr_capability(struct intel_digital_port *dig_port)
u8 hdr_caps;
int ret;
+ if (!intel_dp_has_gamut_metadata_dip(&dig_port->base)) {
+ lspcon->hdr_supported = false;
+ return false;
+ }
+
ret = drm_dp_dpcd_read(&intel_dp->aux, get_hdr_status_reg(lspcon),
&hdr_caps, 1);
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH v3 3/4] drm/i915/display: Check gamut metadata DIP support in LSPCON HDR detection
2026-11-21 0:54 ` [PATCH v3 3/4] drm/i915/display: Check gamut metadata DIP support in LSPCON HDR detection Yitian Shao
@ 2026-11-21 1:21 ` Ville Syrjälä
0 siblings, 0 replies; 9+ messages in thread
From: Ville Syrjälä @ 2026-11-21 1:21 UTC (permalink / raw)
To: Yitian Shao
Cc: intel-gfx, dri-devel, jani.nikula, sebastian.wick, uma.shankar,
suraj.kandpal
On Sat, Nov 21, 2026 at 08:54:08AM +0800, Yitian Shao wrote:
> intel_lspcon_detect_hdr_capability() asks the LSPCON whether it can do HDR,
> but not whether the port can actually transmit the gamut metadata DIP. If
> an LSPCON is hooked up to a port without that capability we would advertise
> HDR support that cannot be delivered.
>
> Refuse to claim HDR support in that case.
>
> Signed-off-by: Yitian Shao <fighters390@qq.com>
> ---
> drivers/gpu/drm/i915/display/intel_lspcon.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c
> index 9ceabbc..797137d 100644
> --- a/drivers/gpu/drm/i915/display/intel_lspcon.c
> +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
> @@ -137,6 +137,11 @@ bool intel_lspcon_detect_hdr_capability(struct intel_digital_port *dig_port)
> u8 hdr_caps;
> int ret;
>
> + if (!intel_dp_has_gamut_metadata_dip(&dig_port->base)) {
> + lspcon->hdr_supported = false;
Maybe a bit redundant, but the other code paths also do this so
I think we do want the redundancy in the name of consistency.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> + return false;
> + }
> +
> ret = drm_dp_dpcd_read(&intel_dp->aux, get_hdr_status_reg(lspcon),
> &hdr_caps, 1);
>
> --
> 2.53.0
--
Ville Syrjälä
Intel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 4/4] drm/i915/dp: Prefer SDP over DPCD for HDR content luminance
[not found] <20261121005409.17626-1-fighters390@qq.com>
` (2 preceding siblings ...)
2026-11-21 0:54 ` [PATCH v3 3/4] drm/i915/display: Check gamut metadata DIP support in LSPCON HDR detection Yitian Shao
@ 2026-11-21 0:54 ` Yitian Shao
2026-11-21 1:28 ` Ville Syrjälä
2026-11-21 1:17 ` [PATCH v3 0/4] drm/i915/dp: Attach HDR_OUTPUT_METADATA on eDP Yitian Shao
4 siblings, 1 reply; 9+ messages in thread
From: Yitian Shao @ 2026-11-21 0:54 UTC (permalink / raw)
To: intel-gfx
Cc: dri-devel, ville.syrjala, jani.nikula, sebastian.wick,
uma.shankar, suraj.kandpal
intel_dp_aux_write_content_luminance() skips the DPCD write when the
encoder cannot send a gamut metadata SDP. That is backwards: the DPCD
register is exactly what the AUX HDR interface uses on those platforms,
while the SDP takes precedence where it is available.
Invert the check.
Signed-off-by: Yitian Shao <fighters390@qq.com>
---
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
index 8c7fd99..92516f3 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
@@ -250,7 +250,11 @@ intel_dp_aux_write_content_luminance(struct intel_connector *connector,
int ret;
u8 buf[4];
- if (!intel_dp_has_gamut_metadata_dip(connector->encoder))
+ /*
+ * When the metadata is sent as a gamut metadata SDP it takes
+ * precedence over the DPCD based content luminance.
+ */
+ if (intel_dp_has_gamut_metadata_dip(connector->encoder))
return;
buf[0] = hdr_metadata->hdmi_metadata_type1.max_cll & 0xFF;
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH v3 4/4] drm/i915/dp: Prefer SDP over DPCD for HDR content luminance
2026-11-21 0:54 ` [PATCH v3 4/4] drm/i915/dp: Prefer SDP over DPCD for HDR content luminance Yitian Shao
@ 2026-11-21 1:28 ` Ville Syrjälä
0 siblings, 0 replies; 9+ messages in thread
From: Ville Syrjälä @ 2026-11-21 1:28 UTC (permalink / raw)
To: Yitian Shao
Cc: intel-gfx, dri-devel, jani.nikula, sebastian.wick, uma.shankar,
suraj.kandpal
On Sat, Nov 21, 2026 at 08:54:09AM +0800, Yitian Shao wrote:
> intel_dp_aux_write_content_luminance() skips the DPCD write when the
> encoder cannot send a gamut metadata SDP. That is backwards: the DPCD
> register is exactly what the AUX HDR interface uses on those platforms,
> while the SDP takes precedence where it is available.
>
> Invert the check.
>
> Signed-off-by: Yitian Shao <fighters390@qq.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> index 8c7fd99..92516f3 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -250,7 +250,11 @@ intel_dp_aux_write_content_luminance(struct intel_connector *connector,
> int ret;
> u8 buf[4];
>
> - if (!intel_dp_has_gamut_metadata_dip(connector->encoder))
> + /*
> + * When the metadata is sent as a gamut metadata SDP it takes
> + * precedence over the DPCD based content luminance.
> + */
> + if (intel_dp_has_gamut_metadata_dip(connector->encoder))
If we want to check something here then I think it would have to be the
same 'supports_sdp_colorimetry && intel_dp_has_gamut_metadata_dip()'
check we do when setting the INTEL_EDP_HDR_TCON_SDP_OVERRIDE_AUX bit.
That is the bit that tells the tcon which source of information
to use.
The other option is to check nothing and always write the value.
INTEL_EDP_HDR_TCON_SDP_OVERRIDE_AUX will then make the tcon ignore
the written value if it supports the SDP override.
> return;
>
> buf[0] = hdr_metadata->hdmi_metadata_type1.max_cll & 0xFF;
> --
> 2.53.0
--
Ville Syrjälä
Intel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 0/4] drm/i915/dp: Attach HDR_OUTPUT_METADATA on eDP
[not found] <20261121005409.17626-1-fighters390@qq.com>
` (3 preceding siblings ...)
2026-11-21 0:54 ` [PATCH v3 4/4] drm/i915/dp: Prefer SDP over DPCD for HDR content luminance Yitian Shao
@ 2026-11-21 1:17 ` Yitian Shao
4 siblings, 0 replies; 9+ messages in thread
From: Yitian Shao @ 2026-11-21 1:17 UTC (permalink / raw)
To: intel-gfx
Cc: dri-devel, ville.syrjala, jani.nikula, sebastian.wick,
uma.shankar, suraj.kandpal
Runtime-tested v3 on the same CometLake-U machine (kernel 7.0.0-44):
- HDR_OUTPUT_METADATA is attached to eDP-1
- the DP Colorspace property switches to BT2020_RGB with eotf PQ
- a 4K HDR10 HEVC file plays with VA-API and the output stays in BT2020/PQ
for the whole playback
- no state checker warnings in dmesg
As before, Mutter sends all-zero mastering metadata, so the effect of
max_cll/max_fall reaching the TCON cannot be observed visually.
Thanks,
Yitian
^ permalink raw reply [flat|nested] 9+ messages in thread