* [Nouveau] [PATCH 01/31] gpu: nouveau: nouveau_led: changing LED_FULL to actual value
[not found] <20220121165436.30956-1-sampaio.ime@gmail.com>
@ 2022-01-21 16:54 ` Luiz Sampaio
2022-01-22 13:33 ` Fabio Estevam
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Sampaio @ 2022-01-21 16:54 UTC (permalink / raw)
To: Ben Skeggs, Karol Herbst, Lyude Paul, David Airlie, Daniel Vetter
Cc: nouveau, linux-kernel, dri-devel, Luiz Sampaio
The enum led_brightness, which contains the declaration of LED_OFF,
LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports
max_brightness.
---
drivers/gpu/drm/nouveau/nouveau_led.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_led.c b/drivers/gpu/drm/nouveau/nouveau_led.c
index 2c5e0628da12..df4a734510e1 100644
--- a/drivers/gpu/drm/nouveau/nouveau_led.c
+++ b/drivers/gpu/drm/nouveau/nouveau_led.c
@@ -45,7 +45,7 @@ nouveau_led_get_brightness(struct led_classdev *led)
duty = nvif_rd32(device, 0x61c884) & 0x00ffffff;
if (div > 0)
- return duty * LED_FULL / div;
+ return duty * 255 / div;
else
return 0;
}
@@ -62,7 +62,7 @@ nouveau_led_set_brightness(struct led_classdev *led, enum led_brightness value)
u32 div, duty;
div = input_clk / freq;
- duty = value * div / LED_FULL;
+ duty = value * div / 255;
/* for now, this is safe to directly poke those registers because:
* - A: nvidia never puts the logo led to any other PWM controler
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Nouveau] [PATCH 01/31] gpu: nouveau: nouveau_led: changing LED_FULL to actual value
2022-01-21 16:54 ` [Nouveau] [PATCH 01/31] gpu: nouveau: nouveau_led: changing LED_FULL to actual value Luiz Sampaio
@ 2022-01-22 13:33 ` Fabio Estevam
0 siblings, 0 replies; 2+ messages in thread
From: Fabio Estevam @ 2022-01-22 13:33 UTC (permalink / raw)
To: Luiz Sampaio
Cc: David Airlie, nouveau, linux-kernel, DRI mailing list,
Ben Skeggs, Daniel Vetter
Hi Luiz,
On Sat, Jan 22, 2022 at 7:44 AM Luiz Sampaio <sampaio.ime@gmail.com> wrote:
>
> The enum led_brightness, which contains the declaration of LED_OFF,
> LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports
> max_brightness.
Your Signed-off-by tag is missing.
Please run ./scripts/checkpatch.pl on your patch and it helps detect
this kind of issue.
Regards,
Fabio Estevam
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-23 0:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20220121165436.30956-1-sampaio.ime@gmail.com>
2022-01-21 16:54 ` [Nouveau] [PATCH 01/31] gpu: nouveau: nouveau_led: changing LED_FULL to actual value Luiz Sampaio
2022-01-22 13:33 ` Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).