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
nexedi
linux
Commits
2720bb7a
Commit
2720bb7a
authored
Aug 26, 2002
by
James Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for logo displaying for new api. Now new code supports 24 bpp.
parent
73b3c69e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
17 deletions
+66
-17
drivers/video/fbcon.c
drivers/video/fbcon.c
+66
-17
No files found.
drivers/video/fbcon.c
View file @
2720bb7a
...
@@ -305,14 +305,6 @@ void gen_set_disp(int con, struct fb_info *info)
...
@@ -305,14 +305,6 @@ void gen_set_disp(int con, struct fb_info *info)
}
}
*/
*/
if
(
info
->
var
.
bits_per_pixel
==
24
)
{
#ifdef FBCON_HAS_CFB24
display
->
scrollmode
=
SCROLL_YREDRAW
;
display
->
dispsw
=
&
fbcon_cfb24
;
return
;
#endif
}
#ifdef FBCON_HAS_ACCEL
#ifdef FBCON_HAS_ACCEL
display
->
scrollmode
=
SCROLL_YNOMOVE
;
display
->
scrollmode
=
SCROLL_YNOMOVE
;
display
->
dispsw
=
&
fbcon_accel
;
display
->
dispsw
=
&
fbcon_accel
;
...
@@ -775,11 +767,16 @@ static void fbcon_setup(int con, int init, int logo)
...
@@ -775,11 +767,16 @@ static void fbcon_setup(int con, int init, int logo)
kfree
(
save
);
kfree
(
save
);
}
}
}
}
if
(
logo
)
{
if
(
logo
)
{
logo_shown
=
-
2
;
if
(
logo_lines
>
conp
->
vc_bottom
)
{
conp
->
vc_top
=
logo_lines
;
logo_shown
=
-
1
;
}
printk
(
KERN_INFO
"fbcon_startup: disable boot-logo (boot-logo bigger than screen).
\n
"
);
}
else
{
logo_shown
=
-
2
;
conp
->
vc_top
=
logo_lines
;
}
}
if
(
con
==
fg_console
&&
softback_buf
)
{
if
(
con
==
fg_console
&&
softback_buf
)
{
int
l
=
fbcon_softback_size
/
conp
->
vc_size_row
;
int
l
=
fbcon_softback_size
/
conp
->
vc_size_row
;
...
@@ -2170,6 +2167,10 @@ static int __init fbcon_show_logo( void )
...
@@ -2170,6 +2167,10 @@ 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
;
#ifdef CONFIG_FBCON_ACCEL
struct
fb_image
image
;
u32
*
palette
=
NULL
,
*
saved_palette
=
NULL
;
#endif
int
depth
=
info
->
var
.
bits_per_pixel
;
int
depth
=
info
->
var
.
bits_per_pixel
;
int
line
=
p
->
next_line
;
int
line
=
p
->
next_line
;
unsigned
char
*
fb
=
info
->
screen_base
;
unsigned
char
*
fb
=
info
->
screen_base
;
...
@@ -2220,13 +2221,54 @@ static int __init fbcon_show_logo( void )
...
@@ -2220,13 +2221,54 @@ static int __init fbcon_show_logo( void )
logo
=
linux_logo_bw
;
logo
=
linux_logo_bw
;
logo_depth
=
1
;
logo_depth
=
1
;
}
}
#if defined(CONFIG_FBCON_ACCEL)
if
(
info
->
fix
.
visual
==
FB_VISUAL_TRUECOLOR
)
{
unsigned
char
mask
[
9
]
=
{
0
,
0x80
,
0xc0
,
0xe0
,
0xf0
,
0xf8
,
0xfc
,
0xfe
,
0xff
};
unsigned
char
redmask
,
greenmask
,
bluemask
;
int
redshift
,
greenshift
,
blueshift
;
/* Bug: Doesn't obey msb_right ... (who needs that?) */
redmask
=
mask
[
info
->
var
.
red
.
length
<
8
?
info
->
var
.
red
.
length
:
8
];
greenmask
=
mask
[
info
->
var
.
green
.
length
<
8
?
info
->
var
.
green
.
length
:
8
];
bluemask
=
mask
[
info
->
var
.
blue
.
length
<
8
?
info
->
var
.
blue
.
length
:
8
];
redshift
=
info
->
var
.
red
.
offset
-
(
8
-
info
->
var
.
red
.
length
);
greenshift
=
info
->
var
.
green
.
offset
-
(
8
-
info
->
var
.
green
.
length
);
blueshift
=
info
->
var
.
blue
.
offset
-
(
8
-
info
->
var
.
blue
.
length
);
/*
* We have to create a temporary palette since console palette is only
* 16 colors long.
*/
palette
=
kmalloc
(
256
*
4
,
GFP_KERNEL
);
if
(
palette
==
NULL
)
return
(
LOGO_H
+
fontheight
(
p
)
-
1
)
/
fontheight
(
p
);
for
(
i
=
0
;
i
<
LINUX_LOGO_COLORS
;
i
++
)
{
palette
[
i
+
32
]
=
(
safe_shift
((
linux_logo_red
[
i
]
&
redmask
),
redshift
)
|
safe_shift
((
linux_logo_green
[
i
]
&
greenmask
),
greenshift
)
|
safe_shift
((
linux_logo_blue
[
i
]
&
bluemask
),
blueshift
));
}
saved_palette
=
info
->
pseudo_palette
;
info
->
pseudo_palette
=
palette
;
image
.
width
=
LOGO_W
;
image
.
height
=
LOGO_H
;
image
.
depth
=
depth
;
image
.
data
=
logo
;
image
.
dy
=
0
;
}
#endif
if
(
info
->
fbops
->
fb_rasterimg
)
if
(
info
->
fbops
->
fb_rasterimg
)
info
->
fbops
->
fb_rasterimg
(
info
,
1
);
info
->
fbops
->
fb_rasterimg
(
info
,
1
);
for
(
x
=
0
;
x
<
num_online_cpus
()
*
(
LOGO_W
+
8
)
&&
for
(
x
=
0
;
x
<
num_online_cpus
()
*
(
LOGO_W
+
8
)
&&
x
<
info
->
var
.
xres
-
(
LOGO_W
+
8
);
x
+=
(
LOGO_W
+
8
))
{
x
<
info
->
var
.
xres
-
(
LOGO_W
+
8
);
x
+=
(
LOGO_W
+
8
))
{
#if defined (CONFIG_FBCON_ACCEL)
image
.
dx
=
x
;
info
->
fbops
->
fb_imageblit
(
info
,
&
image
);
done
=
1
;
#else
#if defined(CONFIG_FBCON_CFB16) || defined(CONFIG_FBCON_CFB24) || \
#if defined(CONFIG_FBCON_CFB16) || defined(CONFIG_FBCON_CFB24) || \
defined(CONFIG_FBCON_CFB32) || defined(CONFIG_FB_SBUS)
defined(CONFIG_FBCON_CFB32) || defined(CONFIG_FB_SBUS)
if
(
info
->
fix
.
visual
==
FB_VISUAL_DIRECTCOLOR
)
{
if
(
info
->
fix
.
visual
==
FB_VISUAL_DIRECTCOLOR
)
{
...
@@ -2483,12 +2525,19 @@ static int __init fbcon_show_logo( void )
...
@@ -2483,12 +2525,19 @@ static int __init fbcon_show_logo( void )
}
}
done
=
1
;
done
=
1
;
}
}
#endif
#endif
#endif
/* CONFIG_FBCON_ACCEL */
}
}
if
(
info
->
fbops
->
fb_rasterimg
)
if
(
info
->
fbops
->
fb_rasterimg
)
info
->
fbops
->
fb_rasterimg
(
info
,
0
);
info
->
fbops
->
fb_rasterimg
(
info
,
0
);
#if defined (CONFIG_FBCON_ACCEL)
if
(
palette
!=
NULL
)
kfree
(
palette
);
if
(
saved_palette
!=
NULL
)
info
->
pseudo_palette
=
saved_palette
;
#endif
/* 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?) */
...
...
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