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
903c38a4
Commit
903c38a4
authored
Dec 27, 2002
by
James Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Radeon driver port to final api. Cleanup of vga16fb.
parent
fd07f74e
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
159 additions
and
87 deletions
+159
-87
drivers/video/Makefile
drivers/video/Makefile
+1
-1
drivers/video/console/fbcon.c
drivers/video/console/fbcon.c
+0
-1
drivers/video/radeonfb.c
drivers/video/radeonfb.c
+27
-11
drivers/video/vga16fb.c
drivers/video/vga16fb.c
+1
-69
include/video/radeon.h
include/video/radeon.h
+130
-5
No files found.
drivers/video/Makefile
View file @
903c38a4
...
@@ -26,7 +26,7 @@ obj-$(CONFIG_FB_APOLLO) += dnfb.o cfbfillrect.o cfbimgblt.o
...
@@ -26,7 +26,7 @@ obj-$(CONFIG_FB_APOLLO) += dnfb.o cfbfillrect.o cfbimgblt.o
obj-$(CONFIG_FB_Q40)
+=
q40fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_Q40)
+=
q40fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_ATARI)
+=
atafb.o
obj-$(CONFIG_FB_ATARI)
+=
atafb.o
obj-$(CONFIG_FB_ATY128)
+=
aty128fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_ATY128)
+=
aty128fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_RADEON)
+=
radeonfb.o
obj-$(CONFIG_FB_RADEON)
+=
radeonfb.o
cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_NEOMAGIC)
+=
neofb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_NEOMAGIC)
+=
neofb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_IGA)
+=
igafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_IGA)
+=
igafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_CONTROL)
+=
controlfb.o
obj-$(CONFIG_FB_CONTROL)
+=
controlfb.o
...
...
drivers/video/console/fbcon.c
View file @
903c38a4
...
@@ -2543,7 +2543,6 @@ int __init fb_console_init(void)
...
@@ -2543,7 +2543,6 @@ int __init fb_console_init(void)
if
(
!
num_registered_fb
)
if
(
!
num_registered_fb
)
return
-
ENODEV
;
return
-
ENODEV
;
take_over_console
(
&
fb_con
,
first_fb_vc
,
last_fb_vc
,
fbcon_is_default
);
take_over_console
(
&
fb_con
,
first_fb_vc
,
last_fb_vc
,
fbcon_is_default
);
__unsafe
(
THIS_MODULE
);
return
0
;
return
0
;
}
}
...
...
drivers/video/radeonfb.c
View file @
903c38a4
...
@@ -361,8 +361,6 @@ struct radeonfb_info {
...
@@ -361,8 +361,6 @@ struct radeonfb_info {
unsigned
char
*
EDID
;
unsigned
char
*
EDID
;
unsigned
char
*
bios_seg
;
unsigned
char
*
bios_seg
;
struct
display
disp
;
/* Will disappear */
u32
pseudo_palette
[
17
];
u32
pseudo_palette
[
17
];
struct
{
u8
red
,
green
,
blue
,
pad
;
}
palette
[
256
];
struct
{
u8
red
,
green
,
blue
,
pad
;
}
palette
[
256
];
...
@@ -1289,7 +1287,7 @@ static int __devinit radeon_init_disp (struct radeonfb_info *rinfo)
...
@@ -1289,7 +1287,7 @@ static int __devinit radeon_init_disp (struct radeonfb_info *rinfo)
fb_alloc_cmap
(
&
info
->
cmap
,
256
,
0
);
fb_alloc_cmap
(
&
info
->
cmap
,
256
,
0
);
var
.
activate
=
FB_ACTIVATE_NOW
;
var
.
activate
=
FB_ACTIVATE_NOW
;
gen_set_var
(
&
var
,
-
1
,
info
);
fb_set_var
(
&
var
,
info
);
return
0
;
return
0
;
}
}
...
@@ -1508,7 +1506,7 @@ static int radeonfb_pan_display (struct fb_var_screeninfo *var,
...
@@ -1508,7 +1506,7 @@ static int radeonfb_pan_display (struct fb_var_screeninfo *var,
static
int
radeonfb_ioctl
(
struct
inode
*
inode
,
struct
file
*
file
,
unsigned
int
cmd
,
static
int
radeonfb_ioctl
(
struct
inode
*
inode
,
struct
file
*
file
,
unsigned
int
cmd
,
unsigned
long
arg
,
int
con
,
struct
fb_info
*
info
)
unsigned
long
arg
,
struct
fb_info
*
info
)
{
{
struct
radeonfb_info
*
rinfo
=
(
struct
radeonfb_info
*
)
info
;
struct
radeonfb_info
*
rinfo
=
(
struct
radeonfb_info
*
)
info
;
unsigned
int
tmp
;
unsigned
int
tmp
;
...
@@ -1872,14 +1870,26 @@ static int radeonfb_set_par (struct fb_info *info)
...
@@ -1872,14 +1870,26 @@ static int radeonfb_set_par (struct fb_info *info)
newmode
.
crtc_pitch
|=
(
newmode
.
crtc_pitch
<<
16
);
newmode
.
crtc_pitch
|=
(
newmode
.
crtc_pitch
<<
16
);
#if defined(__BIG_ENDIAN)
#if defined(__BIG_ENDIAN)
newmode
.
surface_cntl
=
SURF_TRANSLATION_DIS
;
/*
* It looks like recent chips have a problem with SURFACE_CNTL,
* setting SURF_TRANSLATION_DIS completely disables the
* swapper as well, so we leave it unset now.
*/
newmode
.
surface_cntl
=
0
;
/* Setup swapping on both apertures, though we currently
* only use aperture 0, enabling swapper on aperture 1
* won't harm
*/
switch
(
mode
->
bits_per_pixel
)
{
switch
(
mode
->
bits_per_pixel
)
{
case
16
:
case
16
:
newmode
.
surface_cntl
|=
NONSURF_AP0_SWP_16BPP
;
newmode
.
surface_cntl
|=
NONSURF_AP0_SWP_16BPP
;
newmode
.
surface_cntl
|=
NONSURF_AP1_SWP_16BPP
;
break
;
break
;
case
24
:
case
24
:
case
32
:
case
32
:
newmode
.
surface_cntl
|=
NONSURF_AP0_SWP_32BPP
;
newmode
.
surface_cntl
|=
NONSURF_AP0_SWP_32BPP
;
newmode
.
surface_cntl
|=
NONSURF_AP1_SWP_32BPP
;
break
;
break
;
}
}
#endif
#endif
...
@@ -1935,6 +1945,11 @@ static int radeonfb_set_par (struct fb_info *info)
...
@@ -1935,6 +1945,11 @@ static int radeonfb_set_par (struct fb_info *info)
}
}
newmode
.
vclk_ecp_cntl
=
rinfo
->
init_state
.
vclk_ecp_cntl
;
newmode
.
vclk_ecp_cntl
=
rinfo
->
init_state
.
vclk_ecp_cntl
;
#ifdef CONFIG_ALL_PPC
/* Gross hack for iBook with M7 until I find out a proper fix */
if
(
machine_is_compatible
(
"PowerBook4,3"
)
&&
rinfo
->
arch
==
RADEON_M7
)
newmode
.
ppll_div_3
=
0x000600ad
;
#endif
/* CONFIG_ALL_PPC */
RTRACE
(
"post div = 0x%x
\n
"
,
rinfo
->
post_div
);
RTRACE
(
"post div = 0x%x
\n
"
,
rinfo
->
post_div
);
RTRACE
(
"fb_div = 0x%x
\n
"
,
rinfo
->
fb_div
);
RTRACE
(
"fb_div = 0x%x
\n
"
,
rinfo
->
fb_div
);
...
@@ -2206,12 +2221,8 @@ static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo)
...
@@ -2206,12 +2221,8 @@ static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo)
info
=
&
rinfo
->
info
;
info
=
&
rinfo
->
info
;
// XXX ???
strncpy
(
info
->
modename
,
rinfo
->
name
,
sizeof
(
info
->
modename
));
info
->
currcon
=
-
1
;
info
->
currcon
=
-
1
;
info
->
par
=
rinfo
;
info
->
par
=
rinfo
;
info
->
disp
=
&
rinfo
->
disp
;
info
->
pseudo_palette
=
rinfo
->
pseudo_palette
;
info
->
pseudo_palette
=
rinfo
->
pseudo_palette
;
info
->
node
=
NODEV
;
info
->
node
=
NODEV
;
info
->
flags
=
FBINFO_FLAG_DEFAULT
;
info
->
flags
=
FBINFO_FLAG_DEFAULT
;
...
@@ -2273,7 +2284,12 @@ static int radeon_set_backlight_enable(int on, int level, void *data)
...
@@ -2273,7 +2284,12 @@ static int radeon_set_backlight_enable(int on, int level, void *data)
unsigned
int
lvds_gen_cntl
=
INREG
(
LVDS_GEN_CNTL
);
unsigned
int
lvds_gen_cntl
=
INREG
(
LVDS_GEN_CNTL
);
int
*
conv_table
;
int
*
conv_table
;
if
(
rinfo
->
arch
==
RADEON_M7
)
/* Pardon me for that hack... maybe some day we can figure
* out in what direction backlight should work on a given
* panel ?
*/
if
((
rinfo
->
arch
==
RADEON_M7
||
rinfo
->
arch
==
RADEON_M9
)
&&
!
machine_is_compatible
(
"PowerBook4,3"
))
conv_table
=
backlight_conv_m7
;
conv_table
=
backlight_conv_m7
;
else
else
conv_table
=
backlight_conv_m6
;
conv_table
=
backlight_conv_m6
;
...
...
drivers/video/vga16fb.c
View file @
903c38a4
...
@@ -329,9 +329,6 @@ static int vga16fb_release(struct fb_info *info, int user)
...
@@ -329,9 +329,6 @@ static int vga16fb_release(struct fb_info *info, int user)
static
int
vga16fb_check_var
(
struct
fb_var_screeninfo
*
var
,
static
int
vga16fb_check_var
(
struct
fb_var_screeninfo
*
var
,
struct
fb_info
*
info
)
struct
fb_info
*
info
)
{
{
#ifdef FBCON_HAS_VGA
struct
display
*
p
=
(
info
->
currcon
<
0
)
?
info
->
disp
:
(
fb_display
+
info
->
currcon
);
#endif
struct
vga16fb_par
*
par
=
(
struct
vga16fb_par
*
)
info
->
par
;
struct
vga16fb_par
*
par
=
(
struct
vga16fb_par
*
)
info
->
par
;
u32
xres
,
right
,
hslen
,
left
,
xtotal
;
u32
xres
,
right
,
hslen
,
left
,
xtotal
;
u32
yres
,
lower
,
vslen
,
upper
,
ytotal
;
u32
yres
,
lower
,
vslen
,
upper
,
ytotal
;
...
@@ -368,20 +365,7 @@ static int vga16fb_check_var(struct fb_var_screeninfo *var,
...
@@ -368,20 +365,7 @@ static int vga16fb_check_var(struct fb_var_screeninfo *var,
mode
=
MODE_SKIP4
|
MODE_8BPP
|
MODE_CFB
;
mode
=
MODE_SKIP4
|
MODE_8BPP
|
MODE_CFB
;
maxmem
=
16384
;
maxmem
=
16384
;
}
}
}
}
else
#ifdef FBCON_HAS_VGA
else
if
(
var
->
bits_per_pixel
==
0
)
{
int
fh
;
shift
=
3
;
mode
=
MODE_TEXT
;
fh
=
fontheight
(
p
);
if
(
!
fh
)
fh
=
16
;
maxmem
=
32768
*
fh
;
}
#endif
else
return
-
EINVAL
;
return
-
EINVAL
;
xres
=
(
var
->
xres
+
7
)
&
~
7
;
xres
=
(
var
->
xres
+
7
)
&
~
7
;
...
@@ -548,42 +532,6 @@ static int vga16fb_check_var(struct fb_var_screeninfo *var,
...
@@ -548,42 +532,6 @@ static int vga16fb_check_var(struct fb_var_screeninfo *var,
}
}
#undef FAIL
#undef FAIL
#ifdef FBCON_HAS_VGA
static
void
vga16fb_load_font
(
struct
display
*
p
)
{
int
chars
;
unsigned
char
*
font
;
unsigned
char
*
dest
;
int
chars
;
if
(
!
p
||
!
p
->
fontdata
)
return
;
chars
=
256
;
font
=
p
->
fontdata
;
dest
=
vga16fb
.
screen_base
;
vga_io_wseq
(
0x00
,
0x01
);
vga_io_wseq
(
VGA_SEQ_PLANE_WRITE
,
0x04
);
vga_io_wseq
(
VGA_SEQ_MEMORY_MODE
,
0x07
);
vga_io_wseq
(
0x00
,
0x03
);
vga_io_wgfx
(
VGA_GFX_MODE
,
0x00
);
vga_io_wgfx
(
VGA_GFX_MISC
,
0x04
);
while
(
chars
--
)
{
int
i
;
for
(
i
=
fontheight
(
p
);
i
>
0
;
i
--
)
writeb
(
*
font
++
,
dest
++
);
dest
+=
32
-
fontheight
(
p
);
}
vga_io_wseq
(
0x00
,
0x01
);
vga_io_wseq
(
VGA_SEQ_PLANE_WRITE
,
0x03
);
vga_io_wseq
(
VGA_SEQ_MEMORY_MODE
,
0x03
);
vga_io_wseq
(
0x00
,
0x03
);
vga_io_wgfx
(
VGA_GFX_MODE
,
0x10
);
vga_io_wgfx
(
VGA_GFX_MISC
,
0x06
);
}
#endif
static
int
vga16fb_set_par
(
struct
fb_info
*
info
)
static
int
vga16fb_set_par
(
struct
fb_info
*
info
)
{
{
struct
vga16fb_par
*
par
=
(
struct
vga16fb_par
*
)
info
->
par
;
struct
vga16fb_par
*
par
=
(
struct
vga16fb_par
*
)
info
->
par
;
...
@@ -690,10 +638,6 @@ static int vga16fb_set_par(struct fb_info *info)
...
@@ -690,10 +638,6 @@ static int vga16fb_set_par(struct fb_info *info)
vga_io_wattr
(
i
,
atc
[
i
]);
vga_io_wattr
(
i
,
atc
[
i
]);
}
}
#ifdef FBCON_HAS_VGA
if
(
par
->
mode
&
MODE_TEXT
)
vga16fb_load_font
(
p
);
#endif
/* Wait for screen to stabilize. */
/* Wait for screen to stabilize. */
mdelay
(
50
);
mdelay
(
50
);
...
@@ -1051,10 +995,6 @@ void vga16fb_fillrect(struct fb_info *info, struct fb_fillrect *rect)
...
@@ -1051,10 +995,6 @@ void vga16fb_fillrect(struct fb_info *info, struct fb_fillrect *rect)
}
else
}
else
vga_8planes_fillrect
(
info
,
rect
);
vga_8planes_fillrect
(
info
,
rect
);
break
;
break
;
#ifdef FBCON_HAS_VGA
case
FB_TYPE_TEXT
:
break
;
#endif
case
FB_TYPE_PACKED_PIXELS
:
case
FB_TYPE_PACKED_PIXELS
:
default:
default:
cfb_fillrect
(
info
,
rect
);
cfb_fillrect
(
info
,
rect
);
...
@@ -1198,10 +1138,6 @@ void vga16fb_copyarea(struct fb_info *info, struct fb_copyarea *area)
...
@@ -1198,10 +1138,6 @@ void vga16fb_copyarea(struct fb_info *info, struct fb_copyarea *area)
}
else
}
else
vga_8planes_copyarea
(
info
,
area
);
vga_8planes_copyarea
(
info
,
area
);
break
;
break
;
#ifdef FBCON_HAS_VGA
case
FB_TYPE_TEXT
:
break
;
#endif
case
FB_TYPE_PACKED_PIXELS
:
case
FB_TYPE_PACKED_PIXELS
:
default:
default:
cfb_copyarea
(
info
,
area
);
cfb_copyarea
(
info
,
area
);
...
@@ -1313,10 +1249,6 @@ void vga_imageblit_expand(struct fb_info *info, struct fb_image *image)
...
@@ -1313,10 +1249,6 @@ void vga_imageblit_expand(struct fb_info *info, struct fb_image *image)
}
else
}
else
vga_8planes_imageblit
(
info
,
image
);
vga_8planes_imageblit
(
info
,
image
);
break
;
break
;
#ifdef FBCON_HAS_VGA
case
FB_TYPE_TEXT
:
break
;
#endif
case
FB_TYPE_PACKED_PIXELS
:
case
FB_TYPE_PACKED_PIXELS
:
default:
default:
cfb_imageblit
(
info
,
image
);
cfb_imageblit
(
info
,
image
);
...
...
include/video/radeon.h
View file @
903c38a4
This diff is collapsed.
Click to expand it.
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