* Re: [Powertop] [PATCH] Fix screen DPMS support detection
@ 2012-08-13 16:52 Igor Zhbanov
0 siblings, 0 replies; 6+ messages in thread
From: Igor Zhbanov @ 2012-08-13 16:52 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]
Hi Arjan,
Please look at my next patch too. I try to get rid of things like:
-2147483648%, "Display backlight",
The problem is that on some architectures max_brightness is 0. And you
can find
division by zero and getting NaNs in backlight code. So I try to fix it
not to use incorrect
values when DPMS is disabled or backlight control is not supported.
Arjan van de Ven wrote:
> On 8/13/2012 9:41 AM, Igor Zhbanov wrote:
>> Consider DPMS disabled when we can't open /sys/class/drm/card0 directory.
> if you don't have a graphics card with proper driver...
> there's nothing we can do and pretending that DPMS is disabled sounds like a mostly bad idea
> on first sight
>
> what is behind the idea of assuming it disabled ???
>
>
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
>
--
Best regards,
Igor Zhbanov,
Expert Software Engineer,
phone: +7 (495) 797 25 00 ext 3806
e-mail: i.zhbanov(a)samsung.com
ASWG, Moscow R&D center, Samsung Electronics
12 Dvintsev street, building 1
127018, Moscow, Russian Federation
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Powertop] [PATCH] Fix screen DPMS support detection
@ 2012-08-14 15:34 Chris Ferron
0 siblings, 0 replies; 6+ messages in thread
From: Chris Ferron @ 2012-08-14 15:34 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]
On 08/13/2012 11:11 PM, Igor Zhbanov wrote:
> On my desktop PC running Ubuntu 11.10 with 3.0.0-24-generic-pae kernel
> I have /sys/class/backlight/eeepc-wmi symbolic link pointing to
> /sys/devices/platform/eeepc-wmi/backlight/eeepc-wmi
>
> My PC is non an EEEPC. Perhaps Linux kernel wrongly detects type of
> hardware,
> I don't know. I just have a PC with an LCD monitor.
>
> P.S.
> By the way, when I use the default mobile kernel without needed
> CONFIG_s I have
> several more division by zero since PowerTOP uses default value of 0
> to lot's of variables.
> But since that CONFIG_s are required to run PowerTOP I have not
> reported it.
Oh that's not good. If you share your notes on this, I would be happy to
find solutions for this. Division by zero is bad, even if its a config
issue.
Thanks for the info
Chris
>
> Arjan van de Ven wrote:
>> On 8/13/2012 9:52 AM, Igor Zhbanov wr
>>> The problem is that on some architectures max_brightness is 0.
>> oooof that's bad
>> yes we shouldn't do divide by zero
>>
>> but what kind of platform has a max brightness of 0 ?????
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Powertop] [PATCH] Fix screen DPMS support detection
@ 2012-08-14 6:11 Igor Zhbanov
0 siblings, 0 replies; 6+ messages in thread
From: Igor Zhbanov @ 2012-08-14 6:11 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]
On my desktop PC running Ubuntu 11.10 with 3.0.0-24-generic-pae kernel
I have /sys/class/backlight/eeepc-wmi symbolic link pointing to
/sys/devices/platform/eeepc-wmi/backlight/eeepc-wmi
My PC is non an EEEPC. Perhaps Linux kernel wrongly detects type of
hardware,
I don't know. I just have a PC with an LCD monitor.
P.S.
By the way, when I use the default mobile kernel without needed CONFIG_s
I have
several more division by zero since PowerTOP uses default value of 0 to
lot's of variables.
But since that CONFIG_s are required to run PowerTOP I have not reported it.
Arjan van de Ven wrote:
> On 8/13/2012 9:52 AM, Igor Zhbanov wr
>> The problem is that on some architectures max_brightness is 0.
> oooof that's bad
> yes we shouldn't do divide by zero
>
> but what kind of platform has a max brightness of 0 ?????
--
Best regards,
Igor Zhbanov,
Expert Software Engineer,
phone: +7 (495) 797 25 00 ext 3806
e-mail: i.zhbanov(a)samsung.com
ASWG, Moscow R&D center, Samsung Electronics
12 Dvintsev street, building 1
127018, Moscow, Russian Federation
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Powertop] [PATCH] Fix screen DPMS support detection
@ 2012-08-13 17:35 Arjan van de Ven
0 siblings, 0 replies; 6+ messages in thread
From: Arjan van de Ven @ 2012-08-13 17:35 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 227 bytes --]
On 8/13/2012 9:52 AM, Igor Zhbanov wr
> The problem is that on some architectures max_brightness is 0.
oooof that's bad
yes we shouldn't do divide by zero
but what kind of platform has a max brightness of 0 ?????
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Powertop] [PATCH] Fix screen DPMS support detection
@ 2012-08-13 16:43 Arjan van de Ven
0 siblings, 0 replies; 6+ messages in thread
From: Arjan van de Ven @ 2012-08-13 16:43 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 348 bytes --]
On 8/13/2012 9:41 AM, Igor Zhbanov wrote:
> Consider DPMS disabled when we can't open /sys/class/drm/card0 directory.
if you don't have a graphics card with proper driver...
there's nothing we can do and pretending that DPMS is disabled sounds like a mostly bad idea
on first sight
what is behind the idea of assuming it disabled ???
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Powertop] [PATCH] Fix screen DPMS support detection
@ 2012-08-13 16:41 Igor Zhbanov
0 siblings, 0 replies; 6+ messages in thread
From: Igor Zhbanov @ 2012-08-13 16:41 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 546 bytes --]
Consider DPMS disabled when we can't open /sys/class/drm/card0 directory.
---
src/devices/backlight.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/devices/backlight.cpp b/src/devices/backlight.cpp
index b8c9147..c0219f3 100644
--- a/src/devices/backlight.cpp
+++ b/src/devices/backlight.cpp
@@ -84,7 +84,7 @@ static int dpms_screen_on(void)
dir = opendir("/sys/class/drm/card0");
if (!dir)
- return 1;
+ return 0;
while (1) {
entry = readdir(dir);
if (!entry)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-08-14 15:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-13 16:52 [Powertop] [PATCH] Fix screen DPMS support detection Igor Zhbanov
-- strict thread matches above, loose matches on Subject: below --
2012-08-14 15:34 Chris Ferron
2012-08-14 6:11 Igor Zhbanov
2012-08-13 17:35 Arjan van de Ven
2012-08-13 16:43 Arjan van de Ven
2012-08-13 16:41 Igor Zhbanov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.