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
4c1e49dc
Commit
4c1e49dc
authored
Aug 05, 2002
by
James Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanups and bug fixes.
parent
fcc694c7
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
152 additions
and
166 deletions
+152
-166
drivers/video/aty/atyfb.h
drivers/video/aty/atyfb.h
+5
-4
drivers/video/aty/atyfb_base.c
drivers/video/aty/atyfb_base.c
+101
-103
drivers/video/aty/mach64_accel.c
drivers/video/aty/mach64_accel.c
+1
-1
drivers/video/cfbcopyarea.c
drivers/video/cfbcopyarea.c
+23
-15
drivers/video/cfbfillrect.c
drivers/video/cfbfillrect.c
+14
-34
drivers/video/offb.c
drivers/video/offb.c
+7
-7
drivers/video/pm3fb.h
drivers/video/pm3fb.h
+1
-1
include/video/fbcon.h
include/video/fbcon.h
+0
-1
No files found.
drivers/video/aty/atyfb.h
View file @
4c1e49dc
...
...
@@ -103,6 +103,7 @@ struct atyfb_par {
int
open
;
#endif
#ifdef CONFIG_PMAC_PBOOK
struct
fb_info
*
next
;
unsigned
char
*
save_framebuffer
;
unsigned
long
save_pll
[
64
];
#endif
...
...
@@ -286,7 +287,7 @@ extern void atyfb_fillrect(struct fb_info *info, struct fb_fillrect *rect);
* Text console acceleration
*/
extern
const
struct
display_switch
fbcon_aty8
;
extern
const
struct
display_switch
fbcon_aty16
;
extern
const
struct
display_switch
fbcon_aty24
;
extern
const
struct
display_switch
fbcon_aty32
;
extern
struct
display_switch
fbcon_aty8
;
extern
struct
display_switch
fbcon_aty16
;
extern
struct
display_switch
fbcon_aty24
;
extern
struct
display_switch
fbcon_aty32
;
drivers/video/aty/atyfb_base.c
View file @
4c1e49dc
This diff is collapsed.
Click to expand it.
drivers/video/aty/mach64_accel.c
View file @
4c1e49dc
...
...
@@ -340,7 +340,7 @@ static void name(struct vc_data *conp, struct display *p, args) \
fbcon_cfb##width##_clear_margins(conp, p, bottom_only), \
int bottom_only) \
\
const
struct display_switch fbcon_aty##width = { \
struct display_switch fbcon_aty##width = { \
setup: fbcon_cfb##width##_setup, \
bmove: fbcon_aty_bmove, \
clear: fbcon_aty_clear, \
...
...
drivers/video/cfbcopyarea.c
View file @
4c1e49dc
...
...
@@ -28,6 +28,14 @@
#include <asm/io.h>
#include <video/fbcon.h>
#if BITS_PER_LONG == 32
#define FB_READ fb_readl
#define FB_WRITE fb_writel
#else
#define FB_READ fb_readq
#define FB_WRITE fb_writeq
#endif
void
cfb_copyarea
(
struct
fb_info
*
p
,
struct
fb_copyarea
*
area
)
{
int
x2
,
y2
,
lineincr
,
shift
,
shift_right
,
shift_left
,
old_dx
,
old_dy
;
...
...
@@ -137,19 +145,19 @@ void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area)
dst
=
(
unsigned
long
*
)
dst1
;
src
=
(
unsigned
long
*
)
src1
;
last
=
(
fb_readl
(
src
)
&
start_mask
);
last
=
(
FB_READ
(
src
)
&
start_mask
);
if
(
shift
>
0
)
fb_writel
(
fb_readl
(
dst
)
|
(
last
>>
shift_right
),
dst
);
FB_WRITE
(
FB_READ
(
dst
)
|
(
last
>>
shift_right
),
dst
);
for
(
j
=
0
;
j
<
n
;
j
++
)
{
dst
++
;
tmp
=
fb_readl
(
src
);
tmp
=
FB_READ
(
src
);
src
++
;
fb_writel
((
last
<<
shift_left
)
|
(
tmp
>>
shift_right
),
dst
);
FB_WRITE
((
last
<<
shift_left
)
|
(
tmp
>>
shift_right
),
dst
);
last
=
tmp
;
src
++
;
}
fb_writel
(
fb_readl
(
dst
)
|
(
last
<<
shift_left
),
dst
);
FB_WRITE
(
FB_READ
(
dst
)
|
(
last
<<
shift_left
),
dst
);
src1
+=
lineincr
;
dst1
+=
lineincr
;
}
while
(
--
height
);
...
...
@@ -161,19 +169,19 @@ void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area)
dst
=
(
unsigned
long
*
)
dst1
;
src
=
(
unsigned
long
*
)
src1
;
last
=
(
fb_readl
(
src
)
&
end_mask
);
last
=
(
FB_READ
(
src
)
&
end_mask
);
if
(
shift
<
0
)
fb_writel
(
fb_readl
(
dst
)
|
(
last
>>
shift_right
),
dst
);
FB_WRITE
(
FB_READ
(
dst
)
|
(
last
>>
shift_right
),
dst
);
for
(
j
=
0
;
j
<
n
;
j
++
)
{
dst
--
;
tmp
=
fb_readl
(
src
);
tmp
=
FB_READ
(
src
);
src
--
;
fb_writel
((
tmp
<<
shift_left
)
|
(
last
>>
shift_right
),
dst
);
FB_WRITE
((
tmp
<<
shift_left
)
|
(
last
>>
shift_right
),
dst
);
last
=
tmp
;
src
--
;
}
fb_writel
(
fb_readl
(
dst
)
|
(
last
>>
shift_right
),
dst
);
FB_WRITE
(
FB_READ
(
dst
)
|
(
last
>>
shift_right
),
dst
);
src1
+=
lineincr
;
dst1
+=
lineincr
;
}
while
(
--
height
);
...
...
@@ -187,16 +195,16 @@ void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area)
src
=
(
unsigned
long
*
)
(
src1
-
start_index
);
if
(
start_mask
)
fb_writel
(
fb_readl
(
src
)
|
start_mask
,
dst
);
FB_WRITE
(
FB_READ
(
src
)
|
start_mask
,
dst
);
for
(
j
=
0
;
j
<
n
;
j
++
)
{
fb_writel
(
fb_readl
(
src
),
dst
);
FB_WRITE
(
FB_READ
(
src
),
dst
);
dst
++
;
src
++
;
}
if
(
end_mask
)
fb_writel
(
fb_readl
(
src
)
|
end_mask
,
dst
);
FB_WRITE
(
FB_READ
(
src
)
|
end_mask
,
dst
);
src1
+=
lineincr
;
dst1
+=
lineincr
;
}
while
(
--
height
);
...
...
@@ -207,9 +215,9 @@ void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area)
src
=
(
unsigned
long
*
)
src1
;
if
(
start_mask
)
fb_writel
(
fb_readl
(
src
)
|
start_mask
,
dst
);
FB_WRITE
(
FB_READ
(
src
)
|
start_mask
,
dst
);
for
(
j
=
0
;
j
<
n
;
j
++
)
{
fb_writel
(
fb_readl
(
src
),
dst
);
FB_WRITE
(
FB_READ
(
src
),
dst
);
dst
--
;
src
--
;
}
...
...
drivers/video/cfbfillrect.c
View file @
4c1e49dc
...
...
@@ -22,6 +22,14 @@
#include <asm/types.h>
#include <video/fbcon.h>
#if BITS_PER_LONG == 32
#define FB_READ fb_readl
#define FB_WRITE fb_writel
#else
#define FB_READ fb_readq
#define FB_WRITE fb_writeq
#endif
void
cfb_fillrect
(
struct
fb_info
*
p
,
struct
fb_fillrect
*
rect
)
{
unsigned
long
start_index
,
end_index
,
start_mask
=
0
,
end_mask
=
0
;
...
...
@@ -93,33 +101,19 @@ void cfb_fillrect(struct fb_info *p, struct fb_fillrect *rect)
dst
=
(
unsigned
long
*
)
(
dst1
-
start_index
);
if
(
start_mask
)
{
#if BITS_PER_LONG == 32
fb_writel
(
fb_readl
(
dst
)
|
start_mask
,
dst
);
#else
fb_writeq
(
fb_readq
(
dst
)
|
FB_WRITE
(
FB_READ
(
dst
)
|
start_mask
,
dst
);
#endif
dst
++
;
}
for
(
i
=
0
;
i
<
n
;
i
++
)
{
#if BITS_PER_LONG == 32
fb_writel
(
fg
,
dst
);
#else
fb_writeq
(
fg
,
dst
);
#endif
FB_WRITE
(
fg
,
dst
);
dst
++
;
}
if
(
end_mask
)
#if BITS_PER_LONG == 32
fb_writel
(
fb_readl
(
dst
)
|
end_mask
,
dst
);
#else
fb_writeq
(
fb_readq
(
dst
)
|
end_mask
,
FB_WRITE
(
FB_READ
(
dst
)
|
end_mask
,
dst
);
#endif
dst1
+=
linesize
;
}
while
(
--
height
);
break
;
...
...
@@ -128,33 +122,19 @@ void cfb_fillrect(struct fb_info *p, struct fb_fillrect *rect)
dst
=
(
unsigned
long
*
)
(
dst1
-
start_index
);
if
(
start_mask
)
{
#if BITS_PER_LONG == 32
fb_writel
(
fb_readl
(
dst
)
^
FB_WRITE
(
FB_READ
(
dst
)
^
start_mask
,
dst
);
#else
fb_writeq
(
fb_readq
(
dst
)
^
start_mask
,
dst
);
#endif
dst
++
;
}
for
(
i
=
0
;
i
<
n
;
i
++
)
{
#if BITS_PER_LONG == 32
fb_writel
(
fb_readl
(
dst
)
^
fg
,
dst
);
#else
fb_writeq
(
fb_readq
(
dst
)
^
fg
,
dst
);
#endif
FB_WRITE
(
FB_READ
(
dst
)
^
fg
,
dst
);
dst
++
;
}
if
(
end_mask
)
{
#if BITS_PER_LONG == 32
fb_writel
(
fb_readl
(
dst
)
^
end_mask
,
FB_WRITE
(
FB_READ
(
dst
)
^
end_mask
,
dst
);
#else
fb_writeq
(
fb_readq
(
dst
)
^
end_mask
,
dst
);
#endif
}
dst1
+=
linesize
;
}
while
(
--
height
);
...
...
drivers/video/offb.c
View file @
4c1e49dc
...
...
@@ -397,7 +397,6 @@ static void __init offb_init_fb(const char *name, const char *full_name,
struct
fb_fix_screeninfo
*
fix
;
struct
fb_var_screeninfo
*
var
;
struct
fb_info
*
info
;
int
i
;
if
(
!
request_mem_region
(
res_start
,
res_size
,
"offb"
))
return
;
...
...
@@ -412,14 +411,15 @@ static void __init offb_init_fb(const char *name, const char *full_name,
return
;
}
info
=
kmalloc
(
sizeof
(
struct
fb_info
)
+
sizeof
(
struct
display
)
+
sizeof
(
u32
)
*
17
,
GFP_ATOMIC
);
size
=
sizeof
(
struct
fb_info
)
+
sizeof
(
struct
display
)
+
sizeof
(
u32
)
*
17
;
info
=
kmalloc
(
size
,
GFP_ATOMIC
);
if
(
info
==
0
)
{
release_mem_region
(
res_start
,
res_size
);
return
;
}
memset
(
info
,
0
,
size
of
(
*
info
)
);
memset
(
info
,
0
,
size
);
fix
=
&
info
->
fix
;
var
=
&
info
->
var
;
...
...
@@ -463,7 +463,7 @@ static void __init offb_init_fb(const char *name, const char *full_name,
unsigned
long
base
=
address
&
0xff000000UL
;
par
->
cmap_adr
=
ioremap
(
base
+
0x7ff000
,
0x1000
)
+
0xcc0
;
par
->
cmap_data
=
info
->
cmap_adr
+
1
;
par
->
cmap_data
=
par
->
cmap_adr
+
1
;
par
->
cmap_type
=
cmap_m64
;
}
else
if
(
device_is_compatible
(
dp
,
"pci1014,b7"
))
{
unsigned
long
regbase
=
dp
->
addrs
[
0
].
address
;
...
...
@@ -553,7 +553,7 @@ static void __init offb_init_fb(const char *name, const char *full_name,
}
printk
(
KERN_INFO
"fb%d: Open Firmware frame buffer device on %s
\n
"
,
GET_FB_IDX
(
info
->
info
.
node
),
full_name
);
GET_FB_IDX
(
info
->
node
),
full_name
);
}
MODULE_LICENSE
(
"GPL"
);
drivers/video/pm3fb.h
View file @
4c1e49dc
...
...
@@ -1281,4 +1281,4 @@ do { \
} \
} while (0)
#endif
PM3FB_H
#endif
/* PM3FB_H */
include/video/fbcon.h
View file @
4c1e49dc
...
...
@@ -73,7 +73,6 @@ struct display {
#endif
/* Filled in by the low-level console driver */
struct
vc_data
*
conp
;
/* pointer to console data */
struct
fb_info
*
fb_info
;
/* frame buffer for this console */
int
vrows
;
/* number of virtual rows */
...
...
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