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
ce31e58a
Commit
ce31e58a
authored
Aug 14, 2002
by
Petr Vandrovec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make secondary output support mandatory for Matrox G450/G550.
parent
48800d9e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
91 deletions
+65
-91
drivers/video/Config.help
drivers/video/Config.help
+21
-28
drivers/video/Config.in
drivers/video/Config.in
+7
-2
drivers/video/matrox/Makefile
drivers/video/matrox/Makefile
+3
-3
drivers/video/matrox/matroxfb_base.c
drivers/video/matrox/matroxfb_base.c
+4
-0
drivers/video/matrox/matroxfb_g450.c
drivers/video/matrox/matroxfb_g450.c
+21
-56
drivers/video/matrox/matroxfb_g450.h
drivers/video/matrox/matroxfb_g450.h
+9
-2
No files found.
drivers/video/Config.help
View file @
ce31e58a
...
...
@@ -387,8 +387,7 @@ CONFIG_FB_MATROX
Say Y here if you have a Matrox Millennium, Matrox Millennium II,
Matrox Mystique, Matrox Mystique 220, Matrox Productiva G100, Matrox
Mystique G200, Matrox Millennium G200, Matrox Marvel G200 video,
Matrox G400, G450 or G550 card in your box. At this time, support for
the G-series digital output is almost non-existant.
Matrox G400, G450 or G550 card in your box.
This driver is also available as a module ( = code which can be
inserted and removed from the running kernel whenever you want).
...
...
@@ -413,7 +412,7 @@ CONFIG_FB_MATROX_MYSTIQUE
packed pixel and 32 bpp packed pixel. You can also use font widths
different from 8.
CONFIG_FB_MATROX_G
10
0
CONFIG_FB_MATROX_G
45
0
Say Y here if you have a Matrox G100, G200, G400, G450 or G550 based
video card. If you select "Advanced lowlevel driver options", you
should check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp packed
...
...
@@ -423,11 +422,26 @@ CONFIG_FB_MATROX_G100
If you need support for G400 secondary head, you must first say Y to
"I2C support" and "I2C bit-banging support" in the character devices
section, and then to "Matrox I2C support" and "G400 second head
support" here in the framebuffer section.
support" here in the framebuffer section. G450/G550 secondary head
and digital output are supported without additional modules.
Do not forget that second head supports only 16 and 32 bpp
packed pixels, so it is a good idea to compile them into the kernel
too. You can use only some font widths, as the driver uses generic
painting procedures (the secondary head does not use acceleration
engine).
If you have G550, you must also compile support for G450/G550 secondary
head into kernel, otherwise picture will be shown only on output you
are probably not using...
CONFIG_FB_MATROX_G100A
Say Y here if you have a Matrox G100, G200 or G400 based
video card. If you select "Advanced lowlevel driver options", you
should check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp packed
pixel and 32 bpp packed pixel. You can also use font widths
different from 8.
If you need support for G400 secondary head, you must first say Y to
"I2C support" and "I2C bit-banging support" in the character devices
section, and then to "Matrox I2C support" and "G400 second head
support" here in the framebuffer section.
CONFIG_FB_MATROX_I2C
This drivers creates I2C buses which are needed for accessing the
...
...
@@ -470,27 +484,6 @@ CONFIG_FB_MATROX_MAVEN
painting procedures (the secondary head does not use acceleration
engine).
CONFIG_FB_MATROX_G450
Say Y or M here if you want to use a secondary head (meaning two
monitors in parallel) on G450, or if you are using analog output
of G550.
If you compile it as module, two modules are created,
matroxfb_crtc2.o and matroxfb_g450.o. Both modules are needed if you
want two independent display devices.
The driver starts in monitor mode and currently does not support
output in TV modes. You must use the matroxset tool (available
at <ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/>) to swap
primary and secondary head outputs. Secondary head driver always
start in 640x480 resolution and you must use fbset to change it.
Also do not forget that second head supports only 16 and 32 bpp
packed pixels, so it is a good idea to compile them into the kernel
too. You can use only some font widths, as the driver uses generic
painting procedures (the secondary head does not use acceleration
engine).
CONFIG_FB_MATROX_MULTIHEAD
Say Y here if you have more than one (supported) Matrox device in
your computer and you want to use all of them for different monitors
...
...
drivers/video/Config.in
View file @
ce31e58a
...
...
@@ -130,14 +130,19 @@ if [ "$CONFIG_FB" = "y" ]; then
if [ "$CONFIG_FB_MATROX" != "n" ]; then
bool ' Millennium I/II support' CONFIG_FB_MATROX_MILLENIUM
bool ' Mystique support' CONFIG_FB_MATROX_MYSTIQUE
bool ' G100/G200/G400/G450/G550 support' CONFIG_FB_MATROX_G100
bool ' G100/G200/G400/G450/G550 support' CONFIG_FB_MATROX_G450
if [ "$CONFIG_FB_MATROX_G450" = "n" ]; then
bool ' G100/G200/G400 support' CONFIG_FB_MATROX_G100A
fi
if [ "$CONFIG_FB_MATROX_G450" = "y" -o "$CONFIG_FB_MATROX_G100A" = "y" ]; then
define_bool CONFIG_FB_MATROX_G100 y
fi
if [ "$CONFIG_I2C" != "n" ]; then
dep_tristate ' Matrox I2C support' CONFIG_FB_MATROX_I2C $CONFIG_FB_MATROX $CONFIG_I2C_ALGOBIT
if [ "$CONFIG_FB_MATROX_G100" = "y" ]; then
dep_tristate ' G400 second head support' CONFIG_FB_MATROX_MAVEN $CONFIG_FB_MATROX_I2C
fi
fi
dep_tristate ' G450/G550 second head support (mandatory for G550)' CONFIG_FB_MATROX_G450 $CONFIG_FB_MATROX_G100
bool ' Multihead support' CONFIG_FB_MATROX_MULTIHEAD
fi
tristate ' ATI Mach64 display support (EXPERIMENTAL)' CONFIG_FB_ATY
...
...
drivers/video/matrox/Makefile
View file @
ce31e58a
...
...
@@ -5,16 +5,16 @@
# All of the (potential) objects that export symbols.
# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
export-objs
:=
matroxfb_base.o matroxfb_accel.o matroxfb_DAC1064.o matroxfb_Ti3026.o matroxfb_misc.o g450_pll.o
export-objs
:=
matroxfb_base.o matroxfb_accel.o matroxfb_DAC1064.o matroxfb_Ti3026.o matroxfb_misc.o g450_pll.o
matroxfb_g450.o
# Each configuration option enables a list of files.
my-obj-$(CONFIG_FB_MATROX_G100)
:=
g450_pll.o
my-obj-$(CONFIG_FB_MATROX_G100)
+=
g450_pll.o
my-obj-$(CONFIG_FB_MATROX_G450)
+=
matroxfb_g450.o matroxfb_crtc2.o
obj-$(CONFIG_FB_MATROX)
+=
matroxfb_base.o matroxfb_accel.o matroxfb_DAC1064.o matroxfb_Ti3026.o matroxfb_misc.o
$
(
my-obj-y
)
obj-$(CONFIG_FB_MATROX_I2C)
+=
i2c-matroxfb.o
obj-$(CONFIG_FB_MATROX_MAVEN)
+=
matroxfb_maven.o matroxfb_crtc2.o
obj-$(CONFIG_FB_MATROX_G450)
+=
matroxfb_g450.o matroxfb_crtc2.o
include
$(TOPDIR)/Rules.make
...
...
drivers/video/matrox/matroxfb_base.c
View file @
ce31e58a
...
...
@@ -100,6 +100,7 @@
#include "matroxfb_Ti3026.h"
#include "matroxfb_maven.h"
#include "matroxfb_crtc2.h"
#include "matroxfb_g450.h"
#include <linux/matroxfb.h>
#include <asm/uaccess.h>
...
...
@@ -212,6 +213,7 @@ static void matroxfb_remove(WPMINFO int dummy) {
}
matroxfb_unregister_device
(
MINFO
);
unregister_framebuffer
(
&
ACCESS_FBINFO
(
fbcon
));
matroxfb_g450_shutdown
(
PMINFO2
);
del_timer_sync
(
&
ACCESS_FBINFO
(
cursor
.
timer
));
#ifdef CONFIG_MTRR
if
(
ACCESS_FBINFO
(
mtrr
.
vram_valid
))
...
...
@@ -1732,6 +1734,7 @@ static int initMatrox2(WPMINFO struct display* d, struct board* b){
if
(
!
ACCESS_FBINFO
(
devflags
.
novga
))
request_region
(
0x3C0
,
32
,
"matrox"
);
matroxfb_g450_connect
(
PMINFO2
);
ACCESS_FBINFO
(
hw_switch
->
reset
(
PMINFO2
));
ACCESS_FBINFO
(
fbcon
.
monspecs
.
hfmin
)
=
0
;
...
...
@@ -1885,6 +1888,7 @@ static int initMatrox2(WPMINFO struct display* d, struct board* b){
}
return
0
;
failVideoIO:
;
matroxfb_g450_shutdown
(
PMINFO2
);
mga_iounmap
(
ACCESS_FBINFO
(
video
.
vbase
));
failCtrlIO:
;
mga_iounmap
(
ACCESS_FBINFO
(
mmio
.
vbase
));
...
...
drivers/video/matrox/matroxfb_g450.c
View file @
ce31e58a
...
...
@@ -71,76 +71,41 @@ static struct matrox_altout matroxfb_g450_altout = {
matroxfb_g450_get_mode
};
static
int
matroxfb_g450_connect
(
struct
matroxfb_g450_info
*
m2info
)
{
MINFO_FROM
(
m2info
->
primary_dev
);
down_write
(
&
ACCESS_FBINFO
(
altout
.
lock
));
ACCESS_FBINFO
(
altout
.
device
)
=
m2info
;
ACCESS_FBINFO
(
altout
.
output
)
=
&
matroxfb_g450_altout
;
up_write
(
&
ACCESS_FBINFO
(
altout
.
lock
));
ACCESS_FBINFO
(
output
.
all
)
|=
MATROXFB_OUTPUT_CONN_SECONDARY
;
matroxfb_switch
(
ACCESS_FBINFO
(
fbcon
.
currcon
),
(
struct
fb_info
*
)
MINFO
);
return
0
;
}
static
void
matroxfb_g450_shutdown
(
struct
matroxfb_g450_info
*
m2info
)
{
MINFO_FROM
(
m2info
->
primary_dev
);
if
(
MINFO
)
{
ACCESS_FBINFO
(
output
.
all
)
&=
~
MATROXFB_OUTPUT_CONN_SECONDARY
;
ACCESS_FBINFO
(
output
.
ph
)
&=
~
MATROXFB_OUTPUT_CONN_SECONDARY
;
ACCESS_FBINFO
(
output
.
sh
)
&=
~
MATROXFB_OUTPUT_CONN_SECONDARY
;
down_write
(
&
ACCESS_FBINFO
(
altout
.
lock
));
ACCESS_FBINFO
(
altout
.
device
)
=
NULL
;
ACCESS_FBINFO
(
altout
.
output
)
=
NULL
;
up_write
(
&
ACCESS_FBINFO
(
altout
.
lock
));
m2info
->
primary_dev
=
NULL
;
}
}
/* we do not have __setup() yet */
static
void
*
matroxfb_g450_probe
(
struct
matrox_fb_info
*
minfo
)
{
void
matroxfb_g450_connect
(
WPMINFO2
)
{
struct
matroxfb_g450_info
*
m2info
;
/* hardware is not G450... */
if
(
!
ACCESS_FBINFO
(
devflags
.
g450dac
))
return
NULL
;
return
;
m2info
=
(
struct
matroxfb_g450_info
*
)
kmalloc
(
sizeof
(
*
m2info
),
GFP_KERNEL
);
if
(
!
m2info
)
{
printk
(
KERN_ERR
"matroxfb_g450: Not enough memory for G450 DAC control structs
\n
"
);
return
NULL
;
return
;
}
memset
(
m2info
,
0
,
sizeof
(
*
m2info
));
down_write
(
&
ACCESS_FBINFO
(
altout
.
lock
));
m2info
->
primary_dev
=
MINFO
;
if
(
matroxfb_g450_connect
(
m2info
))
{
kfree
(
m2info
);
printk
(
KERN_ERR
"matroxfb_g450: G450 DAC failed to initialize
\n
"
);
return
NULL
;
}
return
m2info
;
}
static
void
matroxfb_g450_remove
(
struct
matrox_fb_info
*
minfo
,
void
*
g450
)
{
matroxfb_g450_shutdown
(
g450
);
kfree
(
g450
);
ACCESS_FBINFO
(
altout
.
device
)
=
m2info
;
ACCESS_FBINFO
(
altout
.
output
)
=
&
matroxfb_g450_altout
;
up_write
(
&
ACCESS_FBINFO
(
altout
.
lock
));
ACCESS_FBINFO
(
output
.
all
)
|=
MATROXFB_OUTPUT_CONN_SECONDARY
;
matroxfb_switch
(
ACCESS_FBINFO
(
fbcon
.
currcon
),
(
struct
fb_info
*
)
MINFO
);
}
static
struct
matroxfb_driver
g450
=
{
.
name
=
"Matrox G450 output #2"
,
.
probe
=
matroxfb_g450_probe
,
.
remove
=
matroxfb_g450_remove
};
static
int
matroxfb_g450_init
(
void
)
{
matroxfb_register_driver
(
&
g450
);
return
0
;
void
matroxfb_g450_shutdown
(
WPMINFO2
)
{
ACCESS_FBINFO
(
output
.
all
)
&=
~
MATROXFB_OUTPUT_CONN_SECONDARY
;
ACCESS_FBINFO
(
output
.
ph
)
&=
~
MATROXFB_OUTPUT_CONN_SECONDARY
;
ACCESS_FBINFO
(
output
.
sh
)
&=
~
MATROXFB_OUTPUT_CONN_SECONDARY
;
down_write
(
&
ACCESS_FBINFO
(
altout
.
lock
));
kfree
(
ACCESS_FBINFO
(
altout
.
device
));
ACCESS_FBINFO
(
altout
.
device
)
=
NULL
;
ACCESS_FBINFO
(
altout
.
output
)
=
NULL
;
up_write
(
&
ACCESS_FBINFO
(
altout
.
lock
));
}
static
void
matroxfb_g450_exit
(
void
)
{
matroxfb_unregister_driver
(
&
g450
);
}
EXPORT_SYMBOL
(
matroxfb_g450_connect
);
EXPORT_SYMBOL
(
matroxfb_g450_shutdown
);
MODULE_AUTHOR
(
"(c) 2000-2001 Petr Vandrovec <vandrove@vc.cvut.cz>"
);
MODULE_DESCRIPTION
(
"Matrox G450 secondary output driver"
);
MODULE_LICENSE
(
"GPL"
);
module_init
(
matroxfb_g450_init
);
module_exit
(
matroxfb_g450_exit
);
drivers/video/matrox/matroxfb_g450.h
View file @
ce31e58a
#ifndef __MATROXFB_G450_H__
#define __MATROXFB_G450_H__
#include <linux/ioctl.h>
#include "matroxfb_base.h"
struct
matroxfb_g450_info
{
...
...
@@ -9,4 +8,12 @@ struct matroxfb_g450_info {
unsigned
int
timmings
;
};
#endif
/* __MATROXFB_MAVEN_H__ */
#ifdef CONFIG_FB_MATROX_G450
void
matroxfb_g450_connect
(
WPMINFO2
);
void
matroxfb_g450_shutdown
(
WPMINFO2
);
#else
static
inline
void
matroxfb_g450_connect
(
WPMINFO2
)
{
};
static
inline
void
matroxfb_g450_shutdown
(
WPMINFO2
)
{
};
#endif
#endif
/* __MATROXFB_G450_H__ */
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