From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org
Subject: [Bug 31122] Cannot control backlight intensity on
Powerbook
Date: Tue, 09 Aug 2016 19:26:48 +0000
Message-ID:
References:
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0945904018=="
Return-path:
In-Reply-To:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: nouveau-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Sender: "Nouveau"
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
List-Id: nouveau.vger.kernel.org
--===============0945904018==
Content-Type: multipart/alternative; boundary="14707708084.8fF1b6c8e.12517";
charset="UTF-8"
--14707708084.8fF1b6c8e.12517
Date: Tue, 9 Aug 2016 19:26:48 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.freedesktop.org/
Auto-Submitted: auto-generated
https://bugs.freedesktop.org/show_bug.cgi?id=3D31122
--- Comment #17 from Karol Herbst ---
Comment on attachment 125642
--> https://bugs.freedesktop.org/attachment.cgi?id=3D125642
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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
::: nouveau_backlight.c.orig
@@ +46,5 @@
> +{
> + struct nouveau_drm *drm =3D bl_get_data(bd);
> + struct nvif_object *device =3D &drm->device.object;
> + int val =3D (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 =3D=3D 0)
> + level =3D 0x00;
> +
remove empty line here
@@ +69,5 @@
> + else
> + level =3D val + NV30_BL_MIN_LEVEL - 1;
> +
> + nvif_wr32(device, NV30_PMC_BACKLIGHT,
> + (level << 16) + 0x80000535); /* workaround for disable=
d 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 =3D BACKLIGHT_RAW;
> + props.max_brightness =3D NV30_BL_MAX_LEVEL - NV30_BL_MIN_LEVEL; =
/* includes an additional 0x00 level (backlight off) */
80 character limit
--=20
You are receiving this mail because:
You are the assignee for the bug.=
--14707708084.8fF1b6c8e.12517
Date: Tue, 9 Aug 2016 19:26:48 +0000
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.freedesktop.org/
Auto-Submitted: auto-generated
Commen=
t # 17
on bug 31122<=
/a>
from Karol Herbst
Comment on attac=
hment 125642 [details] [review]=
backlight control w/ gpio check
Review of attachment 125642=
a> [details] [review]:
-----------------------------------------------------------------
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@gmail.com
::: nouveau_backlight.c.orig
@@ +46,5 @@
> +{
> + struct nouveau_drm *drm =3D bl_get_data(bd);
> + struct nvif_object *device =3D &drm->device.object;
> + int val =3D (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 =3D=3D 0)
> + level =3D 0x00;
> +
remove empty line here
@@ +69,5 @@
> + else
> + level =3D val + NV30_BL_MIN_LEVEL - 1;
> +
> + nvif_wr32(device, NV30_PMC_BACKLIGHT,
> + (level << 16) + 0x80000535); /* workaround fo=
r 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 =3D BACKLIGHT_RAW;
> + props.max_brightness =3D NV30_BL_MAX_LEVEL - NV30_BL_MIN_LEVE=
L; /* includes an additional 0x00 level (backlight off) */
80 character limit
You are receiving this mail because:
- You are the assignee for the bug.
=
--14707708084.8fF1b6c8e.12517--
--===============0945904018==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTm91dmVhdSBt
YWlsaW5nIGxpc3QKTm91dmVhdUBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5m
cmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9ub3V2ZWF1Cg==
--===============0945904018==--