]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
UBUNTU: SAUCE: drm/i915: Fix DPCD register order in intel_dp_aux_enable_backlight()
authorLyude Paul <lyude@redhat.com>
Thu, 12 Dec 2019 09:07:41 +0000 (17:07 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 16 Dec 2019 19:33:31 +0000 (13:33 -0600)
commit61e84cc9183ad0a0297d94d0a37c01b890d826b0
tree4a35b13f4cd8ec30e22d2a601c555d9cdf68560c
parent8f033dac37659e31689a6b4938b7caab9dc56be8
UBUNTU: SAUCE: drm/i915: Fix DPCD register order in intel_dp_aux_enable_backlight()

BugLink: https://bugs.launchpad.net/bugs/1856134
For eDP panels, it appears it's expected that so long as the panel is in
DPCD control mode that the brightness value is never set to 0. Instead,
if the desired effect is to set the panel's backlight to 0 we're
expected to simply turn off the backlight through the
DP_EDP_DISPLAY_CONTROL_REGISTER.

We already do the latter correctly in intel_dp_aux_disable_backlight().
But, we make the mistake of writing the DPCD registers in the wrong
order when enabling the backlight in intel_dp_aux_enable_backlight()
since we currently enable the backlight through
DP_EDP_DISPLAY_CONTROL_REGISTER before writing the brightness level. On
the X1 Extreme 2nd Generation, this appears to have the potential of
confusing the panel in such a way that further attempts to set the
brightness don't actually change the backlight as expected and leave it
off. Presumably, this happens because the incorrect register writing
order briefly leaves the panel with DPCD mode enabled and a 0 brightness
level set.

So, reverse the order we write the DPCD registers when enabling the
panel backlight so that we write the brightness value first, and enable
the backlight second. This fix appears to be the final bit needed to get
the backlight on the ThinkPad X1 Extreme 2nd Generation's AMOLED screen
working.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
(backported from https://patchwork.freedesktop.org/patch/342164/?series=69914&rev=4)
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c