From: James L. <ja...@ak...> - 2006-08-06 04:09:46
|
I'm not so sure there is a bug in the kernel or the drivers, but I can say for sure that this code gets called. I like to run frame buffer stuff like a high-res display server. I shell into the box from another computer and have both a regular shell console and the display that is native to the Linux box. If I shell in with another console session and do anything that would open and init the frame buffer, the problem disappears. I though I could get a screen shot of the problem, but doing that makes it go away! James. :o) //########################################################################## ## int ezfb_tty_graphics() { int ret = 1; if(0 > (tty = open(EZFB_TTY_DEVICE, O_RDWR))) { perror("\nezfb ERROR: " EZFB_TTY_DEVICE " open failed"); ret = 0; } else if(0 > ioctl(tty, KDGETMODE, &tty_mode_was)) { perror("\nezfb ERROR: " EZFB_TTY_DEVICE " get mode failed"); ret = 0; } else if( (KD_GRAPHICS != tty_mode_was) && (0 > ioctl(tty, KDSETMODE, KD_GRAPHICS))) { perror("\nezfb ERROR: " EZFB_TTY_DEVICE " set graphics failed"); close(tty); ret = 0; } else { printf("tty mode was "); switch(tty_mode_was) { case KD_TEXT : printf("KD_TEXT" ); break; case KD_GRAPHICS : printf("KD_GRAPHICS" ); break; default : printf("IMPOSSIBLE!" ); break; } printf("\n"); printf("tty mode set to KD_GRAPHICS\n"); fflush(stdout); close(tty); } return ret; } //########################################################################## ## int ezfb_tty_text() { int ret = 1; if(0 > (tty = open(EZFB_TTY_DEVICE, O_RDWR))) { perror("\nezfb ERROR: " EZFB_TTY_DEVICE " open failed"); ret = 0; } else if(0 > ioctl(tty, KDSETMODE, tty_mode_was)) { perror("\nezfb ERROR: " EZFB_TTY_DEVICE " reset mode failed"); close(tty); ret = 0; } else { printf("tty mode set to "); switch(tty_mode_was) { case KD_TEXT : printf("KD_TEXT" ); break; case KD_GRAPHICS : printf("KD_GRAPHICS" ); break; default : printf("IMPOSSIBLE!" ); break; } printf("\n"); fflush(stdout); close(tty); } return ret; } //########################################################################## ## |