Re: VESA FB & PIO_FONTX

Martin Mares (mj@ucw.cz)
Mon, 3 Aug 1998 19:03:31 +0200


Hi,

> Loading fonts into VESA FB console not so good now...,I look at vt.c and found this code:
>
> case PIO_FONTX:
> if (!perm)
> return -EPERM;
> op.op = KD_FONT_OP_SET;
> op.flags = 0;
> op.width = 8;
> op.height = cfdarg.charheight;
> op.charcount = cfdarg.charcount;
> op.data = cfdarg.chardata;
> return con_font_op(fg_console, &op);
>
>
> Is this correct ? Or this code must be something like this :
>
> case PIO_FONTX:
> if (!perm)
> return -EPERM;
> op.op = KD_FONT_OP_SET;
> op.flags = 0;
> op.width = 8;
> op.height = cfdarg.charheight;
> op.charcount = cfdarg.charcount;
> op.data = cfdarg.chardata;
> for ( i = 0 ; i < MAX_NR_CONSOLES ; i++ )
> {
> if (vc_cons_allocated(i))
> {
> rc = con_font_op(i,&op);
> /* printk( "KAD: i=%d rc=%d\n",i,rc ); */
> if ( rc < 0 ) break;
> }
> }
> return rc;
>
>
> I tested this variant but it also not fully correct. Who can correct this?

Currently both PIO_FONT and PIO_FONTX are supposed to set the font only for
the virtual console they've been called for (with exception on EGA/VGA where
the font change is global for the card). This will probably change in 2.3.X as
I'd like to remove all the compatibility crap and leave only the KDFONTOP
ioctl.

You can use KDFONTOP to copy the font to all other FB consoles you want.

Have a nice fortnight

-- 
Martin `MJ' Mares   <mj@ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"veni, vedi, nuclei deceiri - I came, I saw, I core dumped"

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html