drm/i915: Check EDID for HDR static metadata when choosing blc
authorJouni Högander <jouni.hogander@intel.com>
Wed, 13 Apr 2022 08:28:26 +0000 (11:28 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 21 Apr 2022 13:57:01 +0000 (16:57 +0300)
commitb4b157577cb1de13bee8bebc3576f1de6799a921
tree73a0f5220963300de879f398ed2be6f872bf819d
parentf5b2cd89d539aa8e16e620eb2d52c905461776bd
drm/i915: Check EDID for HDR static metadata when choosing blc

We have now seen panel (XMG Core 15 e21 laptop) advertizing 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
Intel proprietary eDP backlight control is used only if that exists.
Missing HDR static metadata is ignored if user specifically asks for
Intel proprietary eDP backlight control via enable_dpcd_backlight
parameter.

v2 :
- Ignore missing HDR static metadata if Intel proprietary eDP
  backlight control is forced via i915.enable_dpcd_backlight
- Printout info message if panel is missing HDR static metadata and
  support for Intel proprietary eDP backlight control is detected

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>
Cc: Filippo Falezza <filippo.falezza@outlook.it>
Cc: stable@vger.kernel.org
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220413082826.120634-1-jouni.hogander@intel.com
Reviewed-by: Lyude Paul <lyude@redhat.com>
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c