* Xorg dies on my deferred I/O fb driver
@ 2008-12-17 14:01 Ico Doornekamp
2008-12-17 14:18 ` Geert Uytterhoeven
0 siblings, 1 reply; 4+ messages in thread
From: Ico Doornekamp @ 2008-12-17 14:01 UTC (permalink / raw)
To: linux-fbdev-devel
Hello,
Today I wrote a simple framebuffer driver for a SPI driven LCD display
with internal memory, using the deferred I/O framework. The display is
capable of grayscale, 384x160 pixels.
My driver resembles the metronomefb driver, and seems to work using
write() and mmap() with my own test tools.
The next step would be to run Xorg/fbdev on top, but things don't seem
to simple work this way.
Xorg starts and detects te framebuffer driver, but dies with the message
(EE) FBDEV(0): FBIOPUT_VSCREENINFO succeeded but modified mode
(EE) FBDEV(0): mode initialization failed
I'm kind of stuck here. Any tips on how to solve or debug this one ?
On the bottom of this mail I pasted:
- fbinfo -i output
- Xorg log
- fb_fix_screeninfoa and fb_var_screeninfo from my driver
Running Xorg 1.4.2 on Linux 2.6.27.4
Thank you,
Ico
P.S. Jaya, thanks for your lecture at CELF a few weeks ago!
----------------------------------------------------------------------
# fbinfo -i
mode "384x160"
geometry 384 160 384 160 8
timings 0 0 0 0 0 0 0
grayscale true
rgba 0/0,0/0,0/0,0/0
endmode
Frame buffer device information:
Name : uc1698fb
Address : 0
Size : 61440
Type : PACKED PIXELS
Visual : STATIC PSEUDOCOLOR
XPanStep : 0
YPanStep : 0
YWrapStep : 0
LineLength : 384
Accelerator : No
----------------------------------------------------------------------
Xorg.0.log
(II) FBDEV(0): Creating default Display subsection in Screen section
"Default Screen" for depth/fbbpp 8/8
(==) FBDEV(0): Depth 8, (==) framebuffer bpp 8
(==) FBDEV(0): Default visual is PseudoColor
(==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
(II) FBDEV(0): hardware: uc1698fb (video memory: 60kB)
(**) FBDEV(0): Option "ShadowFB" "false"
(II) FBDEV(0): checking modes against framebuffer device...
(II) FBDEV(0): checking modes against monitor...
(--) FBDEV(0): Virtual size is 384x160 (pitch 384)
(**) FBDEV(0): Built-in mode "current"
(==) FBDEV(0): DPI set to (96, 96)
(II) Loading sub module "fb"
(II) LoadModule: "fb"
(II) Loading /usr/lib/xorg/modules//libfb.so
(II) Module fb: vendor="X.Org Foundation"
compiled for 1.4.2, module version = 1.0.0
ABI class: X.Org ANSI C Emulation, version 0.3
(EE) FBDEV(0): FBIOPUT_VSCREENINFO succeeded but modified mode
(EE) FBDEV(0): mode initialization failed
----------------------------------------------------------------------
FB setup data structures from driver
tatic struct fb_fix_screeninfo uc1698fb_fix __devinitdata = {
.id = "uc1698fb",
.type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_STATIC_PSEUDOCOLOR,
.xpanstep = 0,
.ypanstep = 0,
.ywrapstep = 0,
.line_length = DPY_W,
.accel = FB_ACCEL_NONE,
};
static struct fb_var_screeninfo uc1698fb_var __devinitdata = {
.xres = DPY_W,
.yres = DPY_H,
.xres_virtual = DPY_W,
.yres_virtual = DPY_H,
.bits_per_pixel = 8,
.grayscale = 1,
.nonstd = 0,
};
--
:wq
^X^Cy^K^X^C^C^C^C
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Xorg dies on my deferred I/O fb driver
2008-12-17 14:01 Xorg dies on my deferred I/O fb driver Ico Doornekamp
@ 2008-12-17 14:18 ` Geert Uytterhoeven
2008-12-17 14:50 ` Ico Doornekamp
2008-12-17 16:35 ` Ico Doornekamp
0 siblings, 2 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2008-12-17 14:18 UTC (permalink / raw)
To: Ico Doornekamp; +Cc: linux-fbdev-devel
On Wed, 17 Dec 2008, Ico Doornekamp wrote:
> Today I wrote a simple framebuffer driver for a SPI driven LCD display
> with internal memory, using the deferred I/O framework. The display is
> capable of grayscale, 384x160 pixels.
>
> My driver resembles the metronomefb driver, and seems to work using
> write() and mmap() with my own test tools.
>
> The next step would be to run Xorg/fbdev on top, but things don't seem
> to simple work this way.
>
> Xorg starts and detects te framebuffer driver, but dies with the message
>
> (EE) FBDEV(0): FBIOPUT_VSCREENINFO succeeded but modified mode
> (EE) FBDEV(0): mode initialization failed
>
> I'm kind of stuck here. Any tips on how to solve or debug this one ?
>
> On the bottom of this mail I pasted:
>
> - fbinfo -i output
> - Xorg log
> - fb_fix_screeninfoa and fb_var_screeninfo from my driver
>
> Running Xorg 1.4.2 on Linux 2.6.27.4
I guess your frame buffer device driver supports one single video mode only?
There's a bug in Xorg that doesn't like drivers that support one single video
mode only, and always return that single video mode in the FBIOPUT_VSCREENINFO
ioctl (cfr. the "FBIOPUT_VSCREENINFO succeeded but modified mode" message).
One fix is to modify your frame buffer device driver to reject all modes that
are not identical to the single supported mode.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Xorg dies on my deferred I/O fb driver
2008-12-17 14:18 ` Geert Uytterhoeven
@ 2008-12-17 14:50 ` Ico Doornekamp
2008-12-17 16:35 ` Ico Doornekamp
1 sibling, 0 replies; 4+ messages in thread
From: Ico Doornekamp @ 2008-12-17 14:50 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-fbdev-devel
* On 2008-12-17 Geert Uytterhoeven <geert@linux-m68k.org> wrote :
> On Wed, 17 Dec 2008, Ico Doornekamp wrote:
> > Today I wrote a simple framebuffer driver for a SPI driven LCD display
> > with internal memory, using the deferred I/O framework. The display is
> > capable of grayscale, 384x160 pixels.
> >
> > My driver resembles the metronomefb driver, and seems to work using
> > write() and mmap() with my own test tools.
> >
> > The next step would be to run Xorg/fbdev on top, but things don't seem
> > to simple work this way.
> >
> > Xorg starts and detects te framebuffer driver, but dies with the message
> >
> > (EE) FBDEV(0): FBIOPUT_VSCREENINFO succeeded but modified mode
> > (EE) FBDEV(0): mode initialization failed
> >
> > I'm kind of stuck here. Any tips on how to solve or debug this one ?
> >
> > On the bottom of this mail I pasted:
> >
> > - fbinfo -i output
> > - Xorg log
> > - fb_fix_screeninfoa and fb_var_screeninfo from my driver
> >
> > Running Xorg 1.4.2 on Linux 2.6.27.4
>
> I guess your frame buffer device driver supports one single video mode only?
Indeed, good guess.
> There's a bug in Xorg that doesn't like drivers that support one
> single video mode only, and always return that single video mode in
> the FBIOPUT_VSCREENINFO ioctl (cfr. the "FBIOPUT_VSCREENINFO succeeded
> but modified mode" message).
>
> One fix is to modify your frame buffer device driver to reject all
> modes that are not identical to the single supported mode.
Ok, that's the kind of hint I needed, I'll go steal some code from other
drivers right away.
Thanks,
Ico
--
:wq
^X^Cy^K^X^C^C^C^C
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Xorg dies on my deferred I/O fb driver
2008-12-17 14:18 ` Geert Uytterhoeven
2008-12-17 14:50 ` Ico Doornekamp
@ 2008-12-17 16:35 ` Ico Doornekamp
1 sibling, 0 replies; 4+ messages in thread
From: Ico Doornekamp @ 2008-12-17 16:35 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-fbdev-devel
* On 2008-12-17 Geert Uytterhoeven <geert@linux-m68k.org> wrote :
> On Wed, 17 Dec 2008, Ico Doornekamp wrote:
> > Today I wrote a simple framebuffer driver for a SPI driven LCD display
> > with internal memory, using the deferred I/O framework. The display is
> > capable of grayscale, 384x160 pixels.
> >
> > My driver resembles the metronomefb driver, and seems to work using
> > write() and mmap() with my own test tools.
> >
> > The next step would be to run Xorg/fbdev on top, but things don't seem
> > to simple work this way.
> >
> > Xorg starts and detects te framebuffer driver, but dies with the message
> >
> > (EE) FBDEV(0): FBIOPUT_VSCREENINFO succeeded but modified mode
> > (EE) FBDEV(0): mode initialization failed
> >
> > I'm kind of stuck here. Any tips on how to solve or debug this one ?
> >
> > On the bottom of this mail I pasted:
> >
> > - fbinfo -i output
> > - Xorg log
> > - fb_fix_screeninfoa and fb_var_screeninfo from my driver
> >
> > Running Xorg 1.4.2 on Linux 2.6.27.4
>
> I guess your frame buffer device driver supports one single video mode only?
>
> There's a bug in Xorg that doesn't like drivers that support one single video
> mode only, and always return that single video mode in the FBIOPUT_VSCREENINFO
> ioctl (cfr. the "FBIOPUT_VSCREENINFO succeeded but modified mode" message).
>
> One fix is to modify your frame buffer device driver to reject all modes that
> are not identical to the single supported mode.
Thanks again, I add a f b_check_var handler, and Xorg works
like a charm now.
Ico
--
:wq
^X^Cy^K^X^C^C^C^C
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-12-17 16:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-17 14:01 Xorg dies on my deferred I/O fb driver Ico Doornekamp
2008-12-17 14:18 ` Geert Uytterhoeven
2008-12-17 14:50 ` Ico Doornekamp
2008-12-17 16:35 ` Ico Doornekamp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).