/* * linux/drivers/video/fbmem.c * * Copyright (C) 1994 Martin Schaller * * 2001 - Documented with DocBook * - Brad Douglas <brad@neruo.com> * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive * for more details. */#include<linux/config.h>#include<linux/module.h>#include<linux/types.h>#include<linux/errno.h>#include<linux/sched.h>#include<linux/smp_lock.h>#include<linux/kernel.h>#include<linux/major.h>#include<linux/slab.h>#include<linux/mm.h>#include<linux/mman.h>#include<linux/tty.h>#include<linux/init.h>#include<linux/linux_logo.h>#include<linux/proc_fs.h>#include<linux/console.h>#ifdef CONFIG_KMOD#include<linux/kmod.h>#endif#include<linux/devfs_fs_kernel.h>#include<linux/err.h>#include<linux/kernel.h>#include<linux/device.h>#include<linux/efi.h>#if defined(__mc68000__) || defined(CONFIG_APUS)#include<asm/setup.h>#endif#include<asm/io.h>#include<asm/uaccess.h>#include<asm/page.h>#include<asm/pgtable.h>#include<linux/fb.h>/* * Frame buffer device initialization and setup routines */#define FBPIXMAPSIZE (1024 * 8)staticstructnotifier_block*fb_notifier_list;structfb_info*registered_fb[FB_MAX];intnum_registered_fb;/* * Helpers */intfb_get_color_depth(structfb_var_screeninfo*var,structfb_fix_screeninfo*fix){intdepth=0;if(fix->visual==FB_VISUAL_MONO01||fix->visual==FB_VISUAL_MONO10)depth=1;else{if(var->green.length==var->blue.length&&var->green.length==var->red.length&&