Changeset 144

Show
Ignore:
Timestamp:
08/02/08 12:07:05 (5 months ago)
Author:
dezperado
Message:

A little stricter framebuffer mode setting checking and some more documentation on the matter.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • README

    r141 r144  
    221221man fb.modes 
    222222man fbi 
     223man console_ioctl 
     224man resizecons 
    223225 
    224226Useful documents I could read later on: 
     
    226228man 3 history 
    227229man readline 
     230 
     231Useful URLs: 
     232http://www.tldp.org/HOWTO/Framebuffer-HOWTO.html 
     233and mirrors 
     234http://www.linux.org/docs/ldp/howto/Framebuffer-HOWTO.html 
     235http://www.pluto.it/files/ildp/HOWTO/Framebuffer-HOWTO/Framebuffer-HOWTO.html 
     236 
     237and 
     238http://bisqwit.iki.fi/source/fbmodes.html 
     239http://asm.sourceforge.net/articles/fb.html 
     240http://www.linuxjournal.com/article/2783 
    228241 
    229242Tested platforms : 
  • doc/fim.man

    r133 r144  
    7474name of the video mode to use video mode (must be listed in 
    7575/etc/fb.modes).  Default is not to change the video mode. 
     76In the past, the XF86 config file (/etc/X11/XF86Config) used to contain Modeline  
     77information, which could be fed to the modeline2fb perl script (distributed with fbset). 
     78On many modern xorg based systems, there is no direct way to obtain a fb.modes file from the xorg.conf file. 
     79So instead one could obtain useful fb.modes info by using the (fbmodes (no man page AFAIK)) tool, written by bisqwit. 
     80An unsupported mode should make fim exit with failure. 
     81But it is possible the kernel could trick fim and set a supported mode automatically, thus 
     82ignoring the user set mode. 
    7683.c .TP 
    7784.c .B -q, --quiet 
     
    111118.B -T {terminal}, --vt {terminal} 
    112119The \fBterminal\fP will be used as virtual terminal device file (as in fbi). 
     120See (chvt (1)), (openvt (1)) for more info about this. 
     121Use (con2fb (1)) to map a terminal to a framebuffer device. 
    113122.c .TP 
    114123.c .B -f font 
     
    350359initialization file (executed on startup, if existent). 
    351360.SH SEE ALSO 
    352 fimgs(1), fbset(1), convert(1), vim(1), fb.modes(8), fbset(8), fbgrab(1), fbdev(4), setfont(8), xfs(1) 
     361fimgs(1), fbset(1), con2fb(1), convert(1), vim(1), fb.modes(8), fbset(8), fbgrab(1), fbdev(4), setfont(8), xfs(1) 
    353362.c , jpegtran(1) 
    354363.SH AUTHOR 
  • src/FramebufferDevice.cpp

    r142 r144  
    127127                //initialization of the framebuffer text 
    128128                FontServer::fb_text_init1(fontname,&f); 
     129                /* 
     130                 * will initialized with the user set (or default ones) 
     131                 *  - framebuffer device 
     132                 *  - framebuffer mode 
     133                 *  - virtual terminal 
     134                 * */ 
    129135                fd = fb_init(fbdev, fbmode, vt); 
    130136                if(fd==-1) 
     
    468474     
    469475    /* switch mode */ 
    470     fb_setmode(mode); 
     476    if(-1 == fb_setmode(mode)){ 
     477        /*  
     478         * FIXME: 
     479         * mm's strict mode ckecking (right now, this function triggers an exit() but things should change) */ 
     480#ifdef FIM_BOZ_PATCH 
     481        if(!try_boz_patch) 
     482#endif 
     483        { 
     484                perror("failed setting mode"); 
     485                exit(1); 
     486        } 
     487    } 
     488 
    471489     
    472490    /* checks & initialisation */ 
     
    625643    char line[80],label[32],value[16]; 
    626644    int  geometry=0, timings=0; 
    627      
     645  
    628646    /* load current values */ 
    629647    if (-1 == ioctl(fb,FBIOGET_VSCREENINFO,&fb_var)) { 
     
    680698            fb_var.xoffset = 0; 
    681699            fb_var.yoffset = 0; 
     700 
    682701            if (-1 == ioctl(fb,FBIOPUT_VSCREENINFO,&fb_var)) 
    683702                perror("ioctl FBIOPUT_VSCREENINFO"); 
     703            /* 
     704             * FIXME 
     705             * mm : this should be placed here and uncommented : */ 
     706            /* 
     707            if (-1 == ioctl(fb,FBIOGET_FSCREENINFO,&fb_fix)) { 
     708                perror("ioctl FBIOGET_VSCREENINFO"); 
     709                exit(1); 
     710            }*/ 
    684711            /* look what we have now ... */ 
    685712            if (-1 == ioctl(fb,FBIOGET_VSCREENINFO,&fb_var)) { 
  • src/FramebufferDevice.h

    r142 r144  
    225225 
    226226        public: 
     227        /* 
     228         * FIXME : should be a static string, or trouble will come! 
     229         * */ 
    227230        int set_fbdev(char *fbdev) 
    228231        { 
     
    235238        } 
    236239 
     240        /* 
     241         * FIXME : should be a static string, or trouble will come! 
     242         * */ 
    237243        int set_fbmode(char *fbmode) 
    238244        { 
     
    255261        } 
    256262 
    257         int set_default_fbgamma(int fbgamma) 
     263        int set_default_fbgamma(float fbgamma) 
    258264        { 
    259265                /* only possible before init() */