summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@openbsd.org>2013-03-09 14:37:40 +0100
committerMark Kettenis <kettenis@openbsd.org>2013-03-09 14:37:40 +0100
commite47714717b161538d838f82a8397812c328f6321 (patch)
tree56be2a0a66c08c0da9eb1f743489c013b2766d90 /sys
parent4be621b6c9556458a195a7ae0e2dd9b39beff441 (diff)
partly revert b1eebaa3c34e225793793b38f963d94c4e14f961 as it breaks
suspend/resume on my x220. See https://bugzilla.kernel.org/show_bug.cgi?id=47941
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/intel_panel.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/dev/pci/drm/intel_panel.c b/sys/dev/pci/drm/intel_panel.c
index 3f42ff93389..b5443cf5d6b 100644
--- a/sys/dev/pci/drm/intel_panel.c
+++ b/sys/dev/pci/drm/intel_panel.c
@@ -344,9 +344,6 @@ intel_panel_enable_backlight(struct drm_device *dev,
if (dev_priv->backlight_level == 0)
dev_priv->backlight_level = intel_panel_get_max_backlight(dev);
- dev_priv->backlight_enabled = true;
- intel_panel_actually_set_backlight(dev, dev_priv->backlight_level);
-
if (INTEL_INFO(dev)->gen >= 4) {
uint32_t reg, tmp;
@@ -382,12 +379,12 @@ intel_panel_enable_backlight(struct drm_device *dev,
}
set_level:
- /* Check the current backlight level and try to set again if it's zero.
- * On some machines, BLC_PWM_CPU_CTL is cleared to zero automatically
- * when BLC_PWM_CPU_CTL2 and BLC_PWM_PCH_CTL1 are written.
+ /* Call below after setting BLC_PWM_CPU_CTL2 and BLC_PWM_PCH_CTL1.
+ * BLC_PWM_CPU_CTL may be cleared to zero automatically when these
+ * registers are set.
*/
- if (!intel_panel_get_backlight(dev))
- intel_panel_actually_set_backlight(dev, dev_priv->backlight_level);
+ dev_priv->backlight_enabled = true;
+ intel_panel_actually_set_backlight(dev, dev_priv->backlight_level);
}
void