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
5eff1a23
Commit
5eff1a23
authored
May 29, 2002
by
James Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fixes for NeoMagic and 3Dfx driver
parent
209d0f77
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
8 deletions
+49
-8
drivers/video/neofb.c
drivers/video/neofb.c
+46
-5
drivers/video/tdfxfb.c
drivers/video/tdfxfb.c
+3
-3
No files found.
drivers/video/neofb.c
View file @
5eff1a23
...
...
@@ -1194,6 +1194,48 @@ static int neofb_pan_display(struct fb_var_screeninfo *var, int con,
return
0
;
}
static
int
neofb_setcolreg
(
u_int
regno
,
u_int
red
,
u_int
green
,
u_int
blue
,
u_int
transp
,
struct
fb_info
*
fb
)
{
if
(
regno
>=
NR_PALETTE
)
return
-
EINVAL
;
switch
(
fb
->
var
.
bits_per_pixel
)
{
case
8
:
outb
(
regno
,
0x3c8
);
outb
(
red
>>
10
,
0x3c9
);
outb
(
green
>>
10
,
0x3c9
);
outb
(
blue
>>
10
,
0x3c9
);
break
;
case
16
:
if
(
regno
<
16
)
((
u16
*
)
fb
->
pseudo_palette
)[
regno
]
=
((
red
&
0xf800
))
|
((
green
&
0xfc00
)
>>
5
)
|
((
blue
&
0xf800
)
>>
11
);
break
;
case
24
:
if
(
regno
<
16
)
((
u32
*
)
fb
->
pseudo_palette
)[
regno
]
=
((
red
&
0xff00
)
<<
8
)
|
((
green
&
0xff00
))
|
((
blue
&
0xff00
)
>>
8
);
break
;
#ifdef NO_32BIT_SUPPORT_YET
case
32
:
if
(
regno
<
16
)
((
u32
*
)
fb
->
pseudo_palette
)[
regno
]
=
((
transp
&
0xff00
)
<<
16
)
|
((
red
&
0xff00
)
<<
8
)
|
((
green
&
0xff00
))
|
((
blue
&
0xff00
)
>>
8
);
break
;
#endif
default:
return
1
;
}
return
0
;
}
/*
* (Un)Blank the display.
*/
...
...
@@ -1376,7 +1418,6 @@ static struct fb_var_screeninfo __devinitdata neofb_var640x480x8 = {
lower_margin:
10
,
hsync_len:
96
,
vsync_len:
2
,
sync:
0
,
vmode:
FB_VMODE_NONINTERLACED
};
...
...
@@ -1948,10 +1989,10 @@ static struct pci_device_id neofb_devices[] __devinitdata = {
MODULE_DEVICE_TABLE
(
pci
,
neofb_devices
);
static
struct
pci_driver
neofb_driver
=
{
name:
"neofb"
,
id_table:
neofb_devices
,
probe:
neofb_probe
,
remove:
__devexit_p
(
neofb_remove
)
name:
"neofb"
,
id_table:
neofb_devices
,
probe:
neofb_probe
,
remove:
__devexit_p
(
neofb_remove
)
};
/* **************************** init-time only **************************** */
...
...
drivers/video/tdfxfb.c
View file @
5eff1a23
...
...
@@ -1090,9 +1090,6 @@ static int __devinit tdfxfb_probe(struct pci_dev *pdev,
info
->
switch_con
=
gen_switch
;
info
->
updatevar
=
gen_update_var
;
size
=
(
info
->
var
.
bits_per_pixel
==
8
)
?
256
:
16
;
fb_alloc_cmap
(
&
info
->
cmap
,
size
,
0
);
if
(
!
mode_option
)
mode_option
=
"640x480@60"
;
...
...
@@ -1100,6 +1097,9 @@ static int __devinit tdfxfb_probe(struct pci_dev *pdev,
if
(
!
err
||
err
==
4
)
info
->
var
=
tdfx_var
;
size
=
(
info
->
var
.
bits_per_pixel
==
8
)
?
256
:
16
;
fb_alloc_cmap
(
&
info
->
cmap
,
size
,
0
);
gen_set_var
(
&
info
->
var
,
-
1
,
info
);
if
(
register_framebuffer
(
info
)
<
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