Thread (33 messages) 33 messages, 5 authors, 2008-09-04

Re: [PATCH] Add fb_check_var() for fixed mode device.

From: Helge Deller <deller@gmx.de>
Date: 2008-08-30 08:59:12

Michel Dänzer wrote:
On Fri, 2008-08-29 at 16:14 +0200, Geert Uytterhoeven wrote:
quoted
On Fri, 29 Aug 2008, Michel Dnzer wrote:
quoted
On Fri, 2008-08-29 at 14:16 +0200, Geert Uytterhoeven wrote:
quoted
| X.Org X Server 1.4.2
[...]
quoted
| (EE) FBDEV(0): FBIOPUT_VSCREENINFO succeeded but modified mode
[...]
quoted
Hence Xorg is broken on all embedded devices with a frame buffer driver
that supports a single fixed video mode only?
No. As discussed before, you're probably missing

http://cgit.freedesktop.org/xorg/xserver/commit/?id=c095da04fe7c73b6503ef5b93549b13796c51b22

which is in the upcoming xserver 1.5 release.
Ah, upcoming. That's not current/previous/... ;-)
Yeah, it might have been nice to backport this to the 1.4 branch, but
it's kind of too late now. Of course, you can always bug your
distributor to backport it. :)
The attached patch is a completely different approach to solve the issue. I've tested it, and it works even with the buggy version of X (1.4.2).

Basic idea is, that when we have fixed mode devices (aka drivers which don't implement fb_check_var) we just simply fill in a "emulated" valid monitor/modeline into the var struct during the register_framebuffer() initialization call. Since the modeline is valid, X does not has any problems with it.

The patch has a few benefits:
a) We still keep binary compatability/behavior for FBIOGET_VSCREENINFO and FBIOPUT_VSCREENINFO.
b) In Xorg.conf files, users can simply delete all monitor and display sections -> Xorg will autoconfigure itself to the only valid resolution/modeline itself on all devices (I really like this!!!)

Thus, the patch basically changes the fixed mode drivers to have some monitor timings by default. As an example, before I got:
root@c3000:~# fbset -i
mode "1024x768"
    geometry 1024 768 1024 768 8
    timings 0 0 0 0 0 0 0
    rgba 8/0,8/0,8/0,0/0
endmode

Now I see:
root@c3000:~# fbset -i
mode "1024x768-60"
    # D: 65.003 MHz, H: 48.365 kHz, V: 60.006 Hz
    geometry 1024 768 1024 768 8
    timings 15384 168 8 29 3 144 6
    rgba 8/0,8/0,8/0,0/0
endmode

Opinions ?

Signed-off-by: Helge Deller <deller@gmx.de>

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help