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
7aabce2b
Commit
7aabce2b
authored
Nov 18, 2002
by
James Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Nuked font related info in struct display. Almost gone now.
parent
fff20816
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
105 additions
and
111 deletions
+105
-111
drivers/video/console/fbcon-accel.c
drivers/video/console/fbcon-accel.c
+23
-22
drivers/video/console/fbcon.c
drivers/video/console/fbcon.c
+82
-87
drivers/video/console/fbcon.h
drivers/video/console/fbcon.h
+0
-2
No files found.
drivers/video/console/fbcon-accel.c
View file @
7aabce2b
...
@@ -22,14 +22,15 @@ void fbcon_accel_bmove(struct display *p, int sy, int sx, int dy, int dx,
...
@@ -22,14 +22,15 @@ void fbcon_accel_bmove(struct display *p, int sy, int sx, int dy, int dx,
int
height
,
int
width
)
int
height
,
int
width
)
{
{
struct
fb_info
*
info
=
p
->
fb_info
;
struct
fb_info
*
info
=
p
->
fb_info
;
struct
vc_data
*
vc
=
p
->
conp
;
struct
fb_copyarea
area
;
struct
fb_copyarea
area
;
area
.
sx
=
sx
*
fontwidth
(
p
)
;
area
.
sx
=
sx
*
vc
->
vc_font
.
width
;
area
.
sy
=
sy
*
fontheight
(
p
)
;
area
.
sy
=
sy
*
vc
->
vc_font
.
height
;
area
.
dx
=
dx
*
fontwidth
(
p
)
;
area
.
dx
=
dx
*
vc
->
vc_font
.
width
;
area
.
dy
=
dy
*
fontheight
(
p
)
;
area
.
dy
=
dy
*
vc
->
vc_font
.
height
;
area
.
height
=
height
*
fontheight
(
p
)
;
area
.
height
=
height
*
vc
->
vc_font
.
height
;
area
.
width
=
width
*
fontwidth
(
p
)
;
area
.
width
=
width
*
vc
->
vc_font
.
width
;
info
->
fbops
->
fb_copyarea
(
info
,
&
area
);
info
->
fbops
->
fb_copyarea
(
info
,
&
area
);
}
}
...
@@ -41,10 +42,10 @@ void fbcon_accel_clear(struct vc_data *vc, struct display *p, int sy,
...
@@ -41,10 +42,10 @@ void fbcon_accel_clear(struct vc_data *vc, struct display *p, int sy,
struct
fb_fillrect
region
;
struct
fb_fillrect
region
;
region
.
color
=
attr_bgcol_ec
(
p
,
vc
);
region
.
color
=
attr_bgcol_ec
(
p
,
vc
);
region
.
dx
=
sx
*
fontwidth
(
p
)
;
region
.
dx
=
sx
*
vc
->
vc_font
.
width
;
region
.
dy
=
sy
*
fontheight
(
p
)
;
region
.
dy
=
sy
*
vc
->
vc_font
.
height
;
region
.
width
=
width
*
fontwidth
(
p
)
;
region
.
width
=
width
*
vc
->
vc_font
.
width
;
region
.
height
=
height
*
fontheight
(
p
)
;
region
.
height
=
height
*
vc
->
vc_font
.
height
;
region
.
rop
=
ROP_COPY
;
region
.
rop
=
ROP_COPY
;
info
->
fbops
->
fb_fillrect
(
info
,
&
region
);
info
->
fbops
->
fb_fillrect
(
info
,
&
region
);
...
@@ -55,23 +56,23 @@ void fbcon_accel_putcs(struct vc_data *vc, struct display *p,
...
@@ -55,23 +56,23 @@ void fbcon_accel_putcs(struct vc_data *vc, struct display *p,
{
{
struct
fb_info
*
info
=
p
->
fb_info
;
struct
fb_info
*
info
=
p
->
fb_info
;
unsigned
short
charmask
=
p
->
charmask
;
unsigned
short
charmask
=
p
->
charmask
;
unsigned
int
width
=
((
fontwidth
(
p
)
+
7
)
>>
3
);
unsigned
int
width
=
((
vc
->
vc_font
.
width
+
7
)
>>
3
);
struct
fb_image
image
;
struct
fb_image
image
;
u16
c
=
scr_readw
(
s
);
u16
c
=
scr_readw
(
s
);
image
.
fg_color
=
attr_fgcol
(
p
,
c
);
image
.
fg_color
=
attr_fgcol
(
p
,
c
);
image
.
bg_color
=
attr_bgcol
(
p
,
c
);
image
.
bg_color
=
attr_bgcol
(
p
,
c
);
image
.
dx
=
xx
*
fontwidth
(
p
)
;
image
.
dx
=
xx
*
vc
->
vc_font
.
width
;
image
.
dy
=
yy
*
fontheight
(
p
)
;
image
.
dy
=
yy
*
vc
->
vc_font
.
height
;
image
.
width
=
fontwidth
(
p
)
;
image
.
width
=
vc
->
vc_font
.
width
;
image
.
height
=
fontheight
(
p
)
;
image
.
height
=
vc
->
vc_font
.
height
;
image
.
depth
=
1
;
image
.
depth
=
1
;
while
(
count
--
)
{
while
(
count
--
)
{
image
.
data
=
p
->
fontdata
+
image
.
data
=
p
->
fontdata
+
(
scr_readw
(
s
++
)
&
charmask
)
*
fontheight
(
p
)
*
width
;
(
scr_readw
(
s
++
)
&
charmask
)
*
vc
->
vc_font
.
height
*
width
;
info
->
fbops
->
fb_imageblit
(
info
,
&
image
);
info
->
fbops
->
fb_imageblit
(
info
,
&
image
);
image
.
dx
+=
fontwidth
(
p
)
;
image
.
dx
+=
vc
->
vc_font
.
width
;
}
}
}
}
...
@@ -79,8 +80,8 @@ void fbcon_accel_clear_margins(struct vc_data *vc, struct display *p,
...
@@ -79,8 +80,8 @@ void fbcon_accel_clear_margins(struct vc_data *vc, struct display *p,
int
bottom_only
)
int
bottom_only
)
{
{
struct
fb_info
*
info
=
p
->
fb_info
;
struct
fb_info
*
info
=
p
->
fb_info
;
unsigned
int
cw
=
fontwidth
(
p
)
;
unsigned
int
cw
=
vc
->
vc_font
.
width
;
unsigned
int
ch
=
fontheight
(
p
)
;
unsigned
int
ch
=
vc
->
vc_font
.
height
;
unsigned
int
rw
=
info
->
var
.
xres
%
cw
;
unsigned
int
rw
=
info
->
var
.
xres
%
cw
;
unsigned
int
bh
=
info
->
var
.
yres
%
ch
;
unsigned
int
bh
=
info
->
var
.
yres
%
ch
;
unsigned
int
rs
=
info
->
var
.
xres
-
rw
;
unsigned
int
rs
=
info
->
var
.
xres
-
rw
;
...
@@ -118,9 +119,9 @@ void fbcon_accel_cursor(struct display *p, int flags, int xx, int yy)
...
@@ -118,9 +119,9 @@ void fbcon_accel_cursor(struct display *p, int flags, int xx, int yy)
char
*
font
;
char
*
font
;
cursor
.
set
=
FB_CUR_SETPOS
;
cursor
.
set
=
FB_CUR_SETPOS
;
if
(
width
!=
fontwidth
(
p
)
||
height
!=
fontheight
(
p
)
)
{
if
(
width
!=
vc
->
vc_font
.
width
||
height
!=
vc
->
vc_font
.
height
)
{
width
=
fontwidth
(
p
)
;
width
=
vc
->
vc_font
.
width
;
height
=
fontheight
(
p
)
;
height
=
vc
->
vc_font
.
height
;
cursor
.
set
|=
FB_CUR_SETSIZE
;
cursor
.
set
|=
FB_CUR_SETSIZE
;
}
}
...
...
drivers/video/console/fbcon.c
View file @
7aabce2b
...
@@ -204,7 +204,7 @@ static int fbcon_changevar(int con);
...
@@ -204,7 +204,7 @@ static int fbcon_changevar(int con);
static
void
fbcon_set_display
(
int
con
,
int
init
,
int
logo
);
static
void
fbcon_set_display
(
int
con
,
int
init
,
int
logo
);
static
__inline__
int
real_y
(
struct
display
*
p
,
int
ypos
);
static
__inline__
int
real_y
(
struct
display
*
p
,
int
ypos
);
static
void
fbcon_vbl_handler
(
int
irq
,
void
*
dummy
,
struct
pt_regs
*
fp
);
static
void
fbcon_vbl_handler
(
int
irq
,
void
*
dummy
,
struct
pt_regs
*
fp
);
static
__inline__
void
updatescrollmode
(
struct
display
*
p
);
static
__inline__
void
updatescrollmode
(
struct
display
*
p
,
struct
vc_data
*
vc
);
static
__inline__
void
ywrap_up
(
struct
display
*
p
,
struct
vc_data
*
vc
,
static
__inline__
void
ywrap_up
(
struct
display
*
p
,
struct
vc_data
*
vc
,
int
count
);
int
count
);
static
__inline__
void
ywrap_down
(
struct
display
*
p
,
struct
vc_data
*
vc
,
static
__inline__
void
ywrap_down
(
struct
display
*
p
,
struct
vc_data
*
vc
,
...
@@ -294,7 +294,6 @@ void set_con2fb_map(int unit, int newidx)
...
@@ -294,7 +294,6 @@ void set_con2fb_map(int unit, int newidx)
struct
fb_info
*
oldfb
,
*
newfb
;
struct
fb_info
*
oldfb
,
*
newfb
;
struct
vc_data
*
vc
;
struct
vc_data
*
vc
;
char
*
fontdata
;
char
*
fontdata
;
unsigned
short
fontwidth
,
fontheight
;
int
userfont
;
int
userfont
;
if
(
newidx
!=
con2fb_map
[
unit
])
{
if
(
newidx
!=
con2fb_map
[
unit
])
{
...
@@ -314,15 +313,11 @@ void set_con2fb_map(int unit, int newidx)
...
@@ -314,15 +313,11 @@ void set_con2fb_map(int unit, int newidx)
__MOD_DEC_USE_COUNT
(
oldfb
->
fbops
->
owner
);
__MOD_DEC_USE_COUNT
(
oldfb
->
fbops
->
owner
);
vc
=
fb_display
[
unit
].
conp
;
vc
=
fb_display
[
unit
].
conp
;
fontdata
=
fb_display
[
unit
].
fontdata
;
fontdata
=
fb_display
[
unit
].
fontdata
;
fontwidth
=
fb_display
[
unit
].
_fontwidth
;
fontheight
=
fb_display
[
unit
].
_fontheight
;
userfont
=
fb_display
[
unit
].
userfont
;
userfont
=
fb_display
[
unit
].
userfont
;
con2fb_map
[
unit
]
=
newidx
;
con2fb_map
[
unit
]
=
newidx
;
fb_display
[
unit
].
conp
=
vc
;
fb_display
[
unit
].
conp
=
vc
;
fb_display
[
unit
].
fontdata
=
fontdata
;
fb_display
[
unit
].
fontdata
=
fontdata
;
fb_display
[
unit
].
_fontwidth
=
fontwidth
;
fb_display
[
unit
].
_fontheight
=
fontheight
;
fb_display
[
unit
].
userfont
=
userfont
;
fb_display
[
unit
].
userfont
=
userfont
;
fb_display
[
unit
].
fb_info
=
newfb
;
fb_display
[
unit
].
fb_info
=
newfb
;
gen_set_disp
(
unit
,
newfb
);
gen_set_disp
(
unit
,
newfb
);
...
@@ -536,12 +531,13 @@ static int fbcon_changevar(int con)
...
@@ -536,12 +531,13 @@ static int fbcon_changevar(int con)
fbcon_free_font
(
p
);
fbcon_free_font
(
p
);
if
(
i
<
MAX_NR_CONSOLES
)
{
if
(
i
<
MAX_NR_CONSOLES
)
{
struct
display
*
q
=
&
fb_display
[
i
];
struct
display
*
q
=
&
fb_display
[
i
];
struct
vc_data
*
tmp
=
vc_cons
[
i
].
d
;
if
(
fontwidthvalid
(
p
,
fontwidth
(
q
)))
{
if
(
fontwidthvalid
(
p
,
vc
->
vc_font
.
width
))
{
/* 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 */
p
->
_fontwidth
=
q
->
_font
width
;
tmp
->
vc_font
.
width
=
vc
->
vc_font
.
width
;
p
->
_fontheight
=
q
->
_font
height
;
tmp
->
vc_font
.
height
=
vc
->
vc_font
.
height
;
p
->
fontdata
=
q
->
fontdata
;
p
->
fontdata
=
q
->
fontdata
;
p
->
userfont
=
q
->
userfont
;
p
->
userfont
=
q
->
userfont
;
if
(
p
->
userfont
)
{
if
(
p
->
userfont
)
{
...
@@ -558,37 +554,37 @@ static int fbcon_changevar(int con)
...
@@ -558,37 +554,37 @@ static int fbcon_changevar(int con)
font
=
font
=
fbcon_get_default_font
(
info
->
var
.
xres
,
fbcon_get_default_font
(
info
->
var
.
xres
,
info
->
var
.
yres
);
info
->
var
.
yres
);
p
->
_font
width
=
font
->
width
;
vc
->
vc_font
.
width
=
font
->
width
;
p
->
_font
height
=
font
->
height
;
vc
->
vc_font
.
height
=
font
->
height
;
p
->
fontdata
=
font
->
data
;
p
->
fontdata
=
font
->
data
;
}
}
if
(
!
fontwidthvalid
(
p
,
fontwidth
(
p
)
))
{
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
"fbcon_set_display: No support for fontwidth %d
\n
"
,
"fbcon_set_display: No support for fontwidth %d
\n
"
,
fontwidth
(
p
)
);
vc
->
vc_font
.
width
);
p
->
dispsw
=
&
fbcon_dummy
;
p
->
dispsw
=
&
fbcon_dummy
;
}
}
if
(
p
->
dispsw
->
set_font
)
if
(
p
->
dispsw
->
set_font
)
p
->
dispsw
->
set_font
(
p
,
fontwidth
(
p
),
fontheight
(
p
)
);
p
->
dispsw
->
set_font
(
p
,
vc
->
vc_font
.
width
,
vc
->
vc_font
.
height
);
updatescrollmode
(
p
);
updatescrollmode
(
p
,
vc
);
old_cols
=
vc
->
vc_cols
;
old_cols
=
vc
->
vc_cols
;
old_rows
=
vc
->
vc_rows
;
old_rows
=
vc
->
vc_rows
;
nr_cols
=
info
->
var
.
xres
/
fontwidth
(
p
)
;
nr_cols
=
info
->
var
.
xres
/
vc
->
vc_font
.
width
;
nr_rows
=
info
->
var
.
yres
/
fontheight
(
p
)
;
nr_rows
=
info
->
var
.
yres
/
vc
->
vc_font
.
height
;
/*
/*
* ++guenther: console.c:vc_allocate() relies on initializing
* ++guenther: console.c:vc_allocate() relies on initializing
* vc_{cols,rows}, but we must not set those if we are only
* vc_{cols,rows}, but we must not set those if we are only
* resizing the console.
* resizing the console.
*/
*/
p
->
vrows
=
info
->
var
.
yres_virtual
/
fontheight
(
p
)
;
p
->
vrows
=
info
->
var
.
yres_virtual
/
vc
->
vc_font
.
height
;
if
((
info
->
var
.
yres
%
fontheight
(
p
)
)
&&
if
((
info
->
var
.
yres
%
vc
->
vc_font
.
height
)
&&
(
info
->
var
.
yres_virtual
%
fontheight
(
p
)
<
(
info
->
var
.
yres_virtual
%
vc
->
vc_font
.
height
<
info
->
var
.
yres
%
fontheight
(
p
)
))
info
->
var
.
yres
%
vc
->
vc_font
.
height
))
p
->
vrows
--
;
p
->
vrows
--
;
vc
->
vc_can_do_color
=
info
->
var
.
bits_per_pixel
!=
1
;
vc
->
vc_can_do_color
=
info
->
var
.
bits_per_pixel
!=
1
;
vc
->
vc_complement_mask
=
vc
->
vc_can_do_color
?
0x7700
:
0x0800
;
vc
->
vc_complement_mask
=
vc
->
vc_can_do_color
?
0x7700
:
0x0800
;
...
@@ -644,19 +640,18 @@ static int fbcon_changevar(int con)
...
@@ -644,19 +640,18 @@ static int fbcon_changevar(int con)
return
0
;
return
0
;
}
}
static
__inline__
void
updatescrollmode
(
struct
display
*
p
,
struct
vc_data
*
vc
)
static
__inline__
void
updatescrollmode
(
struct
display
*
p
)
{
{
struct
fb_info
*
info
=
p
->
fb_info
;
struct
fb_info
*
info
=
p
->
fb_info
;
int
m
;
int
m
;
if
(
p
->
scrollmode
&
__SCROLL_YFIXED
)
if
(
p
->
scrollmode
&
__SCROLL_YFIXED
)
return
;
return
;
if
(
divides
(
info
->
fix
.
ywrapstep
,
fontheight
(
p
)
)
&&
if
(
divides
(
info
->
fix
.
ywrapstep
,
vc
->
vc_font
.
height
)
&&
divides
(
fontheight
(
p
)
,
info
->
var
.
yres_virtual
))
divides
(
vc
->
vc_font
.
height
,
info
->
var
.
yres_virtual
))
m
=
__SCROLL_YWRAP
;
m
=
__SCROLL_YWRAP
;
else
if
(
divides
(
info
->
fix
.
ypanstep
,
fontheight
(
p
)
)
&&
else
if
(
divides
(
info
->
fix
.
ypanstep
,
vc
->
vc_font
.
height
)
&&
info
->
var
.
yres_virtual
>=
info
->
var
.
yres
+
fontheight
(
p
)
)
info
->
var
.
yres_virtual
>=
info
->
var
.
yres
+
vc
->
vc_font
.
height
)
m
=
__SCROLL_YPAN
;
m
=
__SCROLL_YPAN
;
else
if
(
p
->
scrollmode
&
__SCROLL_YNOMOVE
)
else
if
(
p
->
scrollmode
&
__SCROLL_YNOMOVE
)
m
=
__SCROLL_YREDRAW
;
m
=
__SCROLL_YREDRAW
;
...
@@ -691,12 +686,13 @@ static void fbcon_set_display(int con, int init, int logo)
...
@@ -691,12 +686,13 @@ static void fbcon_set_display(int con, int init, int logo)
fbcon_free_font
(
p
);
fbcon_free_font
(
p
);
if
(
i
<
MAX_NR_CONSOLES
)
{
if
(
i
<
MAX_NR_CONSOLES
)
{
struct
display
*
q
=
&
fb_display
[
i
];
struct
display
*
q
=
&
fb_display
[
i
];
struct
vc_data
*
tmp
=
vc_cons
[
i
].
d
;
if
(
fontwidthvalid
(
p
,
fontwidth
(
q
)
))
{
if
(
fontwidthvalid
(
p
,
vc
->
vc_font
.
width
))
{
/* 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 */
p
->
_fontwidth
=
q
->
_font
width
;
tmp
->
vc_font
.
width
=
vc
->
vc_font
.
width
;
p
->
_fontheight
=
q
->
_font
height
;
tmp
->
vc_font
.
height
=
vc
->
vc_font
.
height
;
p
->
fontdata
=
q
->
fontdata
;
p
->
fontdata
=
q
->
fontdata
;
p
->
userfont
=
q
->
userfont
;
p
->
userfont
=
q
->
userfont
;
if
(
p
->
userfont
)
{
if
(
p
->
userfont
)
{
...
@@ -713,34 +709,34 @@ static void fbcon_set_display(int con, int init, int logo)
...
@@ -713,34 +709,34 @@ static void fbcon_set_display(int con, int init, int logo)
font
=
font
=
fbcon_get_default_font
(
info
->
var
.
xres
,
fbcon_get_default_font
(
info
->
var
.
xres
,
info
->
var
.
yres
);
info
->
var
.
yres
);
p
->
_font
width
=
font
->
width
;
vc
->
vc_font
.
width
=
font
->
width
;
p
->
_font
height
=
font
->
height
;
vc
->
vc_font
.
height
=
font
->
height
;
p
->
fontdata
=
font
->
data
;
p
->
fontdata
=
font
->
data
;
}
}
if
(
!
fontwidthvalid
(
p
,
fontwidth
(
p
)
))
{
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
"fbcon_set_display: No support for fontwidth %d
\n
"
,
"fbcon_set_display: No support for fontwidth %d
\n
"
,
fontwidth
(
p
)
);
vc
->
vc_font
.
width
);
p
->
dispsw
=
&
fbcon_dummy
;
p
->
dispsw
=
&
fbcon_dummy
;
}
}
if
(
p
->
dispsw
->
set_font
)
if
(
p
->
dispsw
->
set_font
)
p
->
dispsw
->
set_font
(
p
,
fontwidth
(
p
),
fontheight
(
p
)
);
p
->
dispsw
->
set_font
(
p
,
vc
->
vc_font
.
width
,
vc
->
vc_font
.
height
);
updatescrollmode
(
p
);
updatescrollmode
(
p
,
vc
);
old_cols
=
vc
->
vc_cols
;
old_cols
=
vc
->
vc_cols
;
old_rows
=
vc
->
vc_rows
;
old_rows
=
vc
->
vc_rows
;
nr_cols
=
info
->
var
.
xres
/
fontwidth
(
p
)
;
nr_cols
=
info
->
var
.
xres
/
vc
->
vc_font
.
width
;
nr_rows
=
info
->
var
.
yres
/
fontheight
(
p
)
;
nr_rows
=
info
->
var
.
yres
/
vc
->
vc_font
.
height
;
if
(
logo
)
{
if
(
logo
)
{
/* Need to make room for the logo */
/* Need to make room for the logo */
int
cnt
;
int
cnt
;
int
step
;
int
step
;
logo_lines
=
(
LOGO_H
+
fontheight
(
p
)
-
1
)
/
fontheight
(
p
)
;
logo_lines
=
(
LOGO_H
+
vc
->
vc_font
.
height
-
1
)
/
vc
->
vc_font
.
height
;
q
=
(
unsigned
short
*
)
(
vc
->
vc_origin
+
q
=
(
unsigned
short
*
)
(
vc
->
vc_origin
+
vc
->
vc_size_row
*
old_rows
);
vc
->
vc_size_row
*
old_rows
);
step
=
logo_lines
*
old_cols
;
step
=
logo_lines
*
old_cols
;
...
@@ -790,10 +786,10 @@ static void fbcon_set_display(int con, int init, int logo)
...
@@ -790,10 +786,10 @@ static void fbcon_set_display(int con, int init, int logo)
vc
->
vc_cols
=
nr_cols
;
vc
->
vc_cols
=
nr_cols
;
vc
->
vc_rows
=
nr_rows
;
vc
->
vc_rows
=
nr_rows
;
}
}
p
->
vrows
=
info
->
var
.
yres_virtual
/
fontheight
(
p
)
;
p
->
vrows
=
info
->
var
.
yres_virtual
/
vc
->
vc_font
.
height
;
if
((
info
->
var
.
yres
%
fontheight
(
p
)
)
&&
if
((
info
->
var
.
yres
%
vc
->
vc_font
.
height
)
&&
(
info
->
var
.
yres_virtual
%
fontheight
(
p
)
<
(
info
->
var
.
yres_virtual
%
vc
->
vc_font
.
height
<
info
->
var
.
yres
%
fontheight
(
p
)
))
info
->
var
.
yres
%
vc
->
vc_font
.
height
))
p
->
vrows
--
;
p
->
vrows
--
;
vc
->
vc_can_do_color
=
info
->
var
.
bits_per_pixel
!=
1
;
vc
->
vc_can_do_color
=
info
->
var
.
bits_per_pixel
!=
1
;
vc
->
vc_complement_mask
=
vc
->
vc_can_do_color
?
0x7700
:
0x0800
;
vc
->
vc_complement_mask
=
vc
->
vc_can_do_color
?
0x7700
:
0x0800
;
...
@@ -936,7 +932,7 @@ static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos)
...
@@ -936,7 +932,7 @@ 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
;
struct
fb_info
*
info
=
p
->
fb_info
;
unsigned
short
charmask
=
p
->
charmask
;
unsigned
short
charmask
=
p
->
charmask
;
unsigned
int
width
=
((
fontwidth
(
p
)
+
7
)
>>
3
);
unsigned
int
width
=
((
vc
->
vc_font
.
width
+
7
)
>>
3
);
struct
fb_image
image
;
struct
fb_image
image
;
int
redraw_cursor
=
0
;
int
redraw_cursor
=
0
;
...
@@ -953,12 +949,12 @@ static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos)
...
@@ -953,12 +949,12 @@ static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos)
image
.
fg_color
=
attr_fgcol
(
p
,
c
);
image
.
fg_color
=
attr_fgcol
(
p
,
c
);
image
.
bg_color
=
attr_bgcol
(
p
,
c
);
image
.
bg_color
=
attr_bgcol
(
p
,
c
);
image
.
dx
=
xpos
*
fontwidth
(
p
)
;
image
.
dx
=
xpos
*
vc
->
vc_font
.
width
;
image
.
dy
=
real_y
(
p
,
ypos
)
*
fontheight
(
p
)
;
image
.
dy
=
real_y
(
p
,
ypos
)
*
vc
->
vc_font
.
height
;
image
.
width
=
fontwidth
(
p
)
;
image
.
width
=
vc
->
vc_font
.
width
;
image
.
height
=
fontheight
(
p
)
;
image
.
height
=
vc
->
vc_font
.
height
;
image
.
depth
=
1
;
image
.
depth
=
1
;
image
.
data
=
p
->
fontdata
+
(
c
&
charmask
)
*
fontheight
(
p
)
*
width
;
image
.
data
=
p
->
fontdata
+
(
c
&
charmask
)
*
vc
->
vc_font
.
height
*
width
;
info
->
fbops
->
fb_imageblit
(
info
,
&
image
);
info
->
fbops
->
fb_imageblit
(
info
,
&
image
);
...
@@ -1086,7 +1082,7 @@ static __inline__ void ywrap_up(struct display *p, struct vc_data *vc,
...
@@ -1086,7 +1082,7 @@ static __inline__ void ywrap_up(struct display *p, struct vc_data *vc,
if
(
p
->
yscroll
>=
p
->
vrows
)
/* Deal with wrap */
if
(
p
->
yscroll
>=
p
->
vrows
)
/* Deal with wrap */
p
->
yscroll
-=
p
->
vrows
;
p
->
yscroll
-=
p
->
vrows
;
info
->
var
.
xoffset
=
0
;
info
->
var
.
xoffset
=
0
;
info
->
var
.
yoffset
=
p
->
yscroll
*
fontheight
(
p
)
;
info
->
var
.
yoffset
=
p
->
yscroll
*
vc
->
vc_font
.
height
;
info
->
var
.
vmode
|=
FB_VMODE_YWRAP
;
info
->
var
.
vmode
|=
FB_VMODE_YWRAP
;
update_var
(
vc
->
vc_num
,
info
);
update_var
(
vc
->
vc_num
,
info
);
scrollback_max
+=
count
;
scrollback_max
+=
count
;
...
@@ -1104,7 +1100,7 @@ static __inline__ void ywrap_down(struct display *p, struct vc_data *vc,
...
@@ -1104,7 +1100,7 @@ static __inline__ void ywrap_down(struct display *p, struct vc_data *vc,
if
(
p
->
yscroll
<
0
)
/* Deal with wrap */
if
(
p
->
yscroll
<
0
)
/* Deal with wrap */
p
->
yscroll
+=
p
->
vrows
;
p
->
yscroll
+=
p
->
vrows
;
info
->
var
.
xoffset
=
0
;
info
->
var
.
xoffset
=
0
;
info
->
var
.
yoffset
=
p
->
yscroll
*
fontheight
(
p
)
;
info
->
var
.
yoffset
=
p
->
yscroll
*
vc
->
vc_font
.
height
;
info
->
var
.
vmode
|=
FB_VMODE_YWRAP
;
info
->
var
.
vmode
|=
FB_VMODE_YWRAP
;
update_var
(
vc
->
vc_num
,
info
);
update_var
(
vc
->
vc_num
,
info
);
scrollback_max
-=
count
;
scrollback_max
-=
count
;
...
@@ -1125,7 +1121,7 @@ static __inline__ void ypan_up(struct display *p, struct vc_data *vc,
...
@@ -1125,7 +1121,7 @@ static __inline__ void ypan_up(struct display *p, struct vc_data *vc,
p
->
yscroll
-=
p
->
vrows
-
vc
->
vc_rows
;
p
->
yscroll
-=
p
->
vrows
-
vc
->
vc_rows
;
}
}
info
->
var
.
xoffset
=
0
;
info
->
var
.
xoffset
=
0
;
info
->
var
.
yoffset
=
p
->
yscroll
*
fontheight
(
p
)
;
info
->
var
.
yoffset
=
p
->
yscroll
*
vc
->
vc_font
.
height
;
info
->
var
.
vmode
&=
~
FB_VMODE_YWRAP
;
info
->
var
.
vmode
&=
~
FB_VMODE_YWRAP
;
update_var
(
vc
->
vc_num
,
info
);
update_var
(
vc
->
vc_num
,
info
);
if
(
p
->
dispsw
->
clear_margins
)
if
(
p
->
dispsw
->
clear_margins
)
...
@@ -1149,7 +1145,7 @@ static __inline__ void ypan_down(struct display *p, struct vc_data *vc,
...
@@ -1149,7 +1145,7 @@ static __inline__ void ypan_down(struct display *p, struct vc_data *vc,
p
->
yscroll
+=
p
->
vrows
-
vc
->
vc_rows
;
p
->
yscroll
+=
p
->
vrows
-
vc
->
vc_rows
;
}
}
info
->
var
.
xoffset
=
0
;
info
->
var
.
xoffset
=
0
;
info
->
var
.
yoffset
=
p
->
yscroll
*
fontheight
(
p
)
;
info
->
var
.
yoffset
=
p
->
yscroll
*
vc
->
vc_font
.
height
;
info
->
var
.
vmode
&=
~
FB_VMODE_YWRAP
;
info
->
var
.
vmode
&=
~
FB_VMODE_YWRAP
;
update_var
(
vc
->
vc_num
,
info
);
update_var
(
vc
->
vc_num
,
info
);
if
(
p
->
dispsw
->
clear_margins
)
if
(
p
->
dispsw
->
clear_margins
)
...
@@ -1797,14 +1793,14 @@ static inline int fbcon_get_font(struct vc_data *vc, struct console_font_op *op)
...
@@ -1797,14 +1793,14 @@ static inline int fbcon_get_font(struct vc_data *vc, struct console_font_op *op)
if
(
fontwidth
(
p
)
!=
8
)
if
(
fontwidth
(
p
)
!=
8
)
return
-
EINVAL
;
return
-
EINVAL
;
#endif
#endif
op
->
width
=
fontwidth
(
p
)
;
op
->
width
=
vc
->
vc_font
.
width
;
op
->
height
=
fontheight
(
p
)
;
op
->
height
=
vc
->
vc_font
.
height
;
op
->
charcount
=
(
p
->
charmask
==
0x1ff
)
?
512
:
256
;
op
->
charcount
=
(
p
->
charmask
==
0x1ff
)
?
512
:
256
;
if
(
!
op
->
data
)
if
(
!
op
->
data
)
return
0
;
return
0
;
if
(
op
->
width
<=
8
)
{
if
(
op
->
width
<=
8
)
{
j
=
fontheight
(
p
)
;
j
=
vc
->
vc_font
.
height
;
for
(
i
=
0
;
i
<
op
->
charcount
;
i
++
)
{
for
(
i
=
0
;
i
<
op
->
charcount
;
i
++
)
{
memcpy
(
data
,
fontdata
,
j
);
memcpy
(
data
,
fontdata
,
j
);
memset
(
data
+
j
,
0
,
32
-
j
);
memset
(
data
+
j
,
0
,
32
-
j
);
...
@@ -1814,7 +1810,7 @@ static inline int fbcon_get_font(struct vc_data *vc, struct console_font_op *op)
...
@@ -1814,7 +1810,7 @@ static inline int fbcon_get_font(struct vc_data *vc, struct console_font_op *op)
}
}
#ifndef CONFIG_FBCON_FONTWIDTH8_ONLY
#ifndef CONFIG_FBCON_FONTWIDTH8_ONLY
else
if
(
op
->
width
<=
16
)
{
else
if
(
op
->
width
<=
16
)
{
j
=
fontheight
(
p
)
*
2
;
j
=
vc
->
vc_font
.
height
*
2
;
for
(
i
=
0
;
i
<
op
->
charcount
;
i
++
)
{
for
(
i
=
0
;
i
<
op
->
charcount
;
i
++
)
{
memcpy
(
data
,
fontdata
,
j
);
memcpy
(
data
,
fontdata
,
j
);
memset
(
data
+
j
,
0
,
64
-
j
);
memset
(
data
+
j
,
0
,
64
-
j
);
...
@@ -1823,7 +1819,7 @@ static inline int fbcon_get_font(struct vc_data *vc, struct console_font_op *op)
...
@@ -1823,7 +1819,7 @@ static inline int fbcon_get_font(struct vc_data *vc, struct console_font_op *op)
}
}
}
else
if
(
op
->
width
<=
24
)
{
}
else
if
(
op
->
width
<=
24
)
{
for
(
i
=
0
;
i
<
op
->
charcount
;
i
++
)
{
for
(
i
=
0
;
i
<
op
->
charcount
;
i
++
)
{
for
(
j
=
0
;
j
<
fontheight
(
p
)
;
j
++
)
{
for
(
j
=
0
;
j
<
vc
->
vc_font
.
height
;
j
++
)
{
*
data
++
=
fontdata
[
0
];
*
data
++
=
fontdata
[
0
];
*
data
++
=
fontdata
[
1
];
*
data
++
=
fontdata
[
1
];
*
data
++
=
fontdata
[
2
];
*
data
++
=
fontdata
[
2
];
...
@@ -1833,7 +1829,7 @@ static inline int fbcon_get_font(struct vc_data *vc, struct console_font_op *op)
...
@@ -1833,7 +1829,7 @@ static inline int fbcon_get_font(struct vc_data *vc, struct console_font_op *op)
data
+=
3
*
(
32
-
j
);
data
+=
3
*
(
32
-
j
);
}
}
}
else
{
}
else
{
j
=
fontheight
(
p
)
*
4
;
j
=
vc
->
vc_font
.
height
*
4
;
for
(
i
=
0
;
i
<
op
->
charcount
;
i
++
)
{
for
(
i
=
0
;
i
<
op
->
charcount
;
i
++
)
{
memcpy
(
data
,
fontdata
,
j
);
memcpy
(
data
,
fontdata
,
j
);
memset
(
data
+
j
,
0
,
128
-
j
);
memset
(
data
+
j
,
0
,
128
-
j
);
...
@@ -1862,10 +1858,10 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op,
...
@@ -1862,10 +1858,10 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op,
return
-
ENXIO
;
return
-
ENXIO
;
}
}
if
(
CON_IS_VISIBLE
(
p
->
conp
)
&&
softback_lines
)
if
(
CON_IS_VISIBLE
(
vc
)
&&
softback_lines
)
fbcon_set_origin
(
p
->
conp
);
fbcon_set_origin
(
vc
);
resize
=
(
w
!=
fontwidth
(
p
))
||
(
h
!=
fontheight
(
p
)
);
resize
=
(
w
!=
vc
->
vc_font
.
width
)
||
(
h
!=
vc
->
vc_font
.
height
);
if
(
p
->
userfont
)
if
(
p
->
userfont
)
old_data
=
p
->
fontdata
;
old_data
=
p
->
fontdata
;
if
(
userfont
)
if
(
userfont
)
...
@@ -1875,19 +1871,18 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op,
...
@@ -1875,19 +1871,18 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op,
p
->
fontdata
=
data
;
p
->
fontdata
=
data
;
if
((
p
->
userfont
=
userfont
))
if
((
p
->
userfont
=
userfont
))
REFCOUNT
(
data
)
++
;
REFCOUNT
(
data
)
++
;
p
->
_font
width
=
w
;
vc
->
vc_font
.
width
=
w
;
p
->
_font
height
=
h
;
vc
->
vc_font
.
height
=
h
;
if
(
p
->
conp
->
vc_hi_font_mask
&&
cnt
==
256
)
{
if
(
vc
->
vc_hi_font_mask
&&
cnt
==
256
)
{
p
->
conp
->
vc_hi_font_mask
=
0
;
vc
->
vc_hi_font_mask
=
0
;
if
(
p
->
conp
->
vc_can_do_color
)
if
(
vc
->
vc_can_do_color
)
p
->
conp
->
vc_complement_mask
>>=
1
;
vc
->
vc_complement_mask
>>=
1
;
p
->
fgshift
--
;
p
->
fgshift
--
;
p
->
bgshift
--
;
p
->
bgshift
--
;
p
->
charmask
=
0xff
;
p
->
charmask
=
0xff
;
/* ++Edmund: reorder the attribute bits */
/* ++Edmund: reorder the attribute bits */
if
(
p
->
conp
->
vc_can_do_color
)
{
if
(
vc
->
vc_can_do_color
)
{
struct
vc_data
*
vc
=
p
->
conp
;
unsigned
short
*
cp
=
unsigned
short
*
cp
=
(
unsigned
short
*
)
vc
->
vc_origin
;
(
unsigned
short
*
)
vc
->
vc_origin
;
int
count
=
vc
->
vc_screenbuf_size
/
2
;
int
count
=
vc
->
vc_screenbuf_size
/
2
;
...
@@ -1903,17 +1898,16 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op,
...
@@ -1903,17 +1898,16 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op,
vc
->
vc_attr
>>=
1
;
vc
->
vc_attr
>>=
1
;
}
}
}
else
if
(
!
p
->
conp
->
vc_hi_font_mask
&&
cnt
==
512
)
{
}
else
if
(
!
vc
->
vc_hi_font_mask
&&
cnt
==
512
)
{
p
->
conp
->
vc_hi_font_mask
=
0x100
;
vc
->
vc_hi_font_mask
=
0x100
;
if
(
p
->
conp
->
vc_can_do_color
)
if
(
vc
->
vc_can_do_color
)
p
->
conp
->
vc_complement_mask
<<=
1
;
vc
->
vc_complement_mask
<<=
1
;
p
->
fgshift
++
;
p
->
fgshift
++
;
p
->
bgshift
++
;
p
->
bgshift
++
;
p
->
charmask
=
0x1ff
;
p
->
charmask
=
0x1ff
;
/* ++Edmund: reorder the attribute bits */
/* ++Edmund: reorder the attribute bits */
{
{
struct
vc_data
*
vc
=
p
->
conp
;
unsigned
short
*
cp
=
unsigned
short
*
cp
=
(
unsigned
short
*
)
vc
->
vc_origin
;
(
unsigned
short
*
)
vc
->
vc_origin
;
int
count
=
vc
->
vc_screenbuf_size
/
2
;
int
count
=
vc
->
vc_screenbuf_size
/
2
;
...
@@ -1941,14 +1935,13 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op,
...
@@ -1941,14 +1935,13 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op,
}
}
if
(
resize
)
{
if
(
resize
)
{
struct
vc_data
*
vc
=
p
->
conp
;
/* reset wrap/pan */
/* reset wrap/pan */
info
->
var
.
xoffset
=
info
->
var
.
yoffset
=
p
->
yscroll
=
0
;
info
->
var
.
xoffset
=
info
->
var
.
yoffset
=
p
->
yscroll
=
0
;
p
->
vrows
=
info
->
var
.
yres_virtual
/
h
;
p
->
vrows
=
info
->
var
.
yres_virtual
/
h
;
if
((
info
->
var
.
yres
%
h
)
if
((
info
->
var
.
yres
%
h
)
&&
(
info
->
var
.
yres_virtual
%
h
<
info
->
var
.
yres
%
h
))
&&
(
info
->
var
.
yres_virtual
%
h
<
info
->
var
.
yres
%
h
))
p
->
vrows
--
;
p
->
vrows
--
;
updatescrollmode
(
p
);
updatescrollmode
(
p
,
vc
);
vc_resize
(
vc
->
vc_num
,
info
->
var
.
xres
/
w
,
info
->
var
.
yres
/
h
);
vc_resize
(
vc
->
vc_num
,
info
->
var
.
xres
/
w
,
info
->
var
.
yres
/
h
);
if
(
CON_IS_VISIBLE
(
vc
)
&&
softback_buf
)
{
if
(
CON_IS_VISIBLE
(
vc
)
&&
softback_buf
)
{
int
l
=
fbcon_softback_size
/
vc
->
vc_size_row
;
int
l
=
fbcon_softback_size
/
vc
->
vc_size_row
;
...
@@ -1961,10 +1954,10 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op,
...
@@ -1961,10 +1954,10 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op,
softback_top
=
0
;
softback_top
=
0
;
}
}
}
}
}
else
if
(
CON_IS_VISIBLE
(
p
->
conp
)
}
else
if
(
CON_IS_VISIBLE
(
vc
)
&&
vt_cons
[
vc
->
vc_num
]
->
vc_mode
==
KD_TEXT
)
{
&&
vt_cons
[
vc
->
vc_num
]
->
vc_mode
==
KD_TEXT
)
{
if
(
p
->
dispsw
->
clear_margins
)
if
(
p
->
dispsw
->
clear_margins
)
p
->
dispsw
->
clear_margins
(
p
->
conp
,
p
,
0
);
p
->
dispsw
->
clear_margins
(
vc
,
p
,
0
);
update_screen
(
vc
->
vc_num
);
update_screen
(
vc
->
vc_num
);
}
}
...
@@ -1985,8 +1978,8 @@ static inline int fbcon_copy_font(struct vc_data *vc, struct console_font_op *op
...
@@ -1985,8 +1978,8 @@ static inline int fbcon_copy_font(struct vc_data *vc, struct console_font_op *op
od
=
&
fb_display
[
h
];
od
=
&
fb_display
[
h
];
if
(
od
->
fontdata
==
p
->
fontdata
)
if
(
od
->
fontdata
==
p
->
fontdata
)
return
0
;
/* already the same font... */
return
0
;
/* already the same font... */
op
->
width
=
fontwidth
(
od
)
;
op
->
width
=
vc
->
vc_font
.
width
;
op
->
height
=
fontheight
(
od
)
;
op
->
height
=
vc
->
vc_font
.
height
;
return
fbcon_do_set_font
(
vc
,
op
,
od
->
fontdata
,
od
->
userfont
);
return
fbcon_do_set_font
(
vc
,
op
,
od
->
fontdata
,
od
->
userfont
);
}
}
...
@@ -2067,11 +2060,13 @@ static inline int fbcon_set_font(struct vc_data *vc, struct console_font_op *op)
...
@@ -2067,11 +2060,13 @@ static inline int fbcon_set_font(struct vc_data *vc, struct console_font_op *op)
FNTSUM
(
new_data
)
=
k
;
FNTSUM
(
new_data
)
=
k
;
/* Check if the same font is on some other console already */
/* Check if the same font is on some other console already */
for
(
i
=
0
;
i
<
MAX_NR_CONSOLES
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_NR_CONSOLES
;
i
++
)
{
struct
vc_data
*
tmp
=
vc_cons
[
i
].
d
;
if
(
fb_display
[
i
].
userfont
&&
if
(
fb_display
[
i
].
userfont
&&
fb_display
[
i
].
fontdata
&&
fb_display
[
i
].
fontdata
&&
FNTSUM
(
fb_display
[
i
].
fontdata
)
==
k
&&
FNTSUM
(
fb_display
[
i
].
fontdata
)
==
k
&&
FNTSIZE
(
fb_display
[
i
].
fontdata
)
==
size
&&
FNTSIZE
(
fb_display
[
i
].
fontdata
)
==
size
&&
fontwidth
(
&
fb_display
[
i
])
==
w
&&
tmp
->
vc_font
.
width
==
w
&&
!
memcmp
(
fb_display
[
i
].
fontdata
,
new_data
,
size
))
{
!
memcmp
(
fb_display
[
i
].
fontdata
,
new_data
,
size
))
{
kfree
(
new_data
-
FONT_EXTRA_WORDS
*
sizeof
(
int
));
kfree
(
new_data
-
FONT_EXTRA_WORDS
*
sizeof
(
int
));
new_data
=
fb_display
[
i
].
fontdata
;
new_data
=
fb_display
[
i
].
fontdata
;
...
@@ -2315,7 +2310,7 @@ static int fbcon_scrolldelta(struct vc_data *vc, int lines)
...
@@ -2315,7 +2310,7 @@ static int fbcon_scrolldelta(struct vc_data *vc, int lines)
else
if
(
offset
>=
limit
)
else
if
(
offset
>=
limit
)
offset
-=
limit
;
offset
-=
limit
;
info
->
var
.
xoffset
=
0
;
info
->
var
.
xoffset
=
0
;
info
->
var
.
yoffset
=
offset
*
fontheight
(
p
)
;
info
->
var
.
yoffset
=
offset
*
vc
->
vc_font
.
height
;
update_var
(
unit
,
info
);
update_var
(
unit
,
info
);
if
(
!
scrollback_current
)
if
(
!
scrollback_current
)
fbcon_cursor
(
vc
,
CM_DRAW
);
fbcon_cursor
(
vc
,
CM_DRAW
);
...
@@ -2338,6 +2333,7 @@ static int __init fbcon_show_logo(void)
...
@@ -2338,6 +2333,7 @@ static int __init fbcon_show_logo(void)
{
{
struct
display
*
p
=
&
fb_display
[
fg_console
];
/* draw to vt in foreground */
struct
display
*
p
=
&
fb_display
[
fg_console
];
/* draw to vt in foreground */
struct
fb_info
*
info
=
p
->
fb_info
;
struct
fb_info
*
info
=
p
->
fb_info
;
struct
vc_data
*
vc
=
info
->
display_fg
;
#ifdef CONFIG_FBCON_ACCEL
#ifdef CONFIG_FBCON_ACCEL
struct
fb_image
image
;
struct
fb_image
image
;
u32
*
palette
=
NULL
,
*
saved_palette
=
NULL
;
u32
*
palette
=
NULL
,
*
saved_palette
=
NULL
;
...
@@ -2424,8 +2420,7 @@ static int __init fbcon_show_logo(void)
...
@@ -2424,8 +2420,7 @@ static int __init fbcon_show_logo(void)
*/
*/
palette
=
kmalloc
(
256
*
4
,
GFP_KERNEL
);
palette
=
kmalloc
(
256
*
4
,
GFP_KERNEL
);
if
(
palette
==
NULL
)
if
(
palette
==
NULL
)
return
(
LOGO_H
+
fontheight
(
p
)
-
return
(
LOGO_H
+
vc
->
vc_font
.
height
-
1
)
/
vc
->
vc_font
.
height
;
1
)
/
fontheight
(
p
);
for
(
i
=
0
;
i
<
LINUX_LOGO_COLORS
;
i
++
)
{
for
(
i
=
0
;
i
<
LINUX_LOGO_COLORS
;
i
++
)
{
palette
[
i
+
32
]
=
palette
[
i
+
32
]
=
...
@@ -2596,7 +2591,7 @@ static int __init fbcon_show_logo(void)
...
@@ -2596,7 +2591,7 @@ static int __init fbcon_show_logo(void)
/* Modes not yet supported: packed pixels with depth != 8 (does such a
/* Modes not yet supported: packed pixels with depth != 8 (does such a
* thing exist in reality?) */
* thing exist in reality?) */
return
done
?
(
LOGO_H
+
fontheight
(
p
)
-
1
)
/
fontheight
(
p
)
:
0
;
return
done
?
(
LOGO_H
+
vc
->
vc_font
.
height
-
1
)
/
vc
->
vc_font
.
height
:
0
;
}
}
/*
/*
...
...
drivers/video/console/fbcon.h
View file @
7aabce2b
...
@@ -61,8 +61,6 @@ struct display {
...
@@ -61,8 +61,6 @@ struct display {
unsigned
long
cursor_pos
;
unsigned
long
cursor_pos
;
char
fontname
[
40
];
/* Font associated to this display */
char
fontname
[
40
];
/* Font associated to this display */
u_char
*
fontdata
;
u_char
*
fontdata
;
unsigned
short
_fontheight
;
unsigned
short
_fontwidth
;
int
userfont
;
/* != 0 if fontdata kmalloc()ed */
int
userfont
;
/* != 0 if fontdata kmalloc()ed */
u_short
scrollmode
;
/* Scroll Method */
u_short
scrollmode
;
/* Scroll Method */
short
yscroll
;
/* Hardware scrolling */
short
yscroll
;
/* Hardware scrolling */
...
...
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