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
1eb6218e
Commit
1eb6218e
authored
Mar 09, 2003
by
James Simmons
Committed by
James Simmons
Mar 09, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FBDEV] Menu cleanups. Added in depenedency needed. More cleanup in fbcon layer.
parent
929c10b9
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
54 additions
and
98 deletions
+54
-98
Documentation/fb/cirrusfb.txt
Documentation/fb/cirrusfb.txt
+0
-0
drivers/video/Kconfig
drivers/video/Kconfig
+11
-7
drivers/video/cirrusfb.c
drivers/video/cirrusfb.c
+0
-0
drivers/video/console/Kconfig
drivers/video/console/Kconfig
+17
-48
drivers/video/console/fbcon.c
drivers/video/console/fbcon.c
+25
-32
drivers/video/console/fbcon.h
drivers/video/console/fbcon.h
+0
-11
include/linux/fb.h
include/linux/fb.h
+1
-0
include/video/cirrus.h
include/video/cirrus.h
+0
-0
No files found.
Documentation/fb/c
lgen
fb.txt
→
Documentation/fb/c
irrus
fb.txt
View file @
1eb6218e
File moved
drivers/video/Kconfig
View file @
1eb6218e
...
@@ -38,7 +38,7 @@ config FB
...
@@ -38,7 +38,7 @@ config FB
(e.g. an accelerated X server) and that are not frame buffer
(e.g. an accelerated X server) and that are not frame buffer
device-aware may cause unexpected results. If unsure, say N.
device-aware may cause unexpected results. If unsure, say N.
config FB_C
LGEN
config FB_C
IRRUS
tristate "Cirrus Logic support"
tristate "Cirrus Logic support"
depends on FB && (AMIGA || PCI)
depends on FB && (AMIGA || PCI)
---help---
---help---
...
@@ -48,7 +48,7 @@ config FB_CLGEN
...
@@ -48,7 +48,7 @@ config FB_CLGEN
If you have a PCI-based system, this enables support for these
If you have a PCI-based system, this enables support for these
chips: GD-543x, GD-544x, GD-5480.
chips: GD-543x, GD-544x, GD-5480.
Please read the file <file:Documentation/fb/c
lgen
fb.txt>.
Please read the file <file:Documentation/fb/c
irrus
fb.txt>.
Say N unless you have such a graphics board or plan to get one
Say N unless you have such a graphics board or plan to get one
before you next recompile the kernel.
before you next recompile the kernel.
...
@@ -282,7 +282,7 @@ config FB_S3TRIO
...
@@ -282,7 +282,7 @@ config FB_S3TRIO
If you have a S3 Trio say Y. Say N for S3 Virge.
If you have a S3 Trio say Y. Say N for S3 Virge.
config FB_VGA16
config FB_VGA16
tristate "VGA 16-color graphics
console
"
tristate "VGA 16-color graphics
support
"
depends on FB && (X86 || PPC)
depends on FB && (X86 || PPC)
help
help
This is the frame buffer device driver for VGA 16 color graphic
This is the frame buffer device driver for VGA 16 color graphic
...
@@ -329,7 +329,7 @@ config FB_TGA
...
@@ -329,7 +329,7 @@ config FB_TGA
cards. Say Y if you have one of those.
cards. Say Y if you have one of those.
config FB_VESA
config FB_VESA
bool "VESA VGA graphics
console
"
bool "VESA VGA graphics
support
"
depends on FB && (X86 || X86_64)
depends on FB && (X86 || X86_64)
help
help
This is the frame buffer device driver for generic VESA 2.0
This is the frame buffer device driver for generic VESA 2.0
...
@@ -343,7 +343,7 @@ config VIDEO_SELECT
...
@@ -343,7 +343,7 @@ config VIDEO_SELECT
default y
default y
config FB_HGA
config FB_HGA
tristate "Hercules mono graphics
console
"
tristate "Hercules mono graphics
support
"
depends on FB && X86
depends on FB && X86
help
help
Say Y here if you have a Hercules mono graphics card.
Say Y here if you have a Hercules mono graphics card.
...
@@ -927,9 +927,13 @@ config FB_VIRTUAL
...
@@ -927,9 +927,13 @@ config FB_VIRTUAL
say M here and read <file:Documentation/modules.txt>.
say M here and read <file:Documentation/modules.txt>.
If unsure, say N.
If unsure, say N.
if VT
source "drivers/video/console/Kconfig"
endif
source "drivers/video/console/Kconfig"
if FB || SGI_NEWPORT_CONSOLE
source "drivers/video/logo/Kconfig"
source "drivers/video/logo/Kconfig"
endif
endmenu
endmenu
drivers/video/c
lgen
fb.c
→
drivers/video/c
irrus
fb.c
View file @
1eb6218e
File moved
drivers/video/console/Kconfig
View file @
1eb6218e
...
@@ -59,7 +59,7 @@ config MDA_CONSOLE
...
@@ -59,7 +59,7 @@ config MDA_CONSOLE
config SGI_NEWPORT_CONSOLE
config SGI_NEWPORT_CONSOLE
tristate "SGI Newport Console support"
tristate "SGI Newport Console support"
depends on SGI_IP22
depends on SGI_IP22
help
help
Say Y here if you want the console on the Newport aka XL graphics
Say Y here if you want the console on the Newport aka XL graphics
card of your Indy. Most people say Y here.
card of your Indy. Most people say Y here.
...
@@ -99,7 +99,7 @@ config PROM_CONSOLE
...
@@ -99,7 +99,7 @@ config PROM_CONSOLE
config DUMMY_CONSOLE
config DUMMY_CONSOLE
bool
bool
depends on PROM_CONSOLE!=y || VGA_CONSOLE!=y || SGI_NEWPORT_CONSOLE!=y
depends on PROM_CONSOLE!=y || VGA_CONSOLE!=y || SGI_NEWPORT_CONSOLE!=y
default y
default y
config FRAMEBUFFER_CONSOLE
config FRAMEBUFFER_CONSOLE
...
@@ -111,49 +111,8 @@ config PCI_CONSOLE
...
@@ -111,49 +111,8 @@ config PCI_CONSOLE
depends on FRAMEBUFFER_CONSOLE
depends on FRAMEBUFFER_CONSOLE
default y
default y
config FBCON_ADVANCED
bool "Advanced low level driver options"
depends on FRAMEBUFFER_CONSOLE
---help---
The frame buffer console uses character drawing routines that are
tailored to the specific organization of pixels in the memory of
your graphics hardware. These are called the low level frame buffer
console drivers. Note that they are used for text console output
only; they are NOT needed for graphical applications.
If you say N here, the needed low level drivers are automatically
enabled, depending on what frame buffer devices you selected above.
This is recommended for most users.
If you say Y here, you have more fine-grained control over which low
level drivers are enabled. You can e.g. leave out low level drivers
for color depths you do not intend to use for text consoles.
Low level frame buffer console drivers can be modules ( = code which
can be inserted and removed from the running kernel whenever you
want). The modules will be called fbcon-*. If you want to compile
(some of) them as modules, read <file:Documentation/modules.txt>.
If unsure, say N.
# Guess what we need
config FONT_SUN8x16
bool "Sparc console 8x16 font"
depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64)
help
This is the high resolution console font for Sun machines. Say Y.
config FONT_SUN12x22
bool "Sparc console 12x22 font (not supported by all drivers)"
depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64)
help
This is the high resolution console font for Sun machines with very
big letters (like the letters used in the SPARC PROM). If the
standard font is unreadable for you, say Y, otherwise say N.
config FONTS
config FONTS
bool "Select
other fonts" if SPARC32 || SPARC64
bool "Select
compiled-in fonts"
depends on FRAMEBUFFER_CONSOLE
depends on FRAMEBUFFER_CONSOLE
help
help
Say Y here if you would like to use fonts other than the default
Say Y here if you would like to use fonts other than the default
...
@@ -165,10 +124,6 @@ config FONTS
...
@@ -165,10 +124,6 @@ config FONTS
If unsure, say N (the default choices are safe).
If unsure, say N (the default choices are safe).
config FONTS
prompt "Select compiled-in fonts"
depends on FRAMEBUFFER_CONSOLE && !SPARC32 && !SPARC64
config FONT_8x8
config FONT_8x8
bool "VGA 8x8 font" if FONTS
bool "VGA 8x8 font" if FONTS
depends on FRAMEBUFFER_CONSOLE
depends on FRAMEBUFFER_CONSOLE
...
@@ -221,5 +176,19 @@ config FONT_MINI_4x6
...
@@ -221,5 +176,19 @@ config FONT_MINI_4x6
bool "Mini 4x6 font"
bool "Mini 4x6 font"
depends on !SPARC32 && !SPARC64 && FONTS
depends on !SPARC32 && !SPARC64 && FONTS
config FONT_SUN8x16
bool "Sparc console 8x16 font"
depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64)
help
This is the high resolution console font for Sun machines. Say Y.
config FONT_SUN12x22
bool "Sparc console 12x22 font (not supported by all drivers)"
depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64)
help
This is the high resolution console font for Sun machines with very
big letters (like the letters used in the SPARC PROM). If the
standard font is unreadable for you, say Y, otherwise say N.
endmenu
endmenu
drivers/video/console/fbcon.c
View file @
1eb6218e
...
@@ -302,6 +302,7 @@ static void putcs_unaligned(struct vc_data *vc, struct display *p,
...
@@ -302,6 +302,7 @@ static void putcs_unaligned(struct vc_data *vc, struct display *p,
struct
fb_info
*
info
,
struct
fb_image
*
image
,
struct
fb_info
*
info
,
struct
fb_image
*
image
,
int
count
,
const
unsigned
short
*
s
)
int
count
,
const
unsigned
short
*
s
)
{
{
unsigned
short
charmask
=
vc
->
vc_hi_font_mask
?
0x1ff
:
0xff
;
unsigned
int
width
=
(
vc
->
vc_font
.
width
+
7
)
/
8
;
unsigned
int
width
=
(
vc
->
vc_font
.
width
+
7
)
/
8
;
unsigned
int
cellsize
=
vc
->
vc_font
.
height
*
width
;
unsigned
int
cellsize
=
vc
->
vc_font
.
height
*
width
;
unsigned
int
maxcnt
=
info
->
pixmap
.
size
/
cellsize
;
unsigned
int
maxcnt
=
info
->
pixmap
.
size
/
cellsize
;
...
@@ -310,7 +311,6 @@ static void putcs_unaligned(struct vc_data *vc, struct display *p,
...
@@ -310,7 +311,6 @@ static void putcs_unaligned(struct vc_data *vc, struct display *p,
unsigned
int
buf_align
=
info
->
pixmap
.
buf_align
-
1
;
unsigned
int
buf_align
=
info
->
pixmap
.
buf_align
-
1
;
unsigned
int
scan_align
=
info
->
pixmap
.
scan_align
-
1
;
unsigned
int
scan_align
=
info
->
pixmap
.
scan_align
-
1
;
unsigned
int
idx
=
vc
->
vc_font
.
width
/
8
;
unsigned
int
idx
=
vc
->
vc_font
.
width
/
8
;
unsigned
short
charmask
=
p
->
charmask
;
u8
mask
,
*
src
,
*
dst
,
*
dst0
;
u8
mask
,
*
src
,
*
dst
,
*
dst0
;
while
(
count
)
{
while
(
count
)
{
...
@@ -350,13 +350,13 @@ static void putcs_aligned(struct vc_data *vc, struct display *p,
...
@@ -350,13 +350,13 @@ static void putcs_aligned(struct vc_data *vc, struct display *p,
struct
fb_info
*
info
,
struct
fb_image
*
image
,
struct
fb_info
*
info
,
struct
fb_image
*
image
,
int
count
,
const
unsigned
short
*
s
)
int
count
,
const
unsigned
short
*
s
)
{
{
unsigned
short
charmask
=
vc
->
vc_hi_font_mask
?
0x1ff
:
0xff
;
unsigned
int
width
=
vc
->
vc_font
.
width
/
8
;
unsigned
int
width
=
vc
->
vc_font
.
width
/
8
;
unsigned
int
cellsize
=
vc
->
vc_font
.
height
*
width
;
unsigned
int
cellsize
=
vc
->
vc_font
.
height
*
width
;
unsigned
int
maxcnt
=
info
->
pixmap
.
size
/
cellsize
;
unsigned
int
maxcnt
=
info
->
pixmap
.
size
/
cellsize
;
unsigned
int
scan_align
=
info
->
pixmap
.
scan_align
-
1
;
unsigned
int
scan_align
=
info
->
pixmap
.
scan_align
-
1
;
unsigned
int
buf_align
=
info
->
pixmap
.
buf_align
-
1
;
unsigned
int
buf_align
=
info
->
pixmap
.
buf_align
-
1
;
unsigned
int
pitch
,
cnt
,
size
,
k
;
unsigned
int
pitch
,
cnt
,
size
,
k
;
unsigned
short
charmask
=
p
->
charmask
;
u8
*
src
,
*
dst
,
*
dst0
;
u8
*
src
,
*
dst
,
*
dst0
;
while
(
count
)
{
while
(
count
)
{
...
@@ -423,13 +423,13 @@ void accel_clear(struct vc_data *vc, struct display *p, int sy,
...
@@ -423,13 +423,13 @@ void accel_clear(struct vc_data *vc, struct display *p, int sy,
static
void
accel_putc
(
struct
vc_data
*
vc
,
struct
display
*
p
,
static
void
accel_putc
(
struct
vc_data
*
vc
,
struct
display
*
p
,
int
c
,
int
ypos
,
int
xpos
)
int
c
,
int
ypos
,
int
xpos
)
{
{
struct
fb_image
image
;
unsigned
short
charmask
=
vc
->
vc_hi_font_mask
?
0x1ff
:
0xff
;
struct
fb_info
*
info
=
p
->
fb_info
;
struct
fb_info
*
info
=
p
->
fb_info
;
unsigned
short
charmask
=
p
->
charmask
;
unsigned
int
width
=
(
vc
->
vc_font
.
width
+
7
)
/
8
;
unsigned
int
width
=
(
vc
->
vc_font
.
width
+
7
)
/
8
;
unsigned
int
size
,
pitch
;
unsigned
int
size
,
pitch
;
unsigned
int
scan_align
=
info
->
pixmap
.
scan_align
-
1
;
unsigned
int
scan_align
=
info
->
pixmap
.
scan_align
-
1
;
unsigned
int
buf_align
=
info
->
pixmap
.
buf_align
-
1
;
unsigned
int
buf_align
=
info
->
pixmap
.
buf_align
-
1
;
struct
fb_image
image
;
u8
*
src
,
*
dst
;
u8
*
src
,
*
dst
;
image
.
dx
=
xpos
*
vc
->
vc_font
.
width
;
image
.
dx
=
xpos
*
vc
->
vc_font
.
width
;
...
@@ -510,6 +510,7 @@ void accel_clear_margins(struct vc_data *vc, struct display *p,
...
@@ -510,6 +510,7 @@ void accel_clear_margins(struct vc_data *vc, struct display *p,
void
accel_cursor
(
struct
vc_data
*
vc
,
struct
display
*
p
,
int
flags
,
int
xx
,
int
yy
)
void
accel_cursor
(
struct
vc_data
*
vc
,
struct
display
*
p
,
int
flags
,
int
xx
,
int
yy
)
{
{
unsigned
short
charmask
=
vc
->
vc_hi_font_mask
?
0x1ff
:
0xff
;
static
int
fgcolor
,
bgcolor
,
shape
,
width
,
height
;
static
int
fgcolor
,
bgcolor
,
shape
,
width
,
height
;
static
char
mask
[
64
],
image
[
64
],
*
dest
;
static
char
mask
[
64
],
image
[
64
],
*
dest
;
struct
fb_info
*
info
=
p
->
fb_info
;
struct
fb_info
*
info
=
p
->
fb_info
;
...
@@ -538,7 +539,7 @@ void accel_cursor(struct vc_data *vc, struct display *p, int flags, int xx, int
...
@@ -538,7 +539,7 @@ void accel_cursor(struct vc_data *vc, struct display *p, int flags, int xx, int
bgcolor
=
(
int
)
attr_bgcol
(
p
,
c
);
bgcolor
=
(
int
)
attr_bgcol
(
p
,
c
);
cursor
.
set
|=
FB_CUR_SETCMAP
;
cursor
.
set
|=
FB_CUR_SETCMAP
;
}
}
c
&=
p
->
charmask
;
c
&=
charmask
;
font
=
p
->
fontdata
+
(
c
*
((
width
+
7
)
/
8
)
*
height
);
font
=
p
->
fontdata
+
(
c
*
((
width
+
7
)
/
8
)
*
height
);
if
(
font
!=
dest
)
{
if
(
font
!=
dest
)
{
dest
=
font
;
dest
=
font
;
...
@@ -773,7 +774,6 @@ static void fbcon_init(struct vc_data *vc, int init)
...
@@ -773,7 +774,6 @@ static void fbcon_init(struct vc_data *vc, int init)
/* on which frame buffer will we open this console? */
/* on which frame buffer will we open this console? */
info
=
registered_fb
[(
int
)
con2fb_map
[
unit
]];
info
=
registered_fb
[(
int
)
con2fb_map
[
unit
]];
fb_display
[
unit
].
can_soft_blank
=
info
->
fbops
->
fb_blank
?
1
:
0
;
if
(
info
->
var
.
accel_flags
)
if
(
info
->
var
.
accel_flags
)
fb_display
[
unit
].
scrollmode
=
SCROLL_YNOMOVE
;
fb_display
[
unit
].
scrollmode
=
SCROLL_YNOMOVE
;
else
else
...
@@ -790,8 +790,6 @@ static void fbcon_deinit(struct vc_data *vc)
...
@@ -790,8 +790,6 @@ static void fbcon_deinit(struct vc_data *vc)
fbcon_free_font
(
p
);
fbcon_free_font
(
p
);
}
}
#define fontwidthvalid(p,w) ((p)->fontwidthmask & FONTWIDTH(w))
static
__inline__
void
updatescrollmode
(
struct
display
*
p
,
struct
vc_data
*
vc
)
static
__inline__
void
updatescrollmode
(
struct
display
*
p
,
struct
vc_data
*
vc
)
{
{
struct
fb_info
*
info
=
p
->
fb_info
;
struct
fb_info
*
info
=
p
->
fb_info
;
...
@@ -828,12 +826,6 @@ static void fbcon_set_display(struct vc_data *vc, int init, int logo)
...
@@ -828,12 +826,6 @@ static void fbcon_set_display(struct vc_data *vc, int init, int logo)
info
->
var
.
xoffset
=
info
->
var
.
yoffset
=
p
->
yscroll
=
0
;
/* reset wrap/pan */
info
->
var
.
xoffset
=
info
->
var
.
yoffset
=
p
->
yscroll
=
0
;
/* reset wrap/pan */
/*
* FIXME: need to set this in order for KDFONTOP ioctl
* to work
*/
p
->
fontwidthmask
=
FONTWIDTHRANGE
(
1
,
16
);
for
(
i
=
0
;
i
<
MAX_NR_CONSOLES
;
i
++
)
for
(
i
=
0
;
i
<
MAX_NR_CONSOLES
;
i
++
)
if
(
vc
&&
i
!=
vc
->
vc_num
&&
fb_display
[
i
].
fb_info
==
info
&&
if
(
vc
&&
i
!=
vc
->
vc_num
&&
fb_display
[
i
].
fb_info
==
info
&&
fb_display
[
i
].
fontdata
)
fb_display
[
i
].
fontdata
)
...
@@ -844,7 +836,7 @@ static void fbcon_set_display(struct vc_data *vc, int init, int logo)
...
@@ -844,7 +836,7 @@ static void fbcon_set_display(struct vc_data *vc, int init, int logo)
struct
display
*
q
=
&
fb_display
[
i
];
struct
display
*
q
=
&
fb_display
[
i
];
struct
vc_data
*
tmp
=
vc_cons
[
i
].
d
;
struct
vc_data
*
tmp
=
vc_cons
[
i
].
d
;
if
(
!
fontwidthvalid
(
p
,
vc
->
vc_font
.
width
)
)
{
if
(
vc
->
vc_font
.
width
>
32
)
{
/* If we are not the first console on this
/* If we are not the first console on this
fb, copy the font from that console */
fb, copy the font from that console */
vc
->
vc_font
.
width
=
tmp
->
vc_font
.
width
;
vc
->
vc_font
.
width
=
tmp
->
vc_font
.
width
;
...
@@ -947,14 +939,12 @@ static void fbcon_set_display(struct vc_data *vc, int init, int logo)
...
@@ -947,14 +939,12 @@ static void fbcon_set_display(struct vc_data *vc, int init, int logo)
vc
->
vc_hi_font_mask
=
0
;
vc
->
vc_hi_font_mask
=
0
;
p
->
fgshift
=
8
;
p
->
fgshift
=
8
;
p
->
bgshift
=
12
;
p
->
bgshift
=
12
;
p
->
charmask
=
0xff
;
}
else
{
}
else
{
vc
->
vc_hi_font_mask
=
0x100
;
vc
->
vc_hi_font_mask
=
0x100
;
if
(
vc
->
vc_can_do_color
)
if
(
vc
->
vc_can_do_color
)
vc
->
vc_complement_mask
<<=
1
;
vc
->
vc_complement_mask
<<=
1
;
p
->
fgshift
=
9
;
p
->
fgshift
=
9
;
p
->
bgshift
=
13
;
p
->
bgshift
=
13
;
p
->
charmask
=
0x1ff
;
}
}
if
(
!
init
)
{
if
(
!
init
)
{
...
@@ -1016,7 +1006,7 @@ static void fbcon_set_display(struct vc_data *vc, int init, int logo)
...
@@ -1016,7 +1006,7 @@ static void fbcon_set_display(struct vc_data *vc, int init, int logo)
*
*
* fbcon_bmove_physical_8() -- These functions fast implementations
* fbcon_bmove_physical_8() -- These functions fast implementations
* fbcon_clear_physical_8() -- of original fbcon_XXX fns.
* fbcon_clear_physical_8() -- of original fbcon_XXX fns.
* fbcon_putc_physical_8() -- (fontwidth != 8) may be added later
* fbcon_putc_physical_8() -- (font
width != 8) may be added later
*
*
* WARNING:
* WARNING:
*
*
...
@@ -1039,10 +1029,11 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
...
@@ -1039,10 +1029,11 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
{
{
int
unit
=
vc
->
vc_num
;
int
unit
=
vc
->
vc_num
;
struct
display
*
p
=
&
fb_display
[
unit
];
struct
display
*
p
=
&
fb_display
[
unit
];
struct
fb_info
*
info
=
p
->
fb_info
;
u_int
y_break
;
u_int
y_break
;
int
redraw_cursor
=
0
;
int
redraw_cursor
=
0
;
if
(
!
p
->
can_soft
_blank
&&
console_blanked
)
if
(
!
info
->
fbops
->
fb
_blank
&&
console_blanked
)
return
;
return
;
if
(
!
height
||
!
width
)
if
(
!
height
||
!
width
)
...
@@ -1073,9 +1064,10 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
...
@@ -1073,9 +1064,10 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
static
void
fbcon_putc
(
struct
vc_data
*
vc
,
int
c
,
int
ypos
,
int
xpos
)
static
void
fbcon_putc
(
struct
vc_data
*
vc
,
int
c
,
int
ypos
,
int
xpos
)
{
{
struct
display
*
p
=
&
fb_display
[
vc
->
vc_num
];
struct
display
*
p
=
&
fb_display
[
vc
->
vc_num
];
struct
fb_info
*
info
=
p
->
fb_info
;
int
redraw_cursor
=
0
;
int
redraw_cursor
=
0
;
if
(
!
p
->
can_soft
_blank
&&
console_blanked
)
if
(
!
info
->
fbops
->
fb
_blank
&&
console_blanked
)
return
;
return
;
if
(
vt_cons
[
vc
->
vc_num
]
->
vc_mode
!=
KD_TEXT
)
if
(
vt_cons
[
vc
->
vc_num
]
->
vc_mode
!=
KD_TEXT
)
...
@@ -1098,9 +1090,10 @@ static void fbcon_putcs(struct vc_data *vc, const unsigned short *s,
...
@@ -1098,9 +1090,10 @@ static void fbcon_putcs(struct vc_data *vc, const unsigned short *s,
{
{
int
unit
=
vc
->
vc_num
;
int
unit
=
vc
->
vc_num
;
struct
display
*
p
=
&
fb_display
[
unit
];
struct
display
*
p
=
&
fb_display
[
unit
];
struct
fb_info
*
info
=
p
->
fb_info
;
int
redraw_cursor
=
0
;
int
redraw_cursor
=
0
;
if
(
!
p
->
can_soft
_blank
&&
console_blanked
)
if
(
!
info
->
fbops
->
fb
_blank
&&
console_blanked
)
return
;
return
;
if
(
vt_cons
[
unit
]
->
vc_mode
!=
KD_TEXT
)
if
(
vt_cons
[
unit
]
->
vc_mode
!=
KD_TEXT
)
...
@@ -1466,7 +1459,7 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,
...
@@ -1466,7 +1459,7 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,
struct
fb_info
*
info
=
p
->
fb_info
;
struct
fb_info
*
info
=
p
->
fb_info
;
int
scroll_partial
=
!
(
p
->
scrollmode
&
__SCROLL_YNOPARTIAL
);
int
scroll_partial
=
!
(
p
->
scrollmode
&
__SCROLL_YNOPARTIAL
);
if
(
!
p
->
can_soft
_blank
&&
console_blanked
)
if
(
!
info
->
fbops
->
fb
_blank
&&
console_blanked
)
return
0
;
return
0
;
if
(
!
count
||
vt_cons
[
unit
]
->
vc_mode
!=
KD_TEXT
)
if
(
!
count
||
vt_cons
[
unit
]
->
vc_mode
!=
KD_TEXT
)
...
@@ -1625,8 +1618,9 @@ static void fbcon_bmove(struct vc_data *vc, int sy, int sx, int dy, int dx,
...
@@ -1625,8 +1618,9 @@ static void fbcon_bmove(struct vc_data *vc, int sy, int sx, int dy, int dx,
{
{
int
unit
=
vc
->
vc_num
;
int
unit
=
vc
->
vc_num
;
struct
display
*
p
=
&
fb_display
[
unit
];
struct
display
*
p
=
&
fb_display
[
unit
];
struct
fb_info
*
info
=
p
->
fb_info
;
if
(
!
p
->
can_soft_blank
&&
console_blanked
)
if
(
!
info
->
fbops
->
fb_blank
&&
console_blanked
)
return
;
return
;
if
(
!
width
||
!
height
)
if
(
!
width
||
!
height
)
...
@@ -1791,6 +1785,7 @@ static int fbcon_switch(struct vc_data *vc)
...
@@ -1791,6 +1785,7 @@ static int fbcon_switch(struct vc_data *vc)
static
int
fbcon_blank
(
struct
vc_data
*
vc
,
int
blank
)
static
int
fbcon_blank
(
struct
vc_data
*
vc
,
int
blank
)
{
{
unsigned
short
charmask
=
vc
->
vc_hi_font_mask
?
0x1ff
:
0xff
;
struct
display
*
p
=
&
fb_display
[
vc
->
vc_num
];
struct
display
*
p
=
&
fb_display
[
vc
->
vc_num
];
struct
fb_info
*
info
=
p
->
fb_info
;
struct
fb_info
*
info
=
p
->
fb_info
;
...
@@ -1799,14 +1794,14 @@ static int fbcon_blank(struct vc_data *vc, int blank)
...
@@ -1799,14 +1794,14 @@ static int fbcon_blank(struct vc_data *vc, int blank)
fbcon_cursor
(
vc
,
blank
?
CM_ERASE
:
CM_DRAW
);
fbcon_cursor
(
vc
,
blank
?
CM_ERASE
:
CM_DRAW
);
if
(
!
p
->
can_soft
_blank
)
{
if
(
!
info
->
fbops
->
fb
_blank
)
{
if
(
blank
)
{
if
(
blank
)
{
unsigned
short
oldc
;
unsigned
short
oldc
;
u_int
height
;
u_int
height
;
u_int
y_break
;
u_int
y_break
;
oldc
=
vc
->
vc_video_erase_char
;
oldc
=
vc
->
vc_video_erase_char
;
vc
->
vc_video_erase_char
&=
p
->
charmask
;
vc
->
vc_video_erase_char
&=
charmask
;
height
=
vc
->
vc_rows
;
height
=
vc
->
vc_rows
;
y_break
=
p
->
vrows
-
p
->
yscroll
;
y_break
=
p
->
vrows
-
p
->
yscroll
;
if
(
height
>
y_break
)
{
if
(
height
>
y_break
)
{
...
@@ -1850,7 +1845,7 @@ static inline int fbcon_get_font(struct vc_data *vc, struct console_font_op *op)
...
@@ -1850,7 +1845,7 @@ static inline int fbcon_get_font(struct vc_data *vc, struct console_font_op *op)
op
->
width
=
vc
->
vc_font
.
width
;
op
->
width
=
vc
->
vc_font
.
width
;
op
->
height
=
vc
->
vc_font
.
height
;
op
->
height
=
vc
->
vc_font
.
height
;
op
->
charcount
=
(
p
->
charmask
==
0x1ff
)
?
512
:
256
;
op
->
charcount
=
vc
->
vc_hi_font_mask
?
512
:
256
;
if
(
!
op
->
data
)
if
(
!
op
->
data
)
return
0
;
return
0
;
...
@@ -1904,7 +1899,7 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op,
...
@@ -1904,7 +1899,7 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op,
int
cnt
;
int
cnt
;
char
*
old_data
=
NULL
;
char
*
old_data
=
NULL
;
if
(
!
fontwidthvalid
(
p
,
w
)
)
{
if
(
!
w
>
32
)
{
if
(
userfont
&&
op
->
op
!=
KD_FONT_OP_COPY
)
if
(
userfont
&&
op
->
op
!=
KD_FONT_OP_COPY
)
kfree
(
data
-
FONT_EXTRA_WORDS
*
sizeof
(
int
));
kfree
(
data
-
FONT_EXTRA_WORDS
*
sizeof
(
int
));
return
-
ENXIO
;
return
-
ENXIO
;
...
@@ -1931,7 +1926,6 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op,
...
@@ -1931,7 +1926,6 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op,
vc
->
vc_complement_mask
>>=
1
;
vc
->
vc_complement_mask
>>=
1
;
p
->
fgshift
--
;
p
->
fgshift
--
;
p
->
bgshift
--
;
p
->
bgshift
--
;
p
->
charmask
=
0xff
;
/* ++Edmund: reorder the attribute bits */
/* ++Edmund: reorder the attribute bits */
if
(
vc
->
vc_can_do_color
)
{
if
(
vc
->
vc_can_do_color
)
{
...
@@ -1955,7 +1949,6 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op,
...
@@ -1955,7 +1949,6 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op,
vc
->
vc_complement_mask
<<=
1
;
vc
->
vc_complement_mask
<<=
1
;
p
->
fgshift
++
;
p
->
fgshift
++
;
p
->
bgshift
++
;
p
->
bgshift
++
;
p
->
charmask
=
0x1ff
;
/* ++Edmund: reorder the attribute bits */
/* ++Edmund: reorder the attribute bits */
{
{
...
@@ -2177,7 +2170,7 @@ static int fbcon_set_palette(struct vc_data *vc, unsigned char *table)
...
@@ -2177,7 +2170,7 @@ static int fbcon_set_palette(struct vc_data *vc, unsigned char *table)
u8
val
;
u8
val
;
if
(
!
vc
->
vc_can_do_color
if
(
!
vc
->
vc_can_do_color
||
(
!
p
->
can_soft
_blank
&&
console_blanked
))
||
(
!
info
->
fbops
->
fb
_blank
&&
console_blanked
))
return
-
EINVAL
;
return
-
EINVAL
;
for
(
i
=
j
=
0
;
i
<
16
;
i
++
)
{
for
(
i
=
j
=
0
;
i
<
16
;
i
++
)
{
k
=
table
[
i
];
k
=
table
[
i
];
...
@@ -2336,7 +2329,7 @@ static int fbcon_scrolldelta(struct vc_data *vc, int lines)
...
@@ -2336,7 +2329,7 @@ static int fbcon_scrolldelta(struct vc_data *vc, int lines)
if
(
scrollback_current
==
scrollback_old
)
if
(
scrollback_current
==
scrollback_old
)
return
0
;
return
0
;
if
(
!
p
->
can_soft
_blank
&&
if
(
!
info
->
fbops
->
fb
_blank
&&
(
console_blanked
||
vt_cons
[
unit
]
->
vc_mode
!=
KD_TEXT
(
console_blanked
||
vt_cons
[
unit
]
->
vc_mode
!=
KD_TEXT
||
!
lines
))
||
!
lines
))
return
0
;
return
0
;
...
...
drivers/video/console/fbcon.h
View file @
1eb6218e
...
@@ -25,10 +25,7 @@
...
@@ -25,10 +25,7 @@
struct
display
{
struct
display
{
/* Filled in by the frame buffer device */
/* Filled in by the frame buffer device */
u_short
can_soft_blank
;
/* zero if no hardware blanking */
u_short
inverse
;
/* != 0 text black on white as default */
u_short
inverse
;
/* != 0 text black on white as default */
struct
display_switch
*
dispsw
;
/* low level operations */
/* Filled in by the low-level console driver */
/* Filled in by the low-level console driver */
struct
fb_info
*
fb_info
;
/* frame buffer for this console */
struct
fb_info
*
fb_info
;
/* frame buffer for this console */
int
vrows
;
/* number of virtual rows */
int
vrows
;
/* number of virtual rows */
...
@@ -41,20 +38,12 @@ struct display {
...
@@ -41,20 +38,12 @@ struct display {
u_short
scrollmode
;
/* Scroll Method */
u_short
scrollmode
;
/* Scroll Method */
short
yscroll
;
/* Hardware scrolling */
short
yscroll
;
/* Hardware scrolling */
unsigned
char
fgshift
,
bgshift
;
unsigned
char
fgshift
,
bgshift
;
unsigned
short
charmask
;
/* 0xff or 0x1ff */
unsigned
int
fontwidthmask
;
/* 1 at (1 << (width - 1)) if width is supported */
};
};
/* drivers/video/console/fbcon.c */
/* drivers/video/console/fbcon.c */
extern
struct
display
fb_display
[
MAX_NR_CONSOLES
];
extern
char
con2fb_map
[
MAX_NR_CONSOLES
];
extern
char
con2fb_map
[
MAX_NR_CONSOLES
];
extern
void
set_con2fb_map
(
int
unit
,
int
newidx
);
extern
void
set_con2fb_map
(
int
unit
,
int
newidx
);
/* fontwidth w is supported by dispsw */
#define FONTWIDTH(w) (1 << ((w) - 1))
/* fontwidths w1-w2 inclusive are supported by dispsw */
#define FONTWIDTHRANGE(w1,w2) (FONTWIDTH(w2+1) - FONTWIDTH(w1))
/*
/*
* Attribute Decoding
* Attribute Decoding
*/
*/
...
...
include/linux/fb.h
View file @
1eb6218e
...
@@ -343,6 +343,7 @@ struct fb_pixmap {
...
@@ -343,6 +343,7 @@ struct fb_pixmap {
u8
(
*
inbuf
)
(
u8
*
addr
);
u8
(
*
inbuf
)
(
u8
*
addr
);
unsigned
long
lock_flags
;
/* flags for locking */
unsigned
long
lock_flags
;
/* flags for locking */
spinlock_t
lock
;
/* spinlock */
spinlock_t
lock
;
/* spinlock */
atomic_t
count
;
};
};
#ifdef __KERNEL__
#ifdef __KERNEL__
...
...
drivers/video/clgenfb
.h
→
include/video/cirrus
.h
View file @
1eb6218e
File moved
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