[Bug 108703] Screen sometimes jumps to full brightness on resume from suspend
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Nov 14 14:08:20 UTC 2018
https://bugs.freedesktop.org/show_bug.cgi?id=108703
--- Comment #7 from Jani Nikula <jani.nikula at intel.com> ---
I really can't think of any reason why this behaviour would have changed for
you because of a kernel change. For 10 years now, since the introduction of
i915 KMS support, we've had code in place to set the backlight to max if it's
at 0 on panel enable. (In retrospect, that was not such a good policy decision,
but I fear it's pretty much carved in stone now. Hindsight 20/20.)
I suspect something changed in your userspace so that it now sets brightness to
0 rather than some non-zero low value. That something would typically truncate
the 4438 levels provided by intel_backlight to a handful of discrete levels.
The kernel change to nuke the policy would technically be as simple as
diff --git a/drivers/gpu/drm/i915/intel_panel.c
b/drivers/gpu/drm/i915/intel_panel.c
index b6df63aa11e3..beb4801702d3 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -1104,8 +1104,8 @@ void intel_panel_enable_backlight(const struct
intel_crtc_state *crtc_state,
WARN_ON(panel->backlight.max == 0);
- if (panel->backlight.level <= panel->backlight.min) {
- panel->backlight.level = panel->backlight.max;
+ if (panel->backlight.level < panel->backlight.min) {
+ panel->backlight.level = panel->backlight.min;
if (panel->backlight.device)
panel->backlight.device->props.brightness =
scale_hw_to_user(connector,
but if there's any userspace around that relies on the behaviour, we'd have to
revert back.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20181114/83e4e4f3/attachment.html>
More information about the intel-gfx-bugs
mailing list