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
4737042c
Commit
4737042c
authored
Dec 05, 2002
by
James Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VGA text mode handling cleanup. Rusty's janitoral cleanups.
parent
b4e5e606
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
427 additions
and
914 deletions
+427
-914
drivers/video/68328fb.c
drivers/video/68328fb.c
+212
-749
drivers/video/pm2fb.c
drivers/video/pm2fb.c
+2
-3
drivers/video/pm3fb.c
drivers/video/pm3fb.c
+2
-3
drivers/video/riva/fbdev.c
drivers/video/riva/fbdev.c
+3
-8
drivers/video/riva/rivafb.h
drivers/video/riva/rivafb.h
+2
-1
drivers/video/tgafb.c
drivers/video/tgafb.c
+2
-3
drivers/video/vga16fb.c
drivers/video/vga16fb.c
+5
-5
drivers/video/vgastate.c
drivers/video/vgastate.c
+176
-111
include/linux/fb.h
include/linux/fb.h
+0
-31
include/video/vga.h
include/video/vga.h
+23
-0
No files found.
drivers/video/68328fb.c
View file @
4737042c
This diff is collapsed.
Click to expand it.
drivers/video/pm2fb.c
View file @
4737042c
...
...
@@ -1967,8 +1967,7 @@ static void pm2fb_set_disp(const void* par, struct display* disp,
struct
pm2fb_par
*
p
=
(
struct
pm2fb_par
*
)
par
;
unsigned
long
flags
;
save_flags
(
flags
);
cli
();
local_irq_save
(
flags
);
#ifdef __alpha__
disp
->
screen_base
=
i
->
regions
.
v_fb
+
dense_mem
(
i
->
regions
.
v_fb
);
#else
...
...
@@ -2014,7 +2013,7 @@ static void pm2fb_set_disp(const void* par, struct display* disp,
disp
->
dispsw
=&
fbcon_dummy
;
break
;
}
restore_flags
(
flags
);
local_irq_restore
(
flags
);
}
#ifdef PM2FB_HW_CURSOR
...
...
drivers/video/pm3fb.c
View file @
4737042c
...
...
@@ -3297,8 +3297,7 @@ static void pm3fb_set_disp(const void *par, struct display *disp,
DTRACE
;
save_flags
(
flags
);
cli
();
local_irq_save
(
flags
);
info
->
info
.
screen_base
=
l_fb_info
->
v_fb
;
switch
(
p
->
depth
)
{
#ifdef FBCON_HAS_CFB8
...
...
@@ -3356,7 +3355,7 @@ static void pm3fb_set_disp(const void *par, struct display *disp,
DPRINTK
(
1
,
"Invalid depth, using fbcon_dummy
\n
"
);
break
;
}
restore_flags
(
flags
);
local_irq_restore
(
flags
);
}
/* */
...
...
drivers/video/riva/fbdev.c
View file @
4737042c
...
...
@@ -38,7 +38,6 @@
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/console.h>
#ifdef CONFIG_MTRR
#include <asm/mtrr.h>
#endif
...
...
@@ -50,13 +49,9 @@
#error This driver requires PCI support.
#endif
/* version number of this driver */
#define RIVAFB_VERSION "0.9.3"
/* ------------------------------------------------------------------------- *
*
* various helpful macros and constants
...
...
@@ -1166,12 +1161,12 @@ static int rivafb_open(struct fb_info *info, int user)
int
cnt
=
atomic_read
(
&
par
->
ref_count
);
if
(
!
cnt
)
{
memset
(
&
par
->
state
,
0
,
sizeof
(
struct
fb_
vgastate
));
memset
(
&
par
->
state
,
0
,
sizeof
(
struct
vgastate
));
par
->
state
.
flags
=
VGA_SAVE_MODE
|
VGA_SAVE_FONTS
;
/* save the DAC for Riva128 */
if
(
par
->
riva
.
Architecture
==
NV_ARCH_03
)
par
->
state
.
flags
|=
VGA_SAVE_CMAP
;
fb_
save_vga
(
&
par
->
state
);
save_vga
(
&
par
->
state
);
RivaGetConfig
(
&
par
->
riva
);
riva_save_state
(
par
,
&
par
->
initial_state
);
...
...
@@ -1192,7 +1187,7 @@ static int rivafb_release(struct fb_info *info, int user)
par
->
riva
.
LockUnlock
(
&
par
->
riva
,
0
);
par
->
riva
.
LoadStateExt
(
&
par
->
riva
,
&
par
->
initial_state
.
ext
);
fb_
restore_vga
(
&
par
->
state
);
restore_vga
(
&
par
->
state
);
par
->
riva
.
LockUnlock
(
&
par
->
riva
,
1
);
}
...
...
drivers/video/riva/rivafb.h
View file @
4737042c
...
...
@@ -3,6 +3,7 @@
#include <linux/config.h>
#include <linux/fb.h>
#include <video/vga.h>
#include "riva_hw.h"
/* GGI compatibility macros */
...
...
@@ -34,7 +35,7 @@ struct riva_par {
struct
riva_regs
initial_state
;
/* initial startup video mode */
struct
riva_regs
current_state
;
struct
fb_
vgastate
state
;
struct
vgastate
state
;
atomic_t
ref_count
;
riva_cfb8_cmap_t
cmap
[
256
];
/* VGA DAC palette cache */
u32
riva_palette
[
16
];
...
...
drivers/video/tgafb.c
View file @
4737042c
...
...
@@ -780,8 +780,7 @@ static int tgafb_blank(int blank, struct fb_info_gen *info)
u32
vhcr
,
vvcr
,
vvvr
;
unsigned
long
flags
;
save_flags
(
flags
);
cli
();
local_irq_save
(
flags
);
vhcr
=
TGA_READ_REG
(
TGA_HORIZ_REG
);
vvcr
=
TGA_READ_REG
(
TGA_VERT_REG
);
...
...
@@ -821,7 +820,7 @@ static int tgafb_blank(int blank, struct fb_info_gen *info)
break
;
}
restore_flags
(
flags
);
local_irq_restore
(
flags
);
return
0
;
}
...
...
drivers/video/vga16fb.c
View file @
4737042c
...
...
@@ -23,7 +23,7 @@
#include <linux/init.h>
#include <asm/io.h>
#include
"vga.h"
#include
<video/vga.h>
#define GRAPHICS_ADDR_REG VGA_GFX_I
/* Graphics address register. */
#define GRAPHICS_DATA_REG VGA_GFX_D
/* Graphics data register. */
...
...
@@ -70,7 +70,7 @@ static struct vga16fb_par {
unsigned
char
ModeControl
;
/* CRT-Controller:17h */
unsigned
char
ClockingMode
;
/* Seq-Controller:01h */
}
vga_state
;
struct
fb_
vgastate
state
;
struct
vgastate
state
;
atomic_t
ref_count
;
int
palette_blanked
,
vesa_blanked
,
mode
,
isVGA
;
u8
misc
,
pel_msk
,
vss
,
clkdiv
;
...
...
@@ -304,9 +304,9 @@ static int vga16fb_open(struct fb_info *info, int user)
int
cnt
=
atomic_read
(
&
par
->
ref_count
);
if
(
!
cnt
)
{
memset
(
&
par
->
state
,
0
,
sizeof
(
struct
fb_
vgastate
));
memset
(
&
par
->
state
,
0
,
sizeof
(
struct
vgastate
));
par
->
state
.
flags
=
8
;
fb_
save_vga
(
&
par
->
state
);
save_vga
(
&
par
->
state
);
}
atomic_inc
(
&
par
->
ref_count
);
return
0
;
...
...
@@ -320,7 +320,7 @@ static int vga16fb_release(struct fb_info *info, int user)
if
(
!
cnt
)
return
-
EINVAL
;
if
(
cnt
==
1
)
fb_
restore_vga
(
&
par
->
state
);
restore_vga
(
&
par
->
state
);
atomic_dec
(
&
par
->
ref_count
);
return
0
;
...
...
drivers/video/vgastate.c
View file @
4737042c
This diff is collapsed.
Click to expand it.
include/linux/fb.h
View file @
4737042c
...
...
@@ -321,37 +321,6 @@ struct fb_cursor {
struct
fb_image
image
;
/* Cursor image */
};
/* VGA State Save and Restore */
#define VGA_SAVE_FONT0 1
/* save/restore plane 2 fonts */
#define VGA_SAVE_FONT1 2
/* save/restore plane 3 fonts */
#define VGA_SAVE_TEXT 4
/* save/restore plane 0/1 fonts */
#define VGA_SAVE_FONTS 7
/* save/restore all fonts */
#define VGA_SAVE_MODE 8
/* save/restore video mode */
#define VGA_SAVE_CMAP 16
/* save/restore color map/DAC */
struct
fb_vgastate
{
caddr_t
vgabase
;
/* mmio base, if supported */
__u32
flags
;
/* what state/s to save (see VGA_SAVE_*) */
__u32
depth
;
/* current fb depth, not important */
__u32
num_attr
;
/* number of att registers, 0 for default */
__u32
num_crtc
;
/* number of crt registers, 0 for default */
__u32
num_gfx
;
/* number of gfx registers, 0 for default */
__u32
num_seq
;
/* number of seq registers, 0 for default */
caddr_t
fbbase
;
/* -- DO NOT ALTER STARTING HERE -- */
__u8
*
vga_font0
;
__u8
*
vga_font1
;
__u8
*
vga_text
;
__u8
*
vga_cmap
;
__u8
*
attr
;
__u8
*
crtc
;
__u8
*
gfx
;
__u8
*
seq
;
__u8
misc
;
};
extern
int
fb_save_vga
(
struct
fb_vgastate
*
state
);
extern
int
fb_restore_vga
(
struct
fb_vgastate
*
state
);
#ifdef __KERNEL__
#include <linux/fs.h>
...
...
drivers
/video/vga.h
→
include
/video/vga.h
View file @
4737042c
...
...
@@ -187,6 +187,29 @@
#define VGA_OUTW_WRITE
#endif
/* VGA State Save and Restore */
#define VGA_SAVE_FONT0 1
/* save/restore plane 2 fonts */
#define VGA_SAVE_FONT1 2
/* save/restore plane 3 fonts */
#define VGA_SAVE_TEXT 4
/* save/restore plane 0/1 fonts */
#define VGA_SAVE_FONTS 7
/* save/restore all fonts */
#define VGA_SAVE_MODE 8
/* save/restore video mode */
#define VGA_SAVE_CMAP 16
/* save/restore color map/DAC */
struct
vgastate
{
caddr_t
vgabase
;
/* mmio base, if supported */
__u32
flags
;
/* what state[s] to save (see VGA_SAVE_*) */
__u32
membase
;
/* VGA window base, 0 for default - 0xA000 */
__u32
memsize
;
/* VGA window size, 0 for default 64K */
__u32
depth
;
/* current fb depth, not important */
__u32
num_attr
;
/* number of att registers, 0 for default */
__u32
num_crtc
;
/* number of crt registers, 0 for default */
__u32
num_gfx
;
/* number of gfx registers, 0 for default */
__u32
num_seq
;
/* number of seq registers, 0 for default */
void
*
vidstate
;
};
extern
int
save_vga
(
struct
vgastate
*
state
);
extern
int
restore_vga
(
struct
vgastate
*
state
);
/*
* generic VGA port read/write
...
...
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