From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Vidya Srinivas <vidya.srinivas@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
uma.shankar@intel.com
Subject: Re: [PATCH] drm/i915/dp: Extend HDR mode to HLG
Date: Tue, 17 Nov 2026 14:56:52 +0200 [thread overview]
Message-ID: <avxPFH45alKwZBxj@intel.com> (raw)
In-Reply-To: <20261117104808.2023577-1-vidya.srinivas@intel.com>
On Tue, Nov 17, 2026 at 04:18:07PM +0530, Vidya Srinivas wrote:
> intel_dp_in_hdr_mode() only recognizes the SMPTE ST 2084 (PQ) EOTF.
> Extend it to treat BT.2100 HLG as HDR.
>
> The eDP HDR backlight interface in intel_dp_aux_backlight.c
> uses the same check, and its TCON can only decode ST 2084
> set INTEL_EDP_HDR_TCON_2084_DECODE_ENABLE only for a PQ
> output and clear it otherwise, so that the panel doesn't decode HLG
> signal as PQ.
I can't parse that.
>
> Suggested-by: Uma Shankar <uma.shankar@intel.com>
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 5 ++++-
> drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 10 +++++++++-
> 2 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index ef164a797618..adaa8fb25732 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3388,17 +3388,20 @@ static void intel_dp_compute_vsc_sdp(struct intel_dp *intel_dp,
> }
> }
>
> +/* True for both HDR transfer functions, SMPTE ST 2084 (PQ) and BT.2100 HLG. */
> bool
> intel_dp_in_hdr_mode(const struct drm_connector_state *conn_state)
> {
> struct hdr_output_metadata *hdr_metadata;
> + u8 eotf;
>
> if (!conn_state->hdr_output_metadata)
> return false;
>
> hdr_metadata = conn_state->hdr_output_metadata->data;
> + eotf = hdr_metadata->hdmi_metadata_type1.eotf;
>
> - return hdr_metadata->hdmi_metadata_type1.eotf == HDMI_EOTF_SMPTE_ST2084;
> + return eotf == HDMI_EOTF_SMPTE_ST2084 || eotf == HDMI_EOTF_BT_2100_HLG;
> }
>
> static void
> 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 dc2f0f3088a9..fa68cc6803a6 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -284,8 +284,16 @@ intel_dp_aux_fill_hdr_tcon_params(const struct drm_connector_state *conn_state,
> * HDR mode.
> */
> if (intel_dp_in_hdr_mode(conn_state)) {
> + const struct hdr_output_metadata *hdr_metadata =
> + conn_state->hdr_output_metadata->data;
> +
> *ctrl |= INTEL_EDP_HDR_TCON_SEGMENTED_BACKLIGHT_ENABLE;
> - *ctrl |= INTEL_EDP_HDR_TCON_2084_DECODE_ENABLE;
> +
> + /* The TCON can only decode SMPTE ST 2084 (PQ), not HLG. */
> + if (hdr_metadata->hdmi_metadata_type1.eotf == HDMI_EOTF_SMPTE_ST2084)
> + *ctrl |= INTEL_EDP_HDR_TCON_2084_DECODE_ENABLE;
> + else
> + *ctrl &= ~INTEL_EDP_HDR_TCON_2084_DECODE_ENABLE;
If the TCON doesn't know it's HLG and not regular SDR content aren't we
getting bad results? I suppose it's less wrong than when claiming that
it's PQ though.
Are there actual systems where we still need to use this custom DPCD
interface *and* the display claims HLG support? Or is this a "user
uses HLG anyway even though the panel can't handle it" situation?
> }
>
> if (DISPLAY_VER(display) < 11)
> --
> 2.45.2
--
Ville Syrjälä
Intel
prev parent reply other threads:[~2026-11-17 12:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 10:48 [PATCH] drm/i915/dp: Extend HDR mode to HLG Vidya Srinivas
2026-11-17 11:07 ` ✓ CI.KUnit: success for " Patchwork
2026-11-17 11:29 ` [PATCH] " sashiko-bot
2026-11-17 11:39 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-11-17 12:56 ` Ville Syrjälä [this message]
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=avxPFH45alKwZBxj@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=uma.shankar@intel.com \
--cc=vidya.srinivas@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox