drm/i915/backlight: Restore backlight on resume, v3.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 8 Jan 2019 16:08:38 +0000 (17:08 +0100)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thu, 24 Jan 2019 12:02:08 +0000 (13:02 +0100)
commit63a23d245b2cb094be99d274204e458eb2810410
treec7ec0add6f5e5a95d756f15db87637e55d72b8f8
parentf6626e1d96ed33f16d5a8ca5df4bbc2b374738ee
drm/i915/backlight: Restore backlight on resume, v3.

Restore our saved values for backlight. This way even with fastset on
S4 resume we will correctly restore the backlight to the active values.

Changes since v1:
- Call enable_backlight() when backlight.level is set. On suspend
  backlight.enabled is always cleared, this makes it not a good
  indicator. Also check for crtc->state->active.
Changes since v2:
- Use the new update_pipe() callback to run this on resume as well.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Tolga Cakir <cevelnet@gmail.com>
Cc: Basil Eric Rabi <ericbasil.rabi@gmail.com>
Cc: Hans de Goede <jwrdegoede@fedoraproject.org>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190108160842.13396-1-maarten.lankhorst@linux.intel.com
drivers/gpu/drm/i915/icl_dsi.c
drivers/gpu/drm/i915/intel_ddi.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_lvds.c
drivers/gpu/drm/i915/intel_panel.c
drivers/gpu/drm/i915/vlv_dsi.c