summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTilman Sauerbeck <tilman@code-monkey.de>2007-08-01 22:55:05 +0200
committerTilman Sauerbeck <tilman@code-monkey.de>2007-08-01 22:55:05 +0200
commit45033be06ccf71dd8db707c8704012102fdef2da (patch)
treea23e615121b188471cb39a5bb19f6a8ad89e48e7
parentcda9ccbe2723c13052f48aed516f07263a02d347 (diff)
Only number outputs if necessary.
-rw-r--r--src/mga.h4
-rw-r--r--src/mga_2064_output.c2
-rw-r--r--src/mga_driver.c6
-rw-r--r--src/mga_g_output.c12
4 files changed, 14 insertions, 10 deletions
diff --git a/src/mga.h b/src/mga.h
index 7c1eb22..30569c3 100644
--- a/src/mga.h
+++ b/src/mga.h
@@ -642,8 +642,8 @@ xf86OutputPtr Mga2064OutputInit(ScrnInfoPtr pScrn);
Bool MgaGCrtc1Init(ScrnInfoPtr pScrn);
Bool MgaGCrtc2Init(ScrnInfoPtr pScrn);
-xf86OutputPtr MgaGOutputDac1Init(ScrnInfoPtr pScrn);
-xf86OutputPtr MgaGOutputDac2Init(ScrnInfoPtr pScrn);
+xf86OutputPtr MgaGOutputDac1Init(ScrnInfoPtr pScrn, Bool number);
+xf86OutputPtr MgaGOutputDac2Init(ScrnInfoPtr pScrn, Bool number);
xf86OutputPtr MgaGOutputPanelInit(ScrnInfoPtr pScrn);
static __inline__ void
diff --git a/src/mga_2064_output.c b/src/mga_2064_output.c
index d2d148c..e344b6a 100644
--- a/src/mga_2064_output.c
+++ b/src/mga_2064_output.c
@@ -182,7 +182,7 @@ Mga2064OutputInit(ScrnInfoPtr scrn)
if (!data)
return NULL;
- output = xf86OutputCreate(scrn, &output_funcs, "VGA 1");
+ output = xf86OutputCreate(scrn, &output_funcs, "VGA");
if (!output) {
xfree(data);
return NULL;
diff --git a/src/mga_driver.c b/src/mga_driver.c
index ac23634..eeca190 100644
--- a/src/mga_driver.c
+++ b/src/mga_driver.c
@@ -1080,6 +1080,7 @@ setup_g_outputs(ScrnInfoPtr scrn)
{
MGAPtr pMga;
xf86OutputPtr output;
+ Bool number_vga = FALSE;
pMga = MGAPTR(scrn);
@@ -1093,7 +1094,8 @@ setup_g_outputs(ScrnInfoPtr scrn)
* or it claims there's no primary output
* we just assume it's VGA.
*/
- output = MgaGOutputDac1Init (scrn);
+ number_vga = pMga->bios.connector[1] == MGA_CONNECTOR_HD15;
+ output = MgaGOutputDac1Init (scrn, number_vga);
break;
}
@@ -1103,7 +1105,7 @@ setup_g_outputs(ScrnInfoPtr scrn)
/* second output */
switch (pMga->bios.connector[1]) {
case MGA_CONNECTOR_HD15:
- output = MgaGOutputDac2Init (scrn);
+ output = MgaGOutputDac2Init (scrn, number_vga);
break;
default:
output = NULL;
diff --git a/src/mga_g_output.c b/src/mga_g_output.c
index 2234219..0914423 100644
--- a/src/mga_g_output.c
+++ b/src/mga_g_output.c
@@ -374,17 +374,18 @@ output_destroy(xf86OutputPtr output)
}
xf86OutputPtr
-MgaGOutputDac1Init(ScrnInfoPtr scrn)
+MgaGOutputDac1Init(ScrnInfoPtr scrn, Bool number)
{
MGAPtr pMga = MGAPTR(scrn);
xf86OutputPtr output;
MgaOutputDataPtr data;
+ const char *name = number ? "VGA1" : "VGA";
data = xnfcalloc(sizeof(MgaOutputDataRec), 1);
if (!data)
return NULL;
- output = xf86OutputCreate(scrn, &output_dac1_funcs, "VGA1");
+ output = xf86OutputCreate(scrn, &output_dac1_funcs, name);
if (!output) {
xfree(data);
return NULL;
@@ -398,17 +399,18 @@ MgaGOutputDac1Init(ScrnInfoPtr scrn)
}
xf86OutputPtr
-MgaGOutputDac2Init(ScrnInfoPtr scrn)
+MgaGOutputDac2Init(ScrnInfoPtr scrn, Bool number)
{
MGAPtr pMga = MGAPTR(scrn);
xf86OutputPtr output;
MgaOutputDataPtr data;
+ const char *name = number ? "VGA2" : "VGA";
data = xnfcalloc(sizeof(MgaOutputDataRec), 1);
if (!data)
return NULL;
- output = xf86OutputCreate(scrn, &output_dac2_funcs, "VGA2");
+ output = xf86OutputCreate(scrn, &output_dac2_funcs, name);
if (!output) {
xfree(data);
return NULL;
@@ -432,7 +434,7 @@ MgaGOutputPanelInit(ScrnInfoPtr scrn)
if (!data)
return NULL;
- output = xf86OutputCreate(scrn, &output_panel_funcs, "Panel1");
+ output = xf86OutputCreate(scrn, &output_panel_funcs, "Panel");
if (!output) {
xfree(data);
return NULL;