|
2011-10-08
, 21:57
|
Posts: 2,154 |
Thanked: 8,464 times |
Joined on May 2010
|
#113
|
|
2011-10-09
, 10:11
|
Posts: 197 |
Thanked: 101 times |
Joined on Dec 2009
@ Netherlands
|
#114
|
0001-RX51-bootmenu-add-clr-command-to-clear-the-screen.patch.txt - Please add definitions directly to include/config_cmd_default.h and include/config_cmd_all.h (not into rx51)
0006-RX51-add-command-to-set-screen-backlight.patch - there is missing some files in this patch. But we do not want to add new specific command only for n900 (not usefull for upstream). And I tested this patch and it break brightness in Maemo kernel. When I used this patch I was not able to change brightness in Maemo (via controlpanel or sysfs). Can you look at this error?
Correct implementation of function console_scrollup is:
memcpyl(CONSOLE_ROW_FIRST, CONSOLE_ROW_SECOND, CONSOLE_SCROLL_SIZE);
CONSOLE_SCROLL_SIZE is full, not without first 2 bits! This is working fine now.
The Following 2 Users Say Thank You to mirakels For This Useful Post: | ||
|
2011-10-09
, 10:27
|
Posts: 362 |
Thanked: 426 times |
Joined on Nov 2010
@ Italy, Lombardia
|
#115
|
|
2011-10-09
, 10:50
|
Posts: 2,154 |
Thanked: 8,464 times |
Joined on May 2010
|
#116
|
These future N900 u-boot's images will have a working saveenv command or other solutions to persist modification to env ?
|
2011-10-09
, 11:02
|
Posts: 2,154 |
Thanked: 8,464 times |
Joined on May 2010
|
#117
|
I see what you mean. See attachment for a new version.
To enable the command for rx51 I guess you still need to add the define to rx51.h manually.
Yes that is why I added the big WARNING. I noticed the brightness problem too but when I set backlight to 0 just before booting a kernel this problem seems to be gone.
The reason that I added it in the n900 specific part is that I'm not sure if the command is useful on other devices. I guess that is the reason you added the regulator patches to the rx51.c file too. If they are generic enough I guess the regulator and backlight code could be moved to power/twl4030.c
or friends.
CONSOLE_SCROLL_SIZE reflects the number of bytes in the scroll area. but memcpyl() moves ints! To reflect the weirdness in this I think you should still use
memcpyl(CONSOLE_ROW_FIRST, CONSOLE_ROW_SECOND, 4*CONSOLE_SCROLL_SIZE >> 2);
PS: maybe you should consider pushing the ANSI and bootmenu patches to denx asap. They are quite useful for everybody right now!
|
2011-10-09
, 12:44
|
Posts: 362 |
Thanked: 426 times |
Joined on Nov 2010
@ Italy, Lombardia
|
#118
|
And (4*CONSOLE_SCROLL_SIZE >> 2) is not same as CONSOLE_SCROLL_SIZE? Byteshift (C >> 2) is same as (C/4), so (4*C >> 2) = (4*C/4) = C
|
2011-10-09
, 13:06
|
Posts: 197 |
Thanked: 101 times |
Joined on Dec 2009
@ Netherlands
|
#119
|
yes, this is reason why not to upstream this patch. We need look how maemo kernel set brightness!
And (4*CONSOLE_SCROLL_SIZE >> 2) is not same as CONSOLE_SCROLL_SIZE? Byteshift (C >> 2) is same as (C/4), so (4*C >> 2) = (4*C/4) = C
this could be tested on more HW revisions first! It working on my 2101. Do you have other HW rev?
|
2011-10-09
, 13:12
|
Posts: 2,154 |
Thanked: 8,464 times |
Joined on May 2010
|
#120
|
It's not the same.
(4*C>>2) = ((C<<2)>>2) = clear two most significative bits
For example suppose C as byte (unsigned):
If C = 46 (0010 1110) then (4*C>>2) = 46 (0010 1110) also, but if C = 114 (0111 0010) then (4*C>>2) = 50 (0011 0010)
printf("%#x %#x\n", 4*114 >> 2, 114); printf("%#x %#x\n", 4*46 >> 2, 46);
0x72 0x72 0x2e 0x2e
Furthermore the clearscreen stuff and some cosmetic changes/fixes.