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
d1f2446e
Commit
d1f2446e
authored
Dec 26, 2002
by
Richard Henderson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TGAFB] Minor bug fixes to obtain a working TGA console
with the new FB API.
parent
aa5e715a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
22 deletions
+9
-22
drivers/video/tgafb.c
drivers/video/tgafb.c
+9
-22
No files found.
drivers/video/tgafb.c
View file @
d1f2446e
/*
* linux/drivers/video/tgafb.c -- DEC 21030 TGA frame buffer device
*
* Copyright (C) 1999,2000 Martin Lucina, Tom Zerucha
*
* $Id: tgafb.c,v 1.12.2.3 2000/04/04 06:44:56 mato Exp $
*
* This driver is partly based on the original TGA framebuffer device, which
* was partly based on the original TGA console driver, which are
*
* Copyright (C) 1997 Geert Uytterhoeven
* Copyright (C) 1995 Jay Estabrook
* Copyright (C) 1997 Geert Uytterhoeven
* Copyright (C) 1999,2000 Martin Lucina, Tom Zerucha
* Copyright (C) 2002 Richard Henderson
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive for
* more details.
*/
/* KNOWN PROBLEMS/TO DO ===================================================== *
*
* - How to set a single color register on 24-plane cards?
*
* - Hardware cursor/other text acceleration methods
*
* - Some redraws can stall kernel for several seconds
* [This should now be solved by the fast memmove() patch in 2.3.6]
*
* KNOWN PROBLEMS/TO DO ==================================================== */
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
...
...
@@ -76,6 +60,7 @@ static struct fb_ops tgafb_ops = {
.
fb_fillrect
=
cfb_fillrect
,
.
fb_copyarea
=
cfb_copyarea
,
.
fb_imageblit
=
cfb_imageblit
,
.
fb_cursor
=
soft_cursor
,
};
...
...
@@ -446,8 +431,10 @@ tgafb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue,
TGA_WRITE_REG
(
par
,
red
|
(
BT485_DATA_PAL
<<
8
),
TGA_RAMDAC_REG
);
TGA_WRITE_REG
(
par
,
green
|
(
BT485_DATA_PAL
<<
8
),
TGA_RAMDAC_REG
);
TGA_WRITE_REG
(
par
,
blue
|
(
BT485_DATA_PAL
<<
8
),
TGA_RAMDAC_REG
);
}
else
if
(
regno
<
16
)
{
u32
value
=
(
red
<<
16
)
|
(
green
<<
8
)
|
blue
;
((
u32
*
)
info
->
pseudo_palette
)[
regno
]
=
value
;
}
/* How to set a single color register on 24-plane cards?? */
return
0
;
}
...
...
@@ -594,6 +581,7 @@ tgafb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
return
-
ENOMEM
;
}
memset
(
all
,
0
,
sizeof
(
*
all
));
pci_set_drvdata
(
pdev
,
all
);
/* Request the mem regions. */
bar0_start
=
pci_resource_start
(
pdev
,
0
);
...
...
@@ -620,12 +608,11 @@ tgafb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
all
->
par
.
tga_type
=
tga_type
;
pci_read_config_byte
(
pdev
,
PCI_REVISION_ID
,
&
all
->
par
.
tga_chip_rev
);
pci_set_drvdata
(
pdev
,
&
all
->
info
);
/* Setup framebuffer. */
all
->
info
.
node
=
NODEV
;
all
->
info
.
flags
=
FBINFO_FLAG_DEFAULT
;
all
->
info
.
fbops
=
&
tgafb_ops
;
all
->
info
.
screen_base
=
(
char
*
)
all
->
par
.
tga_fb_base
;
all
->
info
.
currcon
=
-
1
;
all
->
info
.
par
=
&
all
->
par
;
all
->
info
.
pseudo_palette
=
all
->
pseudo_palette
;
...
...
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