Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: "Michel Dänzer" <michel@tungstengraphics.com>
Cc: "Helge Deller" <deller@gmx.de>,
	"Linux Frame Buffer Device Development"
	<linux-fbdev-devel@lists.sourceforge.net>,
	"Ville Syrj�l�" <syrjala@sci.fi>
Subject: Re: [PATCH] Add fb_check_var() for fixed mode device.
Date: Fri, 29 Aug 2008 14:16:50 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0808291127510.18326@anakin> (raw)
In-Reply-To: <1219999758.4421.259.camel@thor.sulgenrain.local>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; CHARSET=UTF-8, Size: 3591 bytes --]

On Fri, 29 Aug 2008, Michel Dänzer wrote:
> On Fri, 2008-08-29 at 14:15 +0900, Takashi Yoshii wrote:
> > +	/* bigger is error, smaller is OK */
> > +	if( ( var->xres > constant->xres )
> > +	  ||( var->yres > constant->yres )
> 
> The resolution must match, otherwise userspace thinks it can e.g. set
> 800x600 when the fixed mode is 1024x768.

It will be set later to the correct resolution. The above hunk just taks
care of the rounding rules.

Anyway, I'm still wondering whether this check is really needed. If your
application doesn't look at how fb_var_screeninfo was changed by calling
FBIOPUT_VSCREENINFO, you're in deep trouble anyway, due to the rounding
rules.

As I don't have access to a PA-RISC machine with the mentioned hardware,
I modified ps3fb by commenting out its fb_check_var() and fb_set_par()
routines (this also gave a black screen, but as far as the fbdev subsystem
is concerned, it has a working frame buffer device that supports one single
video mode only). Surprisingly, X indeed didn't like it:

| X.Org X Server 1.4.2
| Release Date: 11 June 2008
| X Protocol Version 11, Revision 0
| Build Operating System: Linux Debian (xorg-server 2:1.4.2-3)
| Current Operating System: Linux ps3 2.6.27-rc4-00176-gb8e6c91-dirty #1815 SMP Fri Aug 29 13:54:57 CEST 2008 ppc64
| Build Date: 03 August 2008  03:08:04AM
|  
|         Before reporting problems, check http://wiki.x.org
|         to make sure that you have the latest version.
| Module Loader present
| Markers: (--) probed, (**) from config file, (==) default setting,
|         (++) from command line, (!!) notice, (II) informational,
|         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
| (==) Log file: "/var/log/Xorg.0.log", Time: Fri Aug 29 13:57:26 2008
| (==) Using config file: "/etc/X11/xorg.conf"
| (EE) FBDEV(0): FBIOPUT_VSCREENINFO succeeded but modified mode
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| (EE) FBDEV(0): mode initialization failed
| 
| Fatal server error:
| AddScreen/ScreenInit failed for driver 0

The "Screen" / "Display" (sub)section has `Modes "1920x1200"'. Removing
this indeed doesn't make a difference.

As I had added debug code to drivers/video/fbmem.c:fb_set_var(), I could
see what happened in the working version with mode-setting vs. the non-working
version without modesetting:
  - working, with mode-setting:
      o fb_set_var() fails for the standard 1920x1200 mode in the Xorg
        database,
      o X fallbacks to the current 1920x1200 mode.
  - non-working, without modesetting:
      o fb_set_var() doesn't fail for the standard 1920x1200 mode in the
        Xorg database, but it returns the current 1920x1200 mode,
      o X complains that the mode got modified.

Hence Xorg is broken on all embedded devices with a frame buffer driver
that supports a single fixed video mode only?

BTW, I know current Xorg is broken on several m68k platforms with non-chunky
frame buffer layouts, due to some serious bugs in the way some uncommon values
of frame buffer parameters are handled, but IIRC they shouldn't affect
`common' chunky frame buffers. Still have to look into it to fix it properly
(anyone who can donate me some spare time? ;-)

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

[-- Attachment #2: Type: text/plain, Size: 363 bytes --]

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

[-- Attachment #3: Type: text/plain, Size: 182 bytes --]

_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

  reply	other threads:[~2008-08-29 12:16 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27  5:09 [PATCH] Do set var even if no fb_check_var() provided Takashi Yoshii
2008-08-27  7:08 ` Geert Uytterhoeven
2008-08-27 21:49   ` Helge Deller
2008-08-28  6:53     ` Michel Dänzer
2008-08-28 21:43       ` Helge Deller
2008-08-28 22:08         ` Michel Dänzer
2008-08-28 22:16           ` Helge Deller
2008-08-28 22:18             ` Michel Dänzer
2008-08-28 22:23               ` Helge Deller
2008-08-28 22:30                 ` Michel Dänzer
2008-08-28 22:35                   ` Helge Deller
2008-08-28 22:47                     ` Michel Dänzer
2008-08-28  7:45     ` Ville Syrjälä
2008-08-28 21:45       ` Helge Deller
2008-08-29  5:15       ` [PATCH] Add fb_check_var() for fixed mode device Takashi Yoshii
2008-08-29  7:07         ` Michel Dänzer
2008-08-29  7:48           ` Takashi Yoshii
2008-08-29  7:10         ` Geert Uytterhoeven
2008-09-04  1:56           ` Takashi Yoshii
2008-08-29  8:49         ` Michel Dänzer
2008-08-29 12:16           ` Geert Uytterhoeven [this message]
2008-08-29 13:51             ` Michel Dänzer
2008-08-29 14:14               ` Geert Uytterhoeven
2008-08-29 14:23                 ` Michel Dänzer
2008-08-30  8:58                   ` Helge Deller
2008-09-02 19:11                     ` Helge Deller
2008-09-03 10:11                       ` Michel Dänzer
2008-09-03 19:24                         ` Helge Deller
2008-09-04  7:21                       ` Takashi Yoshii
2008-08-29 17:38             ` Ville Syrjälä
2008-08-29  2:06   ` [PATCH] Do set var even if no fb_check_var() provided Takashi Yoshii
2008-08-29  7:03     ` Geert Uytterhoeven
2008-09-04  7:38       ` Takashi Yoshii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0808291127510.18326@anakin \
    --to=geert@linux-m68k.org \
    --cc=deller@gmx.de \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=michel@tungstengraphics.com \
    --cc=syrjala@sci.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox