All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: A better maximum brightness for users.
@ 2015-11-09  6:42 Shih-Yuan Lee (FourDollars)
  2015-11-09 10:17 ` Jani Nikula
                   ` (5 more replies)
  0 siblings, 6 replies; 34+ messages in thread
From: Shih-Yuan Lee (FourDollars) @ 2015-11-09  6:42 UTC (permalink / raw)
  To: intel-gfx

The PWM brightness level of Dell XPS 13 (2015) is from 10 to 937 however
the sysfs brightness level always starts from 0 so it is better to use
927 as the sysfs maximum brightness level and it becomes easier to map
from the PWM brightness level to the sysfs brightness level.

Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee@canonical.com>
---
 drivers/gpu/drm/i915/intel_panel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index a24df35..697fd4d 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -1211,7 +1211,7 @@ static int intel_backlight_device_register(struct intel_connector *connector)
 	 * Note: Everything should work even if the backlight device max
 	 * presented to the userspace is arbitrarily chosen.
 	 */
-	props.max_brightness = panel->backlight.max;
+	props.max_brightness = panel->backlight.max - panel->backlight.min;
 	props.brightness = scale_hw_to_user(connector,
 					    panel->backlight.level,
 					    props.max_brightness);
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2015-11-18  9:12 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-09  6:42 [PATCH] drm/i915: A better maximum brightness for users Shih-Yuan Lee (FourDollars)
2015-11-09 10:17 ` Jani Nikula
2015-11-09 10:30   ` Shih-Yuan Lee (FourDollars)
2015-11-09 10:51     ` Jani Nikula
2015-11-09 11:54       ` Shih-Yuan Lee (FourDollars)
2015-11-09 12:58         ` Jani Nikula
2015-11-09 14:02           ` Shih-Yuan Lee (FourDollars)
2015-11-09 15:25             ` Ville Syrjälä
2015-11-09 16:02   ` Paulo Zanoni
2015-11-09 16:57     ` Jani Nikula
2015-11-10  1:59       ` Shih-Yuan Lee (FourDollars)
2015-11-10  8:01 ` [PATCH v2] drm/i915: Respect the brightness range from VBT Shih-Yuan Lee (FourDollars)
2015-11-10 10:15   ` Jani Nikula
2015-11-10 11:26     ` Shih-Yuan Lee (FourDollars)
2015-11-10 12:57       ` Jani Nikula
2015-11-10 16:11         ` Shih-Yuan Lee (FourDollars)
2015-11-11  4:11   ` [PATCH v3] drm/i915: Set brightness maximum to a fixed value 100 Shih-Yuan Lee (FourDollars)
2015-11-11  4:57     ` kbuild test robot
2015-11-11  7:31 ` [PATCH v4] " Shih-Yuan Lee (FourDollars)
2015-11-11 12:05   ` Jani Nikula
2015-11-11 13:09     ` Shih-Yuan Lee (FourDollars)
2015-11-11 14:10 ` [PATCH v5] drm/i915: Set backlight class max to 100 and respect the VBT minimum again Shih-Yuan Lee (FourDollars)
2015-11-12  5:43 ` [PATCH v6] drm/i915: respect the VBT minimum backlight brightness again Shih-Yuan Lee (FourDollars)
2015-11-12  8:08   ` Stéphane ANCELOT
2015-11-12  8:28     ` Shih-Yuan Lee (FourDollars)
2015-11-12  8:40       ` Stéphane ANCELOT
2015-11-12  8:57         ` Shih-Yuan Lee (FourDollars)
2015-11-12  9:05           ` Stéphane ANCELOT
2015-11-12 10:01             ` Shih-Yuan Lee (FourDollars)
2015-11-18  9:06               ` Stéphane ANCELOT
2015-11-18  9:11                 ` Shih-Yuan Lee (FourDollars)
2015-11-12 13:44     ` Jani Nikula
2015-11-13  3:50 ` [PATCH v7] drm/i915: A better backlight class brightness range Shih-Yuan Lee (FourDollars)
2015-11-13  3:50   ` Shih-Yuan Lee (FourDollars)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.