maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   How to rotate screen on os2008 (https://talk.maemo.org/showthread.php?t=17842)

fanoush 2008-03-15 08:40

Re: How to rotate screen on os2008
 
Quote:

Originally Posted by qwerty12 (Post 155480)
has anyone noticed the camera isn't working or is it just me? I ran cameratest from the terminal and it complains about overlay.

Not working here too (N810), also video playback with stock media player does not work for me. This could be related to broken overlay support too. I wonder if copying old X server would make it running again.

fanoush 2008-03-15 09:32

Re: How to rotate screen on os2008
 
original Xomap binary does not make difference, it is the kernel (both mine and the one from jott). Just flashing kernel without rotation support restores camera and media player functionality. Looks like the kernel patch messes up something or the extra functionality confuses overlay code.

RipTorn 2008-03-15 10:22

Re: How to rotate screen on os2008
 
Just out of curiosity is it possible to get the required parts of the kernel compiled as a module instead of having to reflash the entire kernel?

Or is something having to be changed in the kernel that prevents this from happening, I can't say I've looked into the rotating of the screen much so I have no idea what is actually being done.

Cheers

-Rip

qwerty12 2008-03-15 10:25

Re: How to rotate screen on os2008
 
Quote:

Originally Posted by RipTorn (Post 155495)
Just out of curiosity is it possible to get the required parts of the kernel compiled as a module instead of having to reflash the entire kernel?

Or is something having to be changed in the kernel that prevents this from happening, I can't say I've looked into the rotating of the screen much so I have no idea what is actually being done.

Cheers

-Rip

You cannot afaik. Because I believe the patch is written to the kernel which directly writes to the lcd controller to change the rotation afaik.

It's a shame video & camera do not work in normal mode, I would be perfectly content if it didn't only work in the rotated modes.

On a seperate note, I think its killed canola 2 too. Canola2 only shows a green screen.

RipTorn 2008-03-15 10:46

Re: How to rotate screen on os2008
 
Ahh ok cool makes sense now, so its actually patching the existing kernel not compiling in anything extra as such.

Cheers.

-Rip

nhanquy 2008-03-15 16:32

Re: How to rotate screen on os2008
 
gtalk fails too. It rejects calls and disconnects right away after making connect! :(

JamesU 2008-03-15 17:27

Re: How to rotate screen on os2008
 
Tried this yesterday and it works rather nicely, though it is by no means flawless.

I think most of the killer bugs have been mentioned already, so i shall not elaborate. :)

Still, rotating the screen is a very useful feature.

Underscore 2008-03-15 20:21

Re: How to rotate screen on os2008
 
Would this work in KDE? I'm scared to try....

qwerty12 2008-03-15 20:27

Re: How to rotate screen on os2008
 
The kernel would and i'm pretty sure the xserver would. But you would have to use xrandr at cli to rotate screen.

I must add I do not use kde, but it's an educated guess.

fanoush 2008-03-15 22:05

Re: How to rotate screen on os2008
 
I have uploaded updated kernel that seems to work with media player and camera.
http://fanoush.wz.cz/maemo/kernel-2....otation.tar.gz

Basically I reverted two changes below back to original state
Code:

@@ -522,10 +530,8 @@ static int set_fb_var(struct fb_info *fb
                xres_max = panel->x_res;
                yres_min = OMAPFB_PLANE_YRES_MIN;
                yres_max = panel->y_res;
-                if (cpu_is_omap15xx()) {
-                        var->xres = panel->x_res;
-                        var->yres = panel->y_res;
-                }
+                var->xres = panel->x_res;
+                var->yres = panel->y_res;
                break;
        case 90:
        case 270:
@@ -533,10 +539,8 @@ static int set_fb_var(struct fb_info *fb
                xres_max = panel->y_res;
                yres_min = OMAPFB_PLANE_XRES_MIN;
                yres_max = panel->x_res;
-                if (cpu_is_omap15xx()) {
-                        var->xres = panel->y_res;
-                        var->yres = panel->x_res;
-                }
+                var->xres = panel->y_res;
+                var->yres = panel->x_res;
                break;
        default:
                return -EINVAL;

While the idea in those changes looks good for normal screen, it messes up resolution of overlay/video/camera plane because it uses values from LCD panel resolution (panel->x_res,panel->y_res =800x480) which is wrong for (smaller) overlay plane.

With stock kernel after playing Nokia_N810.avi video it looks like this
Code:

Nokia-N810-50-2:~# cat /sys/class/graphics/fb1/virtual_size
400,240

With the code above in effect, resolution is changed to 800,120 which is not ideal :-)

Omitting those changes seems to not to break anything visible and allows overlay plane to work (even in rotated mode). Still, this quick 'fix' is not correct and better code is needed. Please report if this kernel makes anything worse.


All times are GMT. The time now is 03:10.

vBulletin® Version 3.8.8