Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
07cf5ddf
Commit
07cf5ddf
authored
Dec 01, 2002
by
James Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made fbcon modular.
parent
3b6dbf19
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
96 additions
and
88 deletions
+96
-88
drivers/char/mem.c
drivers/char/mem.c
+0
-12
drivers/char/vt.c
drivers/char/vt.c
+18
-0
drivers/video/cfbcopyarea.c
drivers/video/cfbcopyarea.c
+2
-0
drivers/video/cfbfillrect.c
drivers/video/cfbfillrect.c
+2
-0
drivers/video/cfbimgblt.c
drivers/video/cfbimgblt.c
+2
-0
drivers/video/console/Kconfig
drivers/video/console/Kconfig
+17
-17
drivers/video/console/Makefile
drivers/video/console/Makefile
+28
-12
drivers/video/console/fbcon.c
drivers/video/console/fbcon.c
+22
-13
drivers/video/console/fbcon.h
drivers/video/console/fbcon.h
+1
-1
drivers/video/fbmem.c
drivers/video/fbmem.c
+4
-33
No files found.
drivers/char/mem.c
View file @
07cf5ddf
...
@@ -33,12 +33,6 @@ extern int i2c_init_all(void);
...
@@ -33,12 +33,6 @@ extern int i2c_init_all(void);
#ifdef CONFIG_FB
#ifdef CONFIG_FB
extern
void
fbmem_init
(
void
);
extern
void
fbmem_init
(
void
);
#endif
#endif
#ifdef CONFIG_PROM_CONSOLE
extern
void
prom_con_init
(
void
);
#endif
#ifdef CONFIG_MDA_CONSOLE
extern
void
mda_console_init
(
void
);
#endif
#if defined(CONFIG_S390_TAPE) && defined(CONFIG_S390_TAPE_CHAR)
#if defined(CONFIG_S390_TAPE) && defined(CONFIG_S390_TAPE_CHAR)
extern
void
tapechar_init
(
void
);
extern
void
tapechar_init
(
void
);
#endif
#endif
...
@@ -685,12 +679,6 @@ int __init chr_dev_init(void)
...
@@ -685,12 +679,6 @@ int __init chr_dev_init(void)
#endif
#endif
#if defined (CONFIG_FB)
#if defined (CONFIG_FB)
fbmem_init
();
fbmem_init
();
#endif
#if defined (CONFIG_PROM_CONSOLE)
prom_con_init
();
#endif
#if defined (CONFIG_MDA_CONSOLE)
mda_console_init
();
#endif
#endif
tty_init
();
tty_init
();
#ifdef CONFIG_M68K_PRINTER
#ifdef CONFIG_M68K_PRINTER
...
...
drivers/char/vt.c
View file @
07cf5ddf
...
@@ -126,6 +126,15 @@ const struct consw *conswitchp;
...
@@ -126,6 +126,15 @@ const struct consw *conswitchp;
extern
void
vcs_make_devfs
(
unsigned
int
index
,
int
unregister
);
extern
void
vcs_make_devfs
(
unsigned
int
index
,
int
unregister
);
extern
void
console_map_init
(
void
);
extern
void
console_map_init
(
void
);
#ifdef CONFIG_PROM_CONSOLE
extern
void
prom_con_init
(
void
);
#endif
#ifdef CONFIG_MDA_CONSOLE
extern
void
mda_console_init
(
void
);
#endif
#ifdef CONFIG_FRAMEBUFFER_CONSOLE
extern
int
fb_console_init
(
void
);
#endif
static
struct
tty_struct
*
console_table
[
MAX_NR_CONSOLES
];
static
struct
tty_struct
*
console_table
[
MAX_NR_CONSOLES
];
static
struct
termios
*
console_termios
[
MAX_NR_CONSOLES
];
static
struct
termios
*
console_termios
[
MAX_NR_CONSOLES
];
...
@@ -2524,6 +2533,15 @@ int __init vty_init(void)
...
@@ -2524,6 +2533,15 @@ int __init vty_init(void)
kbd_init
();
kbd_init
();
console_map_init
();
console_map_init
();
#ifdef CONFIG_PROM_CONSOLE
prom_con_init
();
#endif
#ifdef CONFIG_MDA_CONSOLE
mda_console_init
();
#endif
#ifdef CONFIG_FRAMEBUFFER_CONSOLE
fb_console_init
();
#endif
con_init_devfs
();
con_init_devfs
();
vcs_init
();
vcs_init
();
return
0
;
return
0
;
...
...
drivers/video/cfbcopyarea.c
View file @
07cf5ddf
...
@@ -400,8 +400,10 @@ void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area)
...
@@ -400,8 +400,10 @@ void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area)
}
}
}
}
#ifdef MODULE
int
init_module
(
void
)
{
return
0
;
};
int
init_module
(
void
)
{
return
0
;
};
void
cleanup_module
(
void
)
{};
void
cleanup_module
(
void
)
{};
#endif
EXPORT_SYMBOL
(
cfb_copyarea
);
EXPORT_SYMBOL
(
cfb_copyarea
);
...
...
drivers/video/cfbfillrect.c
View file @
07cf5ddf
...
@@ -443,8 +443,10 @@ void cfb_fillrect(struct fb_info *p, struct fb_fillrect *rect)
...
@@ -443,8 +443,10 @@ void cfb_fillrect(struct fb_info *p, struct fb_fillrect *rect)
}
}
}
}
#ifdef MODULE
int
init_module
(
void
)
{
return
0
;
};
int
init_module
(
void
)
{
return
0
;
};
void
cleanup_module
(
void
)
{};
void
cleanup_module
(
void
)
{};
#endif
EXPORT_SYMBOL
(
cfb_fillrect
);
EXPORT_SYMBOL
(
cfb_fillrect
);
...
...
drivers/video/cfbimgblt.c
View file @
07cf5ddf
...
@@ -342,8 +342,10 @@ void cfb_imageblit(struct fb_info *p, struct fb_image *image)
...
@@ -342,8 +342,10 @@ void cfb_imageblit(struct fb_info *p, struct fb_image *image)
color_imageblit
(
image
,
p
,
dst1
,
start_index
,
pitch_index
);
color_imageblit
(
image
,
p
,
dst1
,
start_index
,
pitch_index
);
}
}
#ifdef MODULE
int
init_module
(
void
)
{
return
0
;
};
int
init_module
(
void
)
{
return
0
;
};
void
cleanup_module
(
void
)
{};
void
cleanup_module
(
void
)
{};
#endif
EXPORT_SYMBOL
(
cfb_imageblit
);
EXPORT_SYMBOL
(
cfb_imageblit
);
...
...
drivers/video/console/Kconfig
View file @
07cf5ddf
...
@@ -125,7 +125,7 @@ config FBCON_STI
...
@@ -125,7 +125,7 @@ config FBCON_STI
depends on !FBCON_ADVANCED && FRAMEBUFFER_CONSOLE && FB_STI
depends on !FBCON_ADVANCED && FRAMEBUFFER_CONSOLE && FB_STI
default y
default y
config F
BCON_F
ONTWIDTH8_ONLY
config FONTWIDTH8_ONLY
bool "Support only 8 pixels wide fonts"
bool "Support only 8 pixels wide fonts"
depends on FRAMEBUFFER_CONSOLE
depends on FRAMEBUFFER_CONSOLE
help
help
...
@@ -136,19 +136,19 @@ config FBCON_FONTWIDTH8_ONLY
...
@@ -136,19 +136,19 @@ config FBCON_FONTWIDTH8_ONLY
config FONT_SUN8x16
config FONT_SUN8x16
bool "Sparc console 8x16 font"
bool "Sparc console 8x16 font"
depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && F
BCON_F
ONTS || SPARC32 || SPARC64)
depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64)
help
help
This is the high resolution console font for Sun machines. Say Y.
This is the high resolution console font for Sun machines. Say Y.
config FONT_SUN12x22
config FONT_SUN12x22
bool "Sparc console 12x22 font (not supported by all drivers)"
bool "Sparc console 12x22 font (not supported by all drivers)"
depends on FRAMEBUFFER_CONSOLE && !F
BCON_FONTWIDTH8_ONLY && (!SPARC32 && !SPARC64 && FBCON_
FONTS || SPARC32 || SPARC64)
depends on FRAMEBUFFER_CONSOLE && !F
ONTWIDTH8_ONLY && (!SPARC32 && !SPARC64 &&
FONTS || SPARC32 || SPARC64)
help
help
This is the high resolution console font for Sun machines with very
This is the high resolution console font for Sun machines with very
big letters (like the letters used in the SPARC PROM). If the
big letters (like the letters used in the SPARC PROM). If the
standard font is unreadable for you, say Y, otherwise say N.
standard font is unreadable for you, say Y, otherwise say N.
config F
BCON_F
ONTS
config FONTS
bool "Select other fonts" if SPARC32 || SPARC64
bool "Select other fonts" if SPARC32 || SPARC64
depends on FRAMEBUFFER_CONSOLE
depends on FRAMEBUFFER_CONSOLE
help
help
...
@@ -161,14 +161,14 @@ config FBCON_FONTS
...
@@ -161,14 +161,14 @@ config FBCON_FONTS
If unsure, say N (the default choices are safe).
If unsure, say N (the default choices are safe).
config F
BCON_F
ONTS
config FONTS
prompt "Select compiled-in fonts"
prompt "Select compiled-in fonts"
depends on FRAMEBUFFER_CONSOLE && !SPARC32 && !SPARC64
depends on FRAMEBUFFER_CONSOLE && !SPARC32 && !SPARC64
config FONT_8x8
config FONT_8x8
bool "VGA 8x8 font" if F
BCON_F
ONTS
bool "VGA 8x8 font" if FONTS
depends on FRAMEBUFFER_CONSOLE
depends on FRAMEBUFFER_CONSOLE
default y if !SPARC32 && !SPARC64 && !F
BCON_F
ONTS
default y if !SPARC32 && !SPARC64 && !FONTS
help
help
This is the "high resolution" font for the VGA frame buffer (the one
This is the "high resolution" font for the VGA frame buffer (the one
provided by the text console 80x50 (and higher) modes).
provided by the text console 80x50 (and higher) modes).
...
@@ -180,9 +180,9 @@ config FONT_8x8
...
@@ -180,9 +180,9 @@ config FONT_8x8
here is safe.
here is safe.
config FONT_8x16
config FONT_8x16
bool "VGA 8x16 font" if F
BCON_F
ONTS
bool "VGA 8x16 font" if FONTS
depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE=y
depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE=y
default y if !SPARC32 && !SPARC64 && !F
BCON_F
ONTS
default y if !SPARC32 && !SPARC64 && !FONTS
help
help
This is the "high resolution" font for the VGA frame buffer (the one
This is the "high resolution" font for the VGA frame buffer (the one
provided by the VGA text console 80x25 mode.
provided by the VGA text console 80x25 mode.
...
@@ -190,32 +190,32 @@ config FONT_8x16
...
@@ -190,32 +190,32 @@ config FONT_8x16
If unsure, say Y.
If unsure, say Y.
config FONT_6x11
config FONT_6x11
bool "Mac console 6x11 font (not supported by all drivers)" if F
BCON_F
ONTS
bool "Mac console 6x11 font (not supported by all drivers)" if FONTS
depends on FRAMEBUFFER_CONSOLE && !F
BCON_F
ONTWIDTH8_ONLY
depends on FRAMEBUFFER_CONSOLE && !FONTWIDTH8_ONLY
default y if !SPARC32 && !SPARC64 && !F
BCON_F
ONTS && MAC
default y if !SPARC32 && !SPARC64 && !FONTS && MAC
help
help
Small console font with Macintosh-style high-half glyphs. Some Mac
Small console font with Macintosh-style high-half glyphs. Some Mac
framebuffer drivers don't support this one at all.
framebuffer drivers don't support this one at all.
config FONT_PEARL_8x8
config FONT_PEARL_8x8
bool "Pearl (old m68k) console 8x8 font" if F
BCON_F
ONTS
bool "Pearl (old m68k) console 8x8 font" if FONTS
depends on FRAMEBUFFER_CONSOLE
depends on FRAMEBUFFER_CONSOLE
default y if !SPARC32 && !SPARC64 && !F
BCON_F
ONTS && AMIGA
default y if !SPARC32 && !SPARC64 && !FONTS && AMIGA
help
help
Small console font with PC-style control-character and high-half
Small console font with PC-style control-character and high-half
glyphs.
glyphs.
config FONT_ACORN_8x8
config FONT_ACORN_8x8
bool "Acorn console 8x8 font" if F
BCON_F
ONTS
bool "Acorn console 8x8 font" if FONTS
depends on FRAMEBUFFER_CONSOLE
depends on FRAMEBUFFER_CONSOLE
default y if !SPARC32 && !SPARC64 && !F
BCON_F
ONTS && ARM && ARCH_ACORN
default y if !SPARC32 && !SPARC64 && !FONTS && ARM && ARCH_ACORN
help
help
Small console font with PC-style control characters and high-half
Small console font with PC-style control characters and high-half
glyphs.
glyphs.
config FONT_MINI_4x6
config FONT_MINI_4x6
bool "Mini 4x6 font"
bool "Mini 4x6 font"
depends on !SPARC32 && !SPARC64 && F
BCON_F
ONTS
depends on !SPARC32 && !SPARC64 && FONTS
endmenu
endmenu
drivers/video/console/Makefile
View file @
07cf5ddf
...
@@ -7,6 +7,34 @@
...
@@ -7,6 +7,34 @@
export-objs
:=
fbcon.o fonts.o
export-objs
:=
fbcon.o fonts.o
# Font handling
font-objs
:=
fonts.o
ifeq
($(CONFIG_FONT_SUN8x16),y)
font-objs
+=
font_sun8x16.o
endif
ifeq
($(CONFIG_FONT_SUN12x22),y)
font-objs
+=
font_sun12x22.o
endif
ifeq
($(CONFIG_FONT_8x8),y)
font-objs
+=
font_8x8.o
endif
ifeq
($(CONFIG_FONT_8x16),y)
font-objs
+=
font_8x16.o
endif
ifeq
($(CONFIG_FONT_6x11),y)
font-objs
+=
font_6x11.o
endif
ifeq
($(CONFIG_FONT_PEARL_8x8),y)
font-objs
+=
font_pearl_8x8.o
endif
ifeq
($(CONFIG_FONT_ACORN_8x8),y)
font-objs
+=
font_acorn_8x8.o
endif
ifeq
($(CONFIG_FONT_MINI_4x6),y)
font-objs
+=
font_mini_4x6.o
endif
# Each configuration option enables a list of files.
# Each configuration option enables a list of files.
obj-$(CONFIG_DUMMY_CONSOLE)
+=
dummycon.o
obj-$(CONFIG_DUMMY_CONSOLE)
+=
dummycon.o
...
@@ -17,18 +45,6 @@ obj-$(CONFIG_VGA_CONSOLE) += vgacon.o
...
@@ -17,18 +45,6 @@ obj-$(CONFIG_VGA_CONSOLE) += vgacon.o
obj-$(CONFIG_MDA_CONSOLE)
+=
mdacon.o
obj-$(CONFIG_MDA_CONSOLE)
+=
mdacon.o
obj-$(CONFIG_FRAMEBUFFER_CONSOLE)
+=
fbcon.o font.o
obj-$(CONFIG_FRAMEBUFFER_CONSOLE)
+=
fbcon.o font.o
obj-$(CONFIG_FONT_SUN8x16)
+=
font_sun8x16.o
obj-$(CONFIG_FONT_SUN12x22)
+=
font_sun12x22.o
obj-$(CONFIG_FONT_8x8)
+=
font_8x8.o
obj-$(CONFIG_FONT_8x16)
+=
font_8x16.o
obj-$(CONFIG_FONT_6x11)
+=
font_6x11.o
obj-$(CONFIG_FONT_PEARL_8x8)
+=
font_pearl_8x8.o
obj-$(CONFIG_FONT_ACORN_8x8)
+=
font_acorn_8x8.o
obj-$(CONFIG_FONT_MINI_4x6)
+=
font_mini_4x6.o
font-objs
:=
fonts.o font_sun8x16.o font_sun12x22.o font_8x8.o font_8x16.o
\
font_6x11.o font_pearl_8x8.o font_acorn_8x8.o font_mini_4x6.o
# Generic Low Level Drivers
# Generic Low Level Drivers
obj-$(CONFIG_FBCON_STI)
+=
fbcon-sti.o
obj-$(CONFIG_FBCON_STI)
+=
fbcon-sti.o
...
...
drivers/video/console/fbcon.c
View file @
07cf5ddf
...
@@ -234,7 +234,7 @@ static void cursor_timer_handler(unsigned long dev_addr)
...
@@ -234,7 +234,7 @@ static void cursor_timer_handler(unsigned long dev_addr)
add_timer
(
&
cursor_timer
);
add_timer
(
&
cursor_timer
);
}
}
static
int
__init
fb
console_setup
(
char
*
this_opt
)
int
__init
fb_
console_setup
(
char
*
this_opt
)
{
{
int
unit
,
i
,
j
;
int
unit
,
i
,
j
;
char
*
options
;
char
*
options
;
...
@@ -289,7 +289,7 @@ static int __init fbconsole_setup(char *this_opt)
...
@@ -289,7 +289,7 @@ static int __init fbconsole_setup(char *this_opt)
return
0
;
return
0
;
}
}
__setup
(
"fbcon="
,
fbconsole_setup
);
__setup
(
"fbcon="
,
fb
_
console_setup
);
void
gen_set_disp
(
int
con
,
struct
fb_info
*
info
)
void
gen_set_disp
(
int
con
,
struct
fb_info
*
info
)
{
{
...
@@ -551,6 +551,7 @@ static const char *fbcon_startup(void)
...
@@ -551,6 +551,7 @@ static const char *fbcon_startup(void)
{
{
const
char
*
display_desc
=
"frame buffer device"
;
const
char
*
display_desc
=
"frame buffer device"
;
struct
font_desc
*
font
=
NULL
;
struct
font_desc
*
font
=
NULL
;
struct
module
*
owner
;
struct
fb_info
*
info
;
struct
fb_info
*
info
;
struct
vc_data
*
vc
;
struct
vc_data
*
vc
;
static
int
done
=
0
;
static
int
done
=
0
;
...
@@ -566,7 +567,14 @@ static const char *fbcon_startup(void)
...
@@ -566,7 +567,14 @@ static const char *fbcon_startup(void)
info
=
registered_fb
[
num_registered_fb
-
1
];
info
=
registered_fb
[
num_registered_fb
-
1
];
if
(
!
info
)
return
NULL
;
if
(
!
info
)
return
NULL
;
info
->
currcon
=
-
1
;
owner
=
info
->
fbops
->
owner
;
if
(
owner
)
__MOD_INC_USE_COUNT
(
owner
);
if
(
info
->
fbops
->
fb_open
&&
info
->
fbops
->
fb_open
(
info
,
0
)
&&
owner
)
__MOD_DEC_USE_COUNT
(
owner
);
if
(
info
->
fix
.
type
!=
FB_TYPE_TEXT
)
{
if
(
info
->
fix
.
type
!=
FB_TYPE_TEXT
)
{
if
(
fbcon_softback_size
)
{
if
(
fbcon_softback_size
)
{
if
(
!
softback_buf
)
{
if
(
!
softback_buf
)
{
...
@@ -768,7 +776,7 @@ static int fbcon_changevar(int con)
...
@@ -768,7 +776,7 @@ static int fbcon_changevar(int con)
p
->
fontdata
=
font
->
data
;
p
->
fontdata
=
font
->
data
;
}
}
#ifdef F
BCON_F
ONTWIDTH8_ONLY
#ifdef FONTWIDTH8_ONLY
if
(
!
fontwidthvalid
(
p
,
vc
->
vc_font
.
width
))
{
if
(
!
fontwidthvalid
(
p
,
vc
->
vc_font
.
width
))
{
/* ++Geert: changed from panic() to `correct and continue' */
/* ++Geert: changed from panic() to `correct and continue' */
printk
(
KERN_ERR
printk
(
KERN_ERR
...
@@ -912,7 +920,7 @@ static void fbcon_set_display(int con, int init, int logo)
...
@@ -912,7 +920,7 @@ static void fbcon_set_display(int con, int init, int logo)
p
->
fontdata
=
font
->
data
;
p
->
fontdata
=
font
->
data
;
}
}
#ifdef F
BCON_F
ONTWIDTH8_ONLY
#ifdef FONTWIDTH8_ONLY
if
(
!
fontwidthvalid
(
p
,
vc
->
vc_font
.
width
))
{
if
(
!
fontwidthvalid
(
p
,
vc
->
vc_font
.
width
))
{
/* ++Geert: changed from panic() to `correct and continue' */
/* ++Geert: changed from panic() to `correct and continue' */
printk
(
KERN_ERR
printk
(
KERN_ERR
...
@@ -1976,7 +1984,7 @@ static inline int fbcon_get_font(struct vc_data *vc, struct console_font_op *op)
...
@@ -1976,7 +1984,7 @@ static inline int fbcon_get_font(struct vc_data *vc, struct console_font_op *op)
u8
*
fontdata
=
p
->
fontdata
;
u8
*
fontdata
=
p
->
fontdata
;
int
i
,
j
;
int
i
,
j
;
#ifdef CONFIG_F
BCON_F
ONTWIDTH8_ONLY
#ifdef CONFIG_FONTWIDTH8_ONLY
if
(
fontwidth
(
p
)
!=
8
)
if
(
fontwidth
(
p
)
!=
8
)
return
-
EINVAL
;
return
-
EINVAL
;
#endif
#endif
...
@@ -1995,7 +2003,7 @@ static inline int fbcon_get_font(struct vc_data *vc, struct console_font_op *op)
...
@@ -1995,7 +2003,7 @@ static inline int fbcon_get_font(struct vc_data *vc, struct console_font_op *op)
fontdata
+=
j
;
fontdata
+=
j
;
}
}
}
}
#ifndef CONFIG_F
BCON_F
ONTWIDTH8_ONLY
#ifndef CONFIG_FONTWIDTH8_ONLY
else
if
(
op
->
width
<=
16
)
{
else
if
(
op
->
width
<=
16
)
{
j
=
vc
->
vc_font
.
height
*
2
;
j
=
vc
->
vc_font
.
height
*
2
;
for
(
i
=
0
;
i
<
op
->
charcount
;
i
++
)
{
for
(
i
=
0
;
i
<
op
->
charcount
;
i
++
)
{
...
@@ -2177,7 +2185,7 @@ static inline int fbcon_set_font(struct vc_data *vc, struct console_font_op *op)
...
@@ -2177,7 +2185,7 @@ static inline int fbcon_set_font(struct vc_data *vc, struct console_font_op *op)
int
i
,
k
;
int
i
,
k
;
u8
*
new_data
,
*
data
=
op
->
data
,
*
p
;
u8
*
new_data
,
*
data
=
op
->
data
,
*
p
;
#ifdef CONFIG_F
BCON_F
ONTWIDTH8_ONLY
#ifdef CONFIG_FONTWIDTH8_ONLY
if
(
w
!=
8
)
if
(
w
!=
8
)
return
-
EINVAL
;
return
-
EINVAL
;
#endif
#endif
...
@@ -2209,7 +2217,7 @@ static inline int fbcon_set_font(struct vc_data *vc, struct console_font_op *op)
...
@@ -2209,7 +2217,7 @@ static inline int fbcon_set_font(struct vc_data *vc, struct console_font_op *op)
p
+=
h
;
p
+=
h
;
}
}
}
}
#ifndef CONFIG_F
BCON_F
ONTWIDTH8_ONLY
#ifndef CONFIG_FONTWIDTH8_ONLY
else
if
(
w
<=
16
)
{
else
if
(
w
<=
16
)
{
h
*=
2
;
h
*=
2
;
for
(
i
=
0
;
i
<
op
->
charcount
;
i
++
)
{
for
(
i
=
0
;
i
<
op
->
charcount
;
i
++
)
{
...
@@ -2665,18 +2673,19 @@ const struct consw fb_con = {
...
@@ -2665,18 +2673,19 @@ const struct consw fb_con = {
.
con_getxy
=
fbcon_getxy
,
.
con_getxy
=
fbcon_getxy
,
};
};
static
int
__init
fb
console_init
(
void
)
int
__init
fb_
console_init
(
void
)
{
{
take_over_console
(
&
fb_con
,
first_fb_vc
,
last_fb_vc
,
fbcon_is_default
);
take_over_console
(
&
fb_con
,
first_fb_vc
,
last_fb_vc
,
fbcon_is_default
);
return
0
;
return
0
;
}
}
static
void
__exit
fb
console_exit
(
void
)
void
__exit
fb_
console_exit
(
void
)
{
{
give_up_console
(
&
fb_con
);
}
}
module_init
(
fbconsole_init
);
module_init
(
fb
_
console_init
);
module_exit
(
fbconsole_exit
);
module_exit
(
fb
_
console_exit
);
/*
/*
* Visible symbols for modules
* Visible symbols for modules
...
...
drivers/video/console/fbcon.h
View file @
07cf5ddf
...
@@ -53,7 +53,7 @@ extern void set_con2fb_map(int unit, int newidx);
...
@@ -53,7 +53,7 @@ extern void set_con2fb_map(int unit, int newidx);
#define fontheight(p) ((p)->_fontheight)
#define fontheight(p) ((p)->_fontheight)
#ifdef CONFIG_F
BCON_F
ONTWIDTH8_ONLY
#ifdef CONFIG_FONTWIDTH8_ONLY
/* fontwidth w is supported by dispsw */
/* fontwidth w is supported by dispsw */
#define FONTWIDTH(w) (1 << ((8) - 1))
#define FONTWIDTH(w) (1 << ((8) - 1))
...
...
drivers/video/fbmem.c
View file @
07cf5ddf
...
@@ -41,7 +41,9 @@
...
@@ -41,7 +41,9 @@
#include <asm/pgtable.h>
#include <asm/pgtable.h>
#include <linux/fb.h>
#include <linux/fb.h>
#ifdef CONFIG_FRAMEBUFFER_CONSOLE
#include "console/fbcon.h"
#endif
/*
/*
* Frame buffer device initialization and setup routines
* Frame buffer device initialization and setup routines
*/
*/
...
@@ -783,10 +785,6 @@ static devfs_handle_t devfs_handle;
...
@@ -783,10 +785,6 @@ static devfs_handle_t devfs_handle;
int
int
register_framebuffer
(
struct
fb_info
*
fb_info
)
register_framebuffer
(
struct
fb_info
*
fb_info
)
{
{
#ifdef CONFIG_FRAMEBUFFER_CONSOLE
static
int
fb_ever_opened
[
FB_MAX
];
int
j
;
#endif
char
name_buf
[
8
];
char
name_buf
[
8
];
int
i
;
int
i
;
...
@@ -797,29 +795,7 @@ register_framebuffer(struct fb_info *fb_info)
...
@@ -797,29 +795,7 @@ register_framebuffer(struct fb_info *fb_info)
if
(
!
registered_fb
[
i
])
if
(
!
registered_fb
[
i
])
break
;
break
;
fb_info
->
node
=
mk_kdev
(
FB_MAJOR
,
i
);
fb_info
->
node
=
mk_kdev
(
FB_MAJOR
,
i
);
fb_info
->
currcon
=
-
1
;
registered_fb
[
i
]
=
fb_info
;
registered_fb
[
i
]
=
fb_info
;
#ifdef CONFIG_FRAMEBUFFER_CONSOLE
if
(
!
fb_ever_opened
[
i
])
{
struct
module
*
owner
=
fb_info
->
fbops
->
owner
;
/*
* We assume initial frame buffer devices can be opened this
* many times
*/
for
(
j
=
0
;
j
<
MAX_NR_CONSOLES
;
j
++
)
if
(
con2fb_map
[
j
]
==
i
)
{
if
(
owner
)
__MOD_INC_USE_COUNT
(
owner
);
if
(
!
fb_info
->
fbops
->
fb_open
)
continue
;
if
(
!
fb_info
->
fbops
->
fb_open
(
fb_info
,
0
))
continue
;
if
(
owner
)
__MOD_DEC_USE_COUNT
(
owner
);
}
fb_ever_opened
[
i
]
=
1
;
}
#endif
sprintf
(
name_buf
,
"%d"
,
i
);
sprintf
(
name_buf
,
"%d"
,
i
);
fb_info
->
devfs_handle
=
fb_info
->
devfs_handle
=
devfs_register
(
devfs_handle
,
name_buf
,
DEVFS_FL_DEFAULT
,
devfs_register
(
devfs_handle
,
name_buf
,
DEVFS_FL_DEFAULT
,
...
@@ -842,14 +818,9 @@ register_framebuffer(struct fb_info *fb_info)
...
@@ -842,14 +818,9 @@ register_framebuffer(struct fb_info *fb_info)
int
int
unregister_framebuffer
(
struct
fb_info
*
fb_info
)
unregister_framebuffer
(
struct
fb_info
*
fb_info
)
{
{
int
i
,
j
;
int
i
;
i
=
minor
(
fb_info
->
node
);
i
=
minor
(
fb_info
->
node
);
#ifdef CONFIG_FRAMEBUFFER_CONSOLE
for
(
j
=
0
;
j
<
MAX_NR_CONSOLES
;
j
++
)
if
(
con2fb_map
[
j
]
==
i
)
return
-
EBUSY
;
#endif
if
(
!
registered_fb
[
i
])
if
(
!
registered_fb
[
i
])
return
-
EINVAL
;
return
-
EINVAL
;
devfs_unregister
(
fb_info
->
devfs_handle
);
devfs_unregister
(
fb_info
->
devfs_handle
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment