kernels/linux-2.4.0/drivers/video/riva/fbdev.c
/**
 * riva_set_dispsw
 * @rinfo: pointer to internal driver struct for a given Riva card
 *
 * DESCRIPTION:
 * Sets up console Low level operations depending on the current? color depth
 * of the display
 */
riva_set_dispsw
@rinfo: pointer to internal driver struct for a given Riva card

Sets up console Low level operations depending on the current. color depth
of the display
riva_set_dispsw @rinfo : pointer to internal driver struct for a given Riva card Sets up console Low level operations depending on the current . color depth of the display
static void riva_set_dispsw (struct rivafb_info *rinfo)
{
	struct display *disp = &rinfo->disp;
	DPRINTK ("ENTER\n");
	assert (rinfo != NULL);
	disp->dispsw_data = NULL;
	switch (disp->var.bits_per_pixel) {
#ifdef FBCON_HAS_MFB
	case 1:
		disp->dispsw = &fbcon_mfb;
		break;
#endif
#ifdef FBCON_HAS_CFB4
	case 4:
		disp->dispsw = &fbcon_cfb4;
		break;
#endif
#ifdef FBCON_HAS_CFB8
	case 8:
		disp->dispsw = &fbcon_cfb8;
		break;
#endif
#ifdef FBCON_HAS_CFB16
	case 15:
	case 16:
		disp->dispsw = &fbcon_cfb16;
		disp->dispsw_data = &rinfo->con_cmap.cfb16;
		break;
#endif
#ifdef FBCON_HAS_CFB24
	case 24:
		disp->dispsw = &fbcon_cfb24;
		disp->dispsw_data = rinfo->con_cmap.cfb24;
		break;
#endif
#ifdef FBCON_HAS_CFB32
	case 32:
		disp->dispsw = &fbcon_cfb32;
		disp->dispsw_data = rinfo->con_cmap.cfb32;
		break;
#endif
	default:
		DPRINTK ("Setting fbcon_dummy renderer\n");
		disp->dispsw = &fbcon_dummy;
	}
	DPRINTK ("EXIT\n");
}
static void riva_set_dispsw ( struct rivafb_info * rinfo ) { struct display * disp = & rinfo -> disp ; DPRINTK ( " \n " ) ; assert ( rinfo != NULL ) ; disp -> dispsw_data = NULL ; switch ( disp -> var . bits_per_pixel ) { #ifdef FBCON_HAS_MFB case 1 : disp -> dispsw = & fbcon_mfb ; break ; #endif #ifdef FBCON_HAS_CFB4 case 4 : disp -> dispsw = & fbcon_cfb4 ; break ; #endif #ifdef FBCON_HAS_CFB8 case 8 : disp -> dispsw = & fbcon_cfb8 ; break ; #endif #ifdef FBCON_HAS_CFB16 case 15 : case 16 : disp -> dispsw = & fbcon_cfb16 ; disp -> dispsw_data = & rinfo -> con_cmap . cfb16 ; break ; #endif #ifdef FBCON_HAS_CFB24 case 24 : disp -> dispsw = & fbcon_cfb24 ; disp -> dispsw_data = rinfo -> con_cmap . cfb24 ; break ; #endif #ifdef FBCON_HAS_CFB32 case 32 : disp -> dispsw = & fbcon_cfb32 ; disp -> dispsw_data = rinfo -> con_cmap . cfb32 ; break ; #endif default : DPRINTK ( " \n " ) ; disp -> dispsw = & fbcon_dummy ; } DPRINTK ( " \n " ) ; }
riva_set_dispsw
 @rinfo: pointer to internal driver struct for a given Riva card
riva_set_dispsw @rinfo : pointer to internal driver struct for a given Riva card