<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - Screen sometimes jumps to full brightness on resume from suspend"
href="https://bugs.freedesktop.org/show_bug.cgi?id=108703#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - Screen sometimes jumps to full brightness on resume from suspend"
href="https://bugs.freedesktop.org/show_bug.cgi?id=108703">bug 108703</a>
from <span class="vcard"><a class="email" href="mailto:jani.nikula@intel.com" title="Jani Nikula <jani.nikula@intel.com>"> <span class="fn">Jani Nikula</span></a>
</span></b>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>