From: Jani Nikula <jani.nikula@intel.com>
To: "Jouni Högander" <jouni.hogander@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: Filippo Falezza <filippo.falezza@outlook.it>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Check EDID before dpcd for possible HDR aux bl support
Date: Tue, 12 Apr 2022 10:00:54 +0300 [thread overview]
Message-ID: <87wnfuhjkp.fsf@intel.com> (raw)
In-Reply-To: <20220412052542.681419-1-jouni.hogander@intel.com>
On Tue, 12 Apr 2022, Jouni Högander <jouni.hogander@intel.com> wrote:
> We have now seen panel (XMG Core 15 e21 laptop) avertizing support
> for Intel proprietary eDP backlight control via DPCD registers, but
> actually working only with legacy pwm control.
>
> This patch adds panel EDID check for possible HDR static metadata and
> does detection from DPCD registers only if this data block exists.
>
> Fixes: 4a8d79901d5b ("drm/i915/dp: Enable Intel's HDR backlight interface (only SDR for now)")
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5284
> Cc: Lyude Paul <lyude@redhat.com>
> Cc: Mika Kahola <mika.kahola@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Tested-by: Filippo Falezza <filippo.falezza@outlook.it>
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> ---
> .../gpu/drm/i915/display/intel_dp_aux_backlight.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> 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 97cf3cac0105..f69e185b58c1 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -108,6 +108,19 @@ intel_dp_aux_supports_hdr_backlight(struct intel_connector *connector)
> int ret;
> u8 tcon_cap[4];
>
> + /*
> + * If we don't have HDR static metadata there is no way to
> + * runtime detect used range for nits based control. For now
> + * do not use Intel proprietary eDP backlight control if we
> + * don't have this data in panel EDID. In case we find panel
> + * which supports only nits based control, but doesn't provide
> + * HDR static metadata we need to start maintaining table of
> + * ranges for such panels.
> + */
> + if (!(connector->base.hdr_sink_metadata.hdmi_type1.metadata_type &
> + BIT(HDMI_STATIC_METADATA_TYPE1)))
> + return false;
Considering the complexities around this, I'd probably start gathering
the info in variables, then debug log all of it, with the conclusion the
driver makes. It's makes future debugging much easier.
Other than that, I guess
Acked-by: Jani Nikula <jani.nikula@intel.com>
because I don't really know what's going on with these...
BR,
Jani.
> +
> intel_dp_wait_source_oui(intel_dp);
>
> ret = drm_dp_dpcd_read(aux, INTEL_EDP_HDR_TCON_CAP0, tcon_cap, sizeof(tcon_cap));
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2022-04-12 7:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-12 5:25 [Intel-gfx] [PATCH] drm/i915: Check EDID before dpcd for possible HDR aux bl support Jouni Högander
2022-04-12 7:00 ` Jani Nikula [this message]
2022-04-12 8:02 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2022-04-12 8:02 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-04-12 8:02 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2022-04-12 8:28 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-04-12 12:43 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Check EDID before dpcd for possible HDR aux bl support (rev2) Patchwork
2022-04-12 17:50 ` [Intel-gfx] [PATCH] drm/i915: Check EDID before dpcd for possible HDR aux bl support Lyude Paul
2022-04-13 8:31 ` Hogander, Jouni
2022-04-13 21:08 ` Lyude Paul
2022-04-14 11:22 ` Hogander, Jouni
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=87wnfuhjkp.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=filippo.falezza@outlook.it \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jouni.hogander@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