[Nouveau] [Bug 31122] Cannot control backlight intensity on Powerbook
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Aug 9 19:26:48 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=31122
--- Comment #17 from Karol Herbst <karolherbst at gmail.com> ---
Comment on attachment 125642
--> https://bugs.freedesktop.org/attachment.cgi?id=125642
backlight control w/ gpio check
Review of attachment 125642:
-----------------------------------------------------------------
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 karolherbst at gmail.com
::: nouveau_backlight.c.orig
@@ +46,5 @@
> +{
> + 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;
indentation, either try to fit it in one line or break the nvif_rd32 command
like this:
nvif_rd32(arg1,
arg2);
@@ +64,5 @@
> + int level;
> +
> + if (val == 0)
> + level = 0x00;
> +
remove empty line here
@@ +69,5 @@
> + 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 */
indentation same as above. Also beware the 80 character limit.
@@ +101,5 @@
> + 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) */
80 character limit
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20160809/289f5a79/attachment.html>
More information about the Nouveau
mailing list