1 /*****************************************************************************
2 * fb.c : framebuffer plugin for vlc
3 *****************************************************************************
4 * Copyright (C) 2000, 2001 VideoLAN
5 * $Id: fb.c,v 1.18 2002/04/23 14:16:20 sam Exp $
7 * Authors: Samuel Hocevar <sam@zoy.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 /*****************************************************************************
26 *****************************************************************************/
27 #include <errno.h> /* ENOMEM */
28 #include <signal.h> /* SIGUSR1, SIGUSR2 */
29 #include <stdlib.h> /* free() */
30 #include <string.h> /* strerror() */
31 #include <fcntl.h> /* open() */
32 #include <unistd.h> /* close() */
34 #include <termios.h> /* struct termios */
35 #include <sys/ioctl.h>
36 #include <sys/mman.h> /* mmap() */
39 #include <linux/vt.h> /* VT_* */
40 #include <linux/kd.h> /* KD* */
42 #include <videolan/vlc.h>
45 #include "video_output.h"
47 /*****************************************************************************
48 * Capabilities defined in the other files.
49 *****************************************************************************/
50 static void vout_getfunctions( function_list_t * p_function_list );
52 static int vout_Create ( vout_thread_t * );
53 static void vout_Destroy ( vout_thread_t * );
54 static void vout_Render ( vout_thread_t *, picture_t * );
55 static void vout_Display ( vout_thread_t *, picture_t * );
56 static int vout_Manage ( vout_thread_t * );
57 static int vout_Init ( vout_thread_t * );
58 static void vout_End ( vout_thread_t * );
60 static int OpenDisplay ( vout_thread_t * );
61 static void CloseDisplay ( vout_thread_t * );
62 static void SwitchDisplay ( int i_signal );
63 static void TextMode ( int i_tty );
64 static void GfxMode ( int i_tty );
66 /*****************************************************************************
67 * Building configuration tree
68 *****************************************************************************/
69 #define FB_DEV_VAR "fbdev"
72 ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
73 ADD_STRING ( FB_DEV_VAR, "/dev/fb0", NULL, N_("framebuffer device"), NULL )
77 SET_DESCRIPTION( _("Linux console framebuffer module") )
78 ADD_CAPABILITY( VOUT, 30 )
83 vout_getfunctions( &p_module->p_functions->vout );
86 MODULE_DEACTIVATE_START
87 MODULE_DEACTIVATE_STOP
89 /*****************************************************************************
90 * vout_sys_t: video output framebuffer method descriptor
91 *****************************************************************************
92 * This structure is part of the video output thread descriptor.
93 * It describes the FB specific properties of an output thread.
94 *****************************************************************************/
95 typedef struct vout_sys_s
97 /* System informations */
98 int i_tty; /* tty device handle */
99 struct termios old_termios;
101 /* Original configuration informations */
102 struct sigaction sig_usr1; /* USR1 previous handler */
103 struct sigaction sig_usr2; /* USR2 previous handler */
104 struct vt_mode vt_mode; /* previous VT mode */
106 /* Framebuffer information */
107 int i_fd; /* device handle */
108 struct fb_var_screeninfo old_info; /* original mode informations */
109 struct fb_var_screeninfo var_info; /* current mode informations */
110 boolean_t b_pan; /* does device supports panning ? */
111 struct fb_cmap fb_cmap; /* original colormap */
112 u16 *p_palette; /* original palette */
114 /* Video information */
117 int i_bytes_per_pixel;
120 byte_t * p_video; /* base adress */
121 size_t i_page_size; /* page size */
125 /*****************************************************************************
126 * Functions exported as capabilities. They are declared as static so that
127 * we don't pollute the namespace too much.
128 *****************************************************************************/
129 static void vout_getfunctions( function_list_t * p_function_list )
131 p_function_list->functions.vout.pf_create = vout_Create;
132 p_function_list->functions.vout.pf_init = vout_Init;
133 p_function_list->functions.vout.pf_end = vout_End;
134 p_function_list->functions.vout.pf_destroy = vout_Destroy;
135 p_function_list->functions.vout.pf_manage = vout_Manage;
136 p_function_list->functions.vout.pf_render = vout_Render;
137 p_function_list->functions.vout.pf_display = vout_Display;
140 /*****************************************************************************
141 * vout_Create: allocates FB video thread output method
142 *****************************************************************************
143 * This function allocates and initializes a FB vout method.
144 *****************************************************************************/
145 static int vout_Create( vout_thread_t *p_vout )
147 struct sigaction sig_tty; /* sigaction for tty change */
148 struct vt_mode vt_mode; /* vt current mode */
149 struct termios new_termios;
151 /* Allocate instance and initialize some members */
152 p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
153 if( p_vout->p_sys == NULL )
158 /* Set tty and fb devices */
159 p_vout->p_sys->i_tty = 0; /* 0 == /dev/tty0 == current console */
161 GfxMode( p_vout->p_sys->i_tty );
163 /* Set keyboard settings */
164 if (tcgetattr(0, &p_vout->p_sys->old_termios) == -1)
166 intf_ErrMsg( "intf error: tcgetattr" );
169 if (tcgetattr(0, &new_termios) == -1)
171 intf_ErrMsg( "intf error: tcgetattr" );
174 /* new_termios.c_lflag &= ~ (ICANON | ISIG);
175 new_termios.c_lflag |= (ECHO | ECHOCTL); */
176 new_termios.c_lflag &= ~ (ICANON);
177 new_termios.c_lflag &= ~(ECHO | ECHOCTL);
178 new_termios.c_iflag = 0;
179 new_termios.c_cc[VMIN] = 1;
180 new_termios.c_cc[VTIME] = 0;
182 if (tcsetattr(0, TCSAFLUSH, &new_termios) == -1)
184 intf_ErrMsg( "intf error: tcsetattr" );
187 ioctl( p_vout->p_sys->i_tty, VT_RELDISP, VT_ACKACQ );
189 /* Set-up tty signal handler to be aware of tty changes */
190 memset( &sig_tty, 0, sizeof( sig_tty ) );
191 sig_tty.sa_handler = SwitchDisplay;
192 sigemptyset( &sig_tty.sa_mask );
193 if( sigaction( SIGUSR1, &sig_tty, &p_vout->p_sys->sig_usr1 ) ||
194 sigaction( SIGUSR2, &sig_tty, &p_vout->p_sys->sig_usr2 ) )
196 intf_ErrMsg( "intf error: can't set up signal handler (%s)",
198 tcsetattr(0, 0, &p_vout->p_sys->old_termios);
199 TextMode( p_vout->p_sys->i_tty );
200 free( p_vout->p_sys );
204 /* Set-up tty according to new signal handler */
205 if( -1 == ioctl( p_vout->p_sys->i_tty,
206 VT_GETMODE, &p_vout->p_sys->vt_mode ) )
208 intf_ErrMsg( "intf error: cant get terminal mode (%s)",
210 sigaction( SIGUSR1, &p_vout->p_sys->sig_usr1, NULL );
211 sigaction( SIGUSR2, &p_vout->p_sys->sig_usr2, NULL );
212 tcsetattr(0, 0, &p_vout->p_sys->old_termios);
213 TextMode( p_vout->p_sys->i_tty );
214 free( p_vout->p_sys );
217 memcpy( &vt_mode, &p_vout->p_sys->vt_mode, sizeof( vt_mode ) );
218 vt_mode.mode = VT_PROCESS;
220 vt_mode.relsig = SIGUSR1;
221 vt_mode.acqsig = SIGUSR2;
223 if( -1 == ioctl( p_vout->p_sys->i_tty, VT_SETMODE, &vt_mode ) )
225 intf_ErrMsg( "intf error: can't set terminal mode (%s)",
227 sigaction( SIGUSR1, &p_vout->p_sys->sig_usr1, NULL );
228 sigaction( SIGUSR2, &p_vout->p_sys->sig_usr2, NULL );
229 tcsetattr(0, 0, &p_vout->p_sys->old_termios);
230 TextMode( p_vout->p_sys->i_tty );
231 free( p_vout->p_sys );
235 if( OpenDisplay( p_vout ) )
237 ioctl( p_vout->p_sys->i_tty, VT_SETMODE, &p_vout->p_sys->vt_mode );
238 sigaction( SIGUSR1, &p_vout->p_sys->sig_usr1, NULL );
239 sigaction( SIGUSR2, &p_vout->p_sys->sig_usr2, NULL );
240 tcsetattr(0, 0, &p_vout->p_sys->old_termios);
241 TextMode( p_vout->p_sys->i_tty );
242 free( p_vout->p_sys );
249 /*****************************************************************************
250 * vout_Init: initialize framebuffer video thread output method
251 *****************************************************************************/
252 static int vout_Init( vout_thread_t *p_vout )
257 I_OUTPUTPICTURES = 0;
259 /* Initialize the output structure: RGB with square pixels, whatever
260 * the input format is, since it's the only format we know */
261 switch( p_vout->p_sys->var_info.bits_per_pixel )
263 case 8: /* FIXME: set the palette */
264 p_vout->output.i_chroma = FOURCC_RGB2; break;
266 p_vout->output.i_chroma = FOURCC_RV15; break;
268 p_vout->output.i_chroma = FOURCC_RV16; break;
270 p_vout->output.i_chroma = FOURCC_RV24; break;
272 p_vout->output.i_chroma = FOURCC_RV32; break;
274 intf_ErrMsg( "vout error: unknown screen depth" );
278 /* Only useful for p_vout->p_sys->var_info.bits_per_pixel != 8 */
279 p_vout->output.i_rmask = ( (1 << p_vout->p_sys->var_info.red.length) - 1 )
280 << p_vout->p_sys->var_info.red.offset;
281 p_vout->output.i_gmask = ( (1 << p_vout->p_sys->var_info.green.length) - 1 )
282 << p_vout->p_sys->var_info.green.offset;
283 p_vout->output.i_bmask = ( (1 << p_vout->p_sys->var_info.blue.length) - 1 )
284 << p_vout->p_sys->var_info.blue.offset;
286 p_vout->output.i_width = p_vout->p_sys->i_width;
287 p_vout->output.i_height = p_vout->p_sys->i_height;
289 /* Assume we have square pixels */
290 p_vout->output.i_aspect = p_vout->p_sys->i_width
291 * VOUT_ASPECT_FACTOR / p_vout->p_sys->i_height;
293 /* Clear the screen */
294 memset( p_vout->p_sys->p_video, 0, p_vout->p_sys->i_page_size );
296 /* Try to initialize 1 direct buffer */
299 /* Find an empty picture slot */
300 for( i_index = 0 ; i_index < VOUT_MAX_PICTURES ; i_index++ )
302 if( p_vout->p_picture[ i_index ].i_status == FREE_PICTURE )
304 p_pic = p_vout->p_picture + i_index;
309 /* Allocate the picture */
315 /* We know the chroma, allocate a buffer which will be used
316 * directly by the decoder */
317 p_pic->p->p_pixels = p_vout->p_sys->p_video;
318 p_pic->p->i_pixel_bytes = p_vout->p_sys->i_bytes_per_pixel;
319 p_pic->p->i_lines = p_vout->p_sys->var_info.yres;
321 if( p_vout->p_sys->var_info.xres_virtual )
323 p_pic->p->b_margin = 1;
324 p_pic->p->b_hidden = 1;
325 p_pic->p->i_pitch = p_vout->p_sys->var_info.xres_virtual
326 * p_vout->p_sys->i_bytes_per_pixel;
327 p_pic->p->i_visible_bytes = p_vout->p_sys->var_info.xres
328 * p_vout->p_sys->i_bytes_per_pixel;
332 p_pic->p->b_margin = 0;
333 p_pic->p->i_pitch = p_vout->p_sys->var_info.xres
334 * p_vout->p_sys->i_bytes_per_pixel;
339 p_pic->i_status = DESTROYED_PICTURE;
340 p_pic->i_type = DIRECT_PICTURE;
342 PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic;
349 /*****************************************************************************
350 * vout_End: terminate framebuffer video thread output method
351 *****************************************************************************/
352 static void vout_End( vout_thread_t *p_vout )
354 /* Clear the screen */
355 memset( p_vout->p_sys->p_video, 0, p_vout->p_sys->i_page_size );
358 /*****************************************************************************
359 * vout_Destroy: destroy FB video thread output method
360 *****************************************************************************
361 * Terminate an output method created by vout_CreateOutputMethod
362 *****************************************************************************/
363 static void vout_Destroy( vout_thread_t *p_vout )
365 CloseDisplay( p_vout );
367 /* Reset the terminal */
368 ioctl( p_vout->p_sys->i_tty, VT_SETMODE, &p_vout->p_sys->vt_mode );
370 /* Remove signal handlers */
371 sigaction( SIGUSR1, &p_vout->p_sys->sig_usr1, NULL );
372 sigaction( SIGUSR2, &p_vout->p_sys->sig_usr2, NULL );
374 /* Reset the keyboard state */
375 tcsetattr( 0, 0, &p_vout->p_sys->old_termios );
377 /* Return to text mode */
378 TextMode( p_vout->p_sys->i_tty );
380 /* Destroy structure */
381 free( p_vout->p_sys );
384 /*****************************************************************************
385 * vout_Manage: handle FB events
386 *****************************************************************************
387 * This function should be called regularly by video output thread. It manages
388 * console events. It returns a non null value on error.
389 *****************************************************************************/
390 static int vout_Manage( vout_thread_t *p_vout )
395 if ( read(0, &buf, 1) == 1)
400 p_main->p_intf->b_die = 1;
412 if( p_vout->i_changes & VOUT_SIZE_CHANGE )
414 intf_WarnMsg( 3, "vout: reinitializing framebuffer screen" );
415 p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
417 /* Destroy XImages to change their size */
420 /* Recreate XImages. If SysInit failed, the thread can't go on. */
421 if( vout_Init( p_vout ) )
423 intf_ErrMsg("error: cannot reinit framebuffer screen" );
428 memset( p_vout->p_sys->p_video, 0, p_vout->p_sys->i_page_size );
431 /* Tell the video output thread that it will need to rebuild YUV
432 * tables. This is needed since conversion buffer size may have changed */
433 p_vout->i_changes |= VOUT_YUV_CHANGE;
440 /*****************************************************************************
441 * vout_Render: renders previously calculated output
442 *****************************************************************************/
443 static void vout_Render( vout_thread_t *p_vout, picture_t *p_pic )
448 /*****************************************************************************
449 * vout_Display: displays previously rendered output
450 *****************************************************************************
451 * This function send the currently rendered image to FB image, waits until
452 * it is displayed and switch the two rendering buffers, preparing next frame.
453 *****************************************************************************/
454 static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
456 /* swap the two Y offsets if the drivers supports panning */
457 if( p_vout->p_sys->b_pan )
459 p_vout->p_sys->var_info.yoffset = 0;
460 //p_vout->p_sys->var_info.yoffset = p_vout->p_sys->var_info.yres;
462 /* the X offset should be 0, but who knows ...
463 * some other app might have played with the framebuffer */
464 p_vout->p_sys->var_info.xoffset = 0;
466 ioctl( p_vout->p_sys->i_fd,
467 FBIOPAN_DISPLAY, &p_vout->p_sys->var_info );
472 static void vout_SetPalette( p_vout_thread_t p_vout,
473 u16 *red, u16 *green, u16 *blue, u16 *transp )
475 struct fb_cmap cmap = { 0, 256, red, green, blue, transp };
477 ioctl( p_vout->p_sys->i_fd, FBIOPUTCMAP, &cmap );
481 /* following functions are local */
483 /*****************************************************************************
484 * OpenDisplay: initialize framebuffer
485 *****************************************************************************/
486 static int OpenDisplay( vout_thread_t *p_vout )
488 char *psz_device; /* framebuffer device path */
489 struct fb_fix_screeninfo fix_info; /* framebuffer fix information */
491 /* Open framebuffer device */
492 if( !(psz_device = config_GetPszVariable( FB_DEV_VAR )) )
494 intf_ErrMsg( "vout error: don't know which fb device to open" );
498 p_vout->p_sys->i_fd = open( psz_device, O_RDWR);
500 if( p_vout->p_sys->i_fd == -1 )
502 intf_ErrMsg("vout error: can't open %s (%s)",
503 psz_device, strerror(errno) );
509 /* Get framebuffer device informations */
510 if( ioctl( p_vout->p_sys->i_fd,
511 FBIOGET_VSCREENINFO, &p_vout->p_sys->var_info ) )
513 intf_ErrMsg("vout error: can't get fb info (%s)", strerror(errno) );
514 close( p_vout->p_sys->i_fd );
518 if( ioctl( p_vout->p_sys->i_fd,
519 FBIOGET_VSCREENINFO, &p_vout->p_sys->old_info ) )
521 intf_ErrMsg("vout error: can't get 2nd fb info (%s)", strerror(errno) );
522 close( p_vout->p_sys->i_fd );
526 /* Set some attributes */
527 p_vout->p_sys->var_info.activate = FB_ACTIVATE_NXTOPEN;
528 p_vout->p_sys->var_info.xoffset = 0;
529 p_vout->p_sys->var_info.yoffset = 0;
531 if( ioctl( p_vout->p_sys->i_fd,
532 FBIOPUT_VSCREENINFO, &p_vout->p_sys->var_info ) )
534 intf_ErrMsg(" vout error: can't set fb info (%s)", strerror(errno) );
535 close( p_vout->p_sys->i_fd );
539 /* Get some informations again, in the definitive configuration */
540 if( ioctl( p_vout->p_sys->i_fd, FBIOGET_FSCREENINFO, &fix_info )
541 || ioctl( p_vout->p_sys->i_fd,
542 FBIOGET_VSCREENINFO, &p_vout->p_sys->var_info ) )
544 intf_ErrMsg( "vout error: can't get additional fb info (%s)",
547 /* Restore fb config */
548 ioctl( p_vout->p_sys->i_fd,
549 FBIOPUT_VSCREENINFO, &p_vout->p_sys->var_info );
551 close( p_vout->p_sys->i_fd );
555 /* FIXME: if the image is full-size, it gets cropped on the left
556 * because of the xres / xres_virtual slight difference */
557 intf_WarnMsg( 3, "vout: %ix%i (virtual %ix%i)",
558 p_vout->p_sys->var_info.xres, p_vout->p_sys->var_info.yres,
559 p_vout->p_sys->var_info.xres_virtual,
560 p_vout->p_sys->var_info.yres_virtual );
562 p_vout->p_sys->i_height = p_vout->p_sys->var_info.yres;
563 p_vout->p_sys->i_width = p_vout->p_sys->var_info.xres_virtual
564 ? p_vout->p_sys->var_info.xres_virtual
565 : p_vout->p_sys->var_info.xres;
567 p_vout->p_sys->p_palette = NULL;
568 p_vout->p_sys->b_pan = ( fix_info.ypanstep || fix_info.ywrapstep );
570 switch( p_vout->p_sys->var_info.bits_per_pixel )
573 p_vout->p_sys->p_palette = malloc( 8 * 256 * sizeof( u16 ) );
574 p_vout->p_sys->fb_cmap.start = 0;
575 p_vout->p_sys->fb_cmap.len = 256;
576 p_vout->p_sys->fb_cmap.red = p_vout->p_sys->p_palette;
577 p_vout->p_sys->fb_cmap.green = p_vout->p_sys->p_palette + 256 * sizeof( u16 );
578 p_vout->p_sys->fb_cmap.blue = p_vout->p_sys->p_palette + 2 * 256 * sizeof( u16 );
579 p_vout->p_sys->fb_cmap.transp = p_vout->p_sys->p_palette + 3 * 256 * sizeof( u16 );
581 /* Save the colormap */
582 ioctl( p_vout->p_sys->i_fd, FBIOGETCMAP, &p_vout->p_sys->fb_cmap );
584 p_vout->p_sys->i_bytes_per_pixel = 1;
589 p_vout->p_sys->i_bytes_per_pixel = 2;
593 p_vout->p_sys->i_bytes_per_pixel = 3;
597 p_vout->p_sys->i_bytes_per_pixel = 4;
601 intf_ErrMsg( "vout error: screen depth %d is not supported",
602 p_vout->p_sys->var_info.bits_per_pixel );
604 /* Restore fb config */
605 ioctl( p_vout->p_sys->i_fd,
606 FBIOPUT_VSCREENINFO, &p_vout->p_sys->var_info );
608 close( p_vout->p_sys->i_fd );
612 p_vout->p_sys->i_page_size = p_vout->p_sys->i_width *
613 p_vout->p_sys->i_height * p_vout->p_sys->i_bytes_per_pixel;
615 /* Map a framebuffer at the beginning */
616 p_vout->p_sys->p_video = mmap( 0, p_vout->p_sys->i_page_size,
617 PROT_READ | PROT_WRITE, MAP_SHARED,
618 p_vout->p_sys->i_fd, 0 );
620 if( p_vout->p_sys->p_video == ((void*)-1) )
622 intf_ErrMsg( "vout error: can't map video memory (%s)",
625 if( p_vout->p_sys->var_info.bits_per_pixel == 8 )
627 free( p_vout->p_sys->p_palette );
630 /* Restore fb config */
631 ioctl( p_vout->p_sys->i_fd,
632 FBIOPUT_VSCREENINFO, &p_vout->p_sys->var_info );
634 close( p_vout->p_sys->i_fd );
638 intf_WarnMsg( 4, "vout: framebuffer type=%d, visual=%d, ypanstep=%d, "
639 "ywrap=%d, accel=%d", fix_info.type, fix_info.visual,
640 fix_info.ypanstep, fix_info.ywrapstep, fix_info.accel );
644 /*****************************************************************************
645 * CloseDisplay: terminate FB video thread output method
646 *****************************************************************************/
647 static void CloseDisplay( vout_thread_t *p_vout )
650 memset( p_vout->p_sys->p_video, 0, p_vout->p_sys->i_page_size );
652 /* Restore palette */
653 if( p_vout->p_sys->var_info.bits_per_pixel == 8 );
655 ioctl( p_vout->p_sys->i_fd,
656 FBIOPUTCMAP, &p_vout->p_sys->fb_cmap );
657 free( p_vout->p_sys->p_palette );
660 /* Restore fb config */
661 ioctl( p_vout->p_sys->i_fd,
662 FBIOPUT_VSCREENINFO, &p_vout->p_sys->var_info );
665 close( p_vout->p_sys->i_fd );
668 /*****************************************************************************
669 * SwitchDisplay: VT change signal handler
670 *****************************************************************************
671 * This function activates or deactivates the output of the thread. It is
672 * called by the VT driver, on terminal change.
673 *****************************************************************************/
674 static void SwitchDisplay(int i_signal)
677 vout_thread_t *p_vout;
679 vlc_mutex_lock( &p_vout_bank->lock );
681 /* XXX: only test the first video output */
682 if( p_vout_bank->i_count )
684 p_vout = p_vout_bank->pp_vout[0];
688 case SIGUSR1: /* vt has been released */
689 p_vout->b_active = 0;
690 ioctl( p_vout->p_sys->i_tty, VT_RELDISP, 1 );
692 case SIGUSR2: /* vt has been acquired */
693 p_vout->b_active = 1;
694 ioctl( p_vout->p_sys->i_tty, VT_RELDISP, VT_ACTIVATE );
695 /* handle blanking */
696 vlc_mutex_lock( &p_vout->change_lock );
697 p_vout->i_changes |= VOUT_SIZE_CHANGE;
698 vlc_mutex_unlock( &p_vout->change_lock );
703 vlc_mutex_unlock( &p_vout_bank->lock );
707 /*****************************************************************************
708 * TextMode and GfxMode : switch tty to text/graphic mode
709 *****************************************************************************
710 * These functions toggle the tty mode.
711 *****************************************************************************/
712 static void TextMode( int i_tty )
714 /* return to text mode */
715 if( -1 == ioctl(i_tty, KDSETMODE, KD_TEXT) )
717 intf_ErrMsg( "intf error: failed ioctl KDSETMODE KD_TEXT" );
721 static void GfxMode( int i_tty )
723 /* switch to graphic mode */
724 if( -1 == ioctl(i_tty, KDSETMODE, KD_GRAPHICS) )
726 intf_ErrMsg( "intf error: failed ioctl KDSETMODE KD_GRAPHICS" );