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
fd8f1848
Commit
fd8f1848
authored
Mar 13, 2003
by
James Simmons
Committed by
James Simmons
Mar 13, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FBCON] Cursor handling clean up. I nuked several static variables.
parent
251b237b
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
196 additions
and
245 deletions
+196
-245
drivers/video/console/fbcon.c
drivers/video/console/fbcon.c
+172
-217
drivers/video/console/fbcon.h
drivers/video/console/fbcon.h
+13
-16
drivers/video/softcursor.c
drivers/video/softcursor.c
+11
-12
No files found.
drivers/video/console/fbcon.c
View file @
fd8f1848
This diff is collapsed.
Click to expand it.
drivers/video/console/fbcon.h
View file @
fd8f1848
...
...
@@ -29,14 +29,11 @@ struct display {
/* Filled in by the low-level console driver */
struct
fb_info
*
fb_info
;
/* frame buffer for this console */
int
vrows
;
/* number of virtual rows */
unsigned
short
cursor_x
;
/* current cursor position */
unsigned
short
cursor_y
;
char
fontname
[
40
];
/* Font associated to this display */
u_char
*
fontdata
;
int
userfont
;
/* != 0 if fontdata kmalloc()ed */
u_short
scrollmode
;
/* Scroll Method */
short
yscroll
;
/* Hardware scrolling */
unsigned
char
fgshift
,
bgshift
;
};
/* drivers/video/console/fbcon.c */
...
...
@@ -48,23 +45,23 @@ extern void set_con2fb_map(int unit, int newidx);
*/
/* Color */
#define attr_fgcol(
p
,s) \
(((s) >> (
(p)->
fgshift)) & 0x0f)
#define attr_bgcol(
p
,s) \
(((s) >> (
(p)->
bgshift)) & 0x0f)
#define attr_bgcol_ec(
p,conp
) \
((
conp) ? (((conp)->vc_video_erase_char >> ((p)->
bgshift)) & 0x0f) : 0)
#define attr_fgcol_ec(
p
,vc) \
((vc) ? (((vc)->vc_video_erase_char >> (
(p)->
fgshift)) & 0x0f) : 0)
#define attr_fgcol(
fgshift
,s) \
(((s) >> (fgshift)) & 0x0f)
#define attr_bgcol(
bgshift
,s) \
(((s) >> (bgshift)) & 0x0f)
#define attr_bgcol_ec(
bgshift,vc
) \
((
vc) ? (((vc)->vc_video_erase_char >> (
bgshift)) & 0x0f) : 0)
#define attr_fgcol_ec(
fgshift
,vc) \
((vc) ? (((vc)->vc_video_erase_char >> (fgshift)) & 0x0f) : 0)
/* Monochrome */
#define attr_bold(
p,
s) \
#define attr_bold(s) \
((s) & 0x200)
#define attr_reverse(
p,s
) \
(((s) & 0x800) ^ (
(p)->
inverse ? 0x800 : 0))
#define attr_underline(
p,
s) \
#define attr_reverse(
s, inverse
) \
(((s) & 0x800) ^ (inverse ? 0x800 : 0))
#define attr_underline(s) \
((s) & 0x400)
#define attr_blink(
p,
s) \
#define attr_blink(s) \
((s) & 0x8000)
/*
...
...
drivers/video/softcursor.c
View file @
fd8f1848
...
...
@@ -19,12 +19,11 @@
int
soft_cursor
(
struct
fb_info
*
info
,
struct
fb_cursor
*
cursor
)
{
static
u8
src
[
64
];
struct
fb_image
image
;
unsigned
int
i
,
size
,
s_pitch
,
d_pitch
;
unsigned
dsize
=
((
cursor
->
image
.
width
+
7
)
/
8
)
*
cursor
->
image
.
height
;
unsigned
int
scan_align
=
info
->
pixmap
.
scan_align
-
1
;
unsigned
int
buf_align
=
info
->
pixmap
.
buf_align
-
1
;
unsigned
int
i
,
size
,
s_pitch
,
d_pitch
;
static
u8
src
[
64
];
u8
*
dst
;
s_pitch
=
(
cursor
->
image
.
width
+
7
)
/
8
;
...
...
@@ -32,7 +31,7 @@ int soft_cursor(struct fb_info *info, struct fb_cursor *cursor)
size
=
d_pitch
*
cursor
->
image
.
height
+
buf_align
;
size
&=
~
buf_align
;
dst
=
info
->
pixmap
.
addr
+
fb_get_buffer_offset
(
info
,
size
);
image
.
data
=
dst
;
i
nfo
->
cursor
.
i
mage
.
data
=
dst
;
if
(
cursor
->
enable
)
{
switch
(
cursor
->
rop
)
{
...
...
@@ -58,15 +57,15 @@ int soft_cursor(struct fb_info *info, struct fb_cursor *cursor)
cursor
->
image
.
height
);
}
image
.
bg_color
=
cursor
->
image
.
bg_color
;
image
.
fg_color
=
cursor
->
image
.
fg_color
;
image
.
dx
=
cursor
->
image
.
dx
;
image
.
dy
=
cursor
->
image
.
dy
;
image
.
width
=
cursor
->
image
.
width
;
image
.
height
=
cursor
->
image
.
height
;
image
.
depth
=
cursor
->
image
.
depth
;
i
nfo
->
cursor
.
i
mage
.
bg_color
=
cursor
->
image
.
bg_color
;
i
nfo
->
cursor
.
i
mage
.
fg_color
=
cursor
->
image
.
fg_color
;
i
nfo
->
cursor
.
i
mage
.
dx
=
cursor
->
image
.
dx
;
i
nfo
->
cursor
.
i
mage
.
dy
=
cursor
->
image
.
dy
;
i
nfo
->
cursor
.
i
mage
.
width
=
cursor
->
image
.
width
;
i
nfo
->
cursor
.
i
mage
.
height
=
cursor
->
image
.
height
;
i
nfo
->
cursor
.
i
mage
.
depth
=
cursor
->
image
.
depth
;
info
->
fbops
->
fb_imageblit
(
info
,
&
image
);
info
->
fbops
->
fb_imageblit
(
info
,
&
i
nfo
->
cursor
.
i
mage
);
return
0
;
}
...
...
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