drm/i915: Add support for panels with VESA backlights with PWM enable/disable
authorLyude Paul <lyude@redhat.com>
Fri, 5 Nov 2021 18:33:38 +0000 (14:33 -0400)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 29 Nov 2021 20:55:40 +0000 (15:55 -0500)
commit61e29a0956bdb09eac8aca7d9add9f902baff08b
tree5e24cc0e92a47f91ea9d5c1c66ff570f3096a7d9
parentd58071a8a76d779eedab38033ae4c821c30295a5
drm/i915: Add support for panels with VESA backlights with PWM enable/disable

This simply adds proper support for panel backlights that can be controlled
via VESA's backlight control protocol, but which also require that we
enable and disable the backlight via PWM instead of via the DPCD interface.
We also enable this by default, in order to fix some people's backlights
that were broken by not having this enabled.

For reference, backlights that require this and use VESA's backlight
interface tend to be laptops with hybrid GPUs, but this very well may
change in the future.

v4:
* Make sure that we call intel_backlight_level_to_pwm() in
  intel_dp_aux_vesa_enable_backlight() - vsyrjala

Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://gitlab.freedesktop.org/drm/intel/-/issues/3680
Fixes: fe7d52bccab6 ("drm/i915/dp: Don't use DPCD backlights that need PWM enable/disable")
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: <stable@vger.kernel.org> # v5.12+
Link: https://patchwork.freedesktop.org/patch/msgid/20211105183342.130810-2-lyude@redhat.com
(cherry picked from commit 04f0d6cc62cc1eaf9242c081520c024a17ba86a3)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c