Problems with screen blanking on h2200

From: Dmitry Artamonow <mad_soft_at_inbox.ru>
Date: Thu, 25 Oct 2007 00:28:33 +0400

On 14:34 Wed 24 Oct , Paul Sokolovsky wrote:
> The current replacment list for HH.org kernel discussion is
> kernel-bugs at handhelds.org. Please forward your message there.

Ok. Hope now it's the right place for this topic :)
Comments are welcome.

----- Forwarded message from Dmitry Artamonow <mad_soft_at_inbox.ru> -----

Sorry for probably off-topic, but kernel-devel_at_hh.org seems to be long
time dead, and I don't know where else I can post kernel-related
problems. I would be glad if someone can clarify current situation
with handhelds kernel developement.

Anyway, here's my story. Recently I've been playing with Gentoo on my
h2200. After compiling xorg-server-1.4 (full-blown, not the kdrive version),
I tried to start it - but without success. Screen flickered, turned
black, then flickered again and slowly turned white instead of showing X
cursor. X server itself didn't show any error in console or logs and worked
until ^C was pressed. But even after ^C screen never returned to normal
state until reset.

I tried to run X under strace and noticed this calls:
ioctl(6, FBIOBLANK, 0x1) = 0
and then near the end of strace log:
ioctl(6, FBIOBLANK, 0) = 0

This seemed to be the cause, because I already experienced similar
problems with blanking in plain console and was pressed to workaround it
with "setterm -blank 0". Simple testcase program in C proved it, and
also I found that bug can be triggered from command line by following
statements:
echo 1 > /sys/class/graphics/fb0/blank
echo 0 > /sys/class/graphics/fb0/blank

For assuring myself what it's not the fault of my custom kernel config,
I checked also with LiveRam Angstrom image (20070922) and successfully
triggered this bug from command line.

Then I dug into kernel code, but since I'm not a kernel hacker at all,
the only thing I tried was commenting out mq1100fb_power call from
mq1100fb_blank function in drivers/video/mq1100fb.c :
--------------------------------------------------------------------------
diff -u -r1.45 mq1100fb.c
--- drivers/video/mq1100fb.c 18 Jul 2007 19:21:42 -0000 1.45
+++ drivers/video/mq1100fb.c 21 Oct 2007 08:25:30 -0000
@@ -318,7 +318,7 @@
         * blank_mode == 4: powerdown
         */
 
- mq1100fb_power (info, blank_mode);
+/* mq1100fb_power (info, blank_mode); */
 
        return 0;
 }
 

--------------------------------------------------------------------------
Suddenly it turned out to be a solution - screen was blanking anyway
(seemed that it's somehow handled by drivers/video/backlight/h2200_lcd.c
driver (and maybe backlight driver too)), but on unblanking it has all of
its contents intact and X finally worked. Still I can't understand how it
works and how screen blanking differs from device suspending which seemed
to call the same mq1100fb_power without any problems.

--
Best regards,
Dmitry "MAD" Artamonow
_______________________________________________
Angstrom-distro-devel mailing list
Angstrom-distro-devel_at_linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel
----- End forwarded message -----
Received on Wed Oct 24 2007 - 18:02:54 EDT

This archive was generated by hypermail 2.2.0 : Wed Oct 24 2007 - 18:03:34 EDT