<p>Alexander Couzens has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/28345">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">drivers/intel/gma: store uint8_t brightness values in mailbox3<br><br>The _BCM function requires a percentage value. While the<br>brightness in mailbox3 requires a value in uint8_t. Meaning 255 = 100%.<br>Previous implementation stored the percentage brightness value resulting<br>in limiting the brightness to ~40% of it's maximum power.<br><br>Only affects brightness control using mailbox3.<br><br>Fixes: 6838aaebf9ec ("drvs/intel/gma/acpi: Add methods to use MBOX3")<br>Change-Id: I290b5f5b2a8ee406e39e86d3e0de9997798d890d<br>Signed-off-by: Alexander Couzens <lynxis@fe80.eu><br>---<br>M src/drivers/intel/gma/acpi/configure_brightness_levels.asl<br>1 file changed, 8 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/28345/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl</span><br><span>index 8625f04..0867c5a 100644</span><br><span>--- a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl</span><br><span>+++ b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl</span><br><span>@@ -69,7 +69,14 @@</span><br><span>                             Return (Ones)</span><br><span>                        }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-                   Store (Or (Arg0, 0x80000000), BCLP)</span><br><span style="color: hsl(120, 100%, 40%);">+                   /* BCLP requires brightness unsigned 8bit. 255 = 100 % */</span><br><span style="color: hsl(120, 100%, 40%);">+                     Store (Divide (Multiply (Arg0, 255), 100), Local1)</span><br><span style="color: hsl(120, 100%, 40%);">+                    If (LGreater(Local1, 255)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                          Store (255, Local1)</span><br><span style="color: hsl(120, 100%, 40%);">+                   }</span><br><span style="color: hsl(120, 100%, 40%);">+                     /* set valid bit */</span><br><span style="color: hsl(120, 100%, 40%);">+                   Store (Or (Local1, 0x80000000), BCLP)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>                      /* Request back-light change */</span><br><span>                      Store (0x2, ASLC)</span><br><span>                    /* Trigger IRQ */</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/28345">change 28345</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/28345"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I290b5f5b2a8ee406e39e86d3e0de9997798d890d </div>
<div style="display:none"> Gerrit-Change-Number: 28345 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Couzens <lynxis@fe80.eu> </div>