<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Cannot control backlight intensity on Powerbook"
href="https://bugs.freedesktop.org/show_bug.cgi?id=31122#c17">Comment # 17</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Cannot control backlight intensity on Powerbook"
href="https://bugs.freedesktop.org/show_bug.cgi?id=31122">bug 31122</a>
from <span class="vcard"><a class="email" href="mailto:karolherbst@gmail.com" title="Karol Herbst <karolherbst@gmail.com>"> <span class="fn">Karol Herbst</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=125642" name="attach_125642" title="backlight control w/ gpio check">attachment 125642</a> <a href="attachment.cgi?id=125642&action=edit" title="backlight control w/ gpio check">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=31122&attachment=125642'>[review]</a>
backlight control w/ gpio check
Review of <span class=""><a href="attachment.cgi?id=125642" name="attach_125642" title="backlight control w/ gpio check">attachment 125642</a> <a href="attachment.cgi?id=125642&action=edit" title="backlight control w/ gpio check">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=31122&attachment=125642'>[review]</a>:
-----------------------------------------------------------------
This looks much better already. There are still a few things:
the kernel uses tabs 8 character big. Don't use whitespaces. Other remaining
issues inlined.
With everything taking care off, you get my rb-by <a href="mailto:karolherbst@gmail.com">karolherbst@gmail.com</a>
::: nouveau_backlight.c.orig
@@ +46,5 @@
<span class="quote">> +{
> + struct nouveau_drm *drm = bl_get_data(bd);
> + struct nvif_object *device = &drm->device.object;
> + int val = (nvif_rd32(device, NV30_PMC_BACKLIGHT) &
> + NV30_PMC_BACKLIGHT_MASK) >> 16;</span >
indentation, either try to fit it in one line or break the nvif_rd32 command
like this:
nvif_rd32(arg1,
arg2);
@@ +64,5 @@
<span class="quote">> + int level;
> +
> + if (val == 0)
> + level = 0x00;
> +</span >
remove empty line here
@@ +69,5 @@
<span class="quote">> + else
> + level = val + NV30_BL_MIN_LEVEL - 1;
> +
> + nvif_wr32(device, NV30_PMC_BACKLIGHT,
> + (level << 16) + 0x80000535); /* workaround for disabled backlight after waking from suspend */</span >
indentation same as above. Also beware the 80 character limit.
@@ +101,5 @@
<span class="quote">> + return 0;
> +
> + memset(&props, 0, sizeof(struct backlight_properties));
> + props.type = BACKLIGHT_RAW;
> + props.max_brightness = NV30_BL_MAX_LEVEL - NV30_BL_MIN_LEVEL; /* includes an additional 0x00 level (backlight off) */</span >
80 character limit</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>