summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2006-08-09 20:09:40 +0200
committerLuc Verhaegen <libv@skynet.be>2006-08-09 20:09:40 +0200
commitd04d8cc031e70087ea28e04e099da5d936aa0244 (patch)
tree366785e7cd0ce8b749bf1b310bad3ff8f7269bba
parent2ef86673944d1bc59b048778cc0e29b14ba8df39 (diff)
CRT: Add CRTSense option.
This has the driver always ignore the CRT connection sensing, which means that, as far as the driver is concerned, the CRT is always attached. At the same time, CRT output code is moved to via_crt.c.
-rw-r--r--.gitignore1
-rw-r--r--src/Imakefile3
-rw-r--r--src/Makefile.am3
-rw-r--r--src/via_crt.c287
-rw-r--r--src/via_mode.c304
-rw-r--r--src/via_mode.h3
6 files changed, 336 insertions, 265 deletions
diff --git a/.gitignore b/.gitignore
index 6615228..82abeb3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,4 @@ mkinstalldirs
stamp-h.in
stamp-h1
*~
+*.bak
diff --git a/src/Imakefile b/src/Imakefile
index 8549bea..5750ff0 100644
--- a/src/Imakefile
+++ b/src/Imakefile
@@ -101,6 +101,7 @@ SRCS = via_driver.c \
via_i2c.c \
via_id.c \
via_memory.c \
+ via_crt.c \
via_panel.c \
via_vgahw.c \
via_vt162x.c \
@@ -120,6 +121,7 @@ OBJS = via_driver.o \
via_i2c.o \
via_id.o \
via_memory.o \
+ via_crt.o \
via_panel.o \
via_vgahw.o \
via_vt162x.o \
@@ -172,6 +174,7 @@ InstallDriverSDKNonExecFile(via_accel.c,$(DRIVERSDKDIR)/drivers/via)
InstallDriverSDKNonExecFile(via_bandwidth.c,$(DRIVERSDKDIR)/drivers/via)
InstallDriverSDKNonExecFile(via_ch7xxx.c,$(DRIVERSDKDIR)/drivers/via)
InstallDriverSDKNonExecFile(via_ch7xxx.h,$(DRIVERSDKDIR)/drivers/via)
+InstallDriverSDKNonExecFile(via_crt.c,$(DRIVERSDKDIR)/drivers/via)
InstallDriverSDKNonExecFile(via_cursor.c,$(DRIVERSDKDIR)/drivers/via)
InstallDriverSDKNonExecFile(via_dga.c,$(DRIVERSDKDIR)/drivers/via)
InstallDriverSDKNonExecFile(via_dri.c,$(DRIVERSDKDIR)/drivers/via)
diff --git a/src/Makefile.am b/src/Makefile.am
index df2a0fa..a4cd6f5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,9 +31,10 @@ via_drv_ladir = @moduledir@/drivers
via_drv_la_SOURCES = \
via_accel.c \
via_bandwidth.c \
- via_cursor.c \
via_ch7xxx.c \
via_ch7xxx.h \
+ via_crt.c \
+ via_cursor.c \
via_dga.c \
via_driver.c \
via_driver.h \
diff --git a/src/via_crt.c b/src/via_crt.c
new file mode 100644
index 0000000..2a757f6
--- /dev/null
+++ b/src/via_crt.c
@@ -0,0 +1,287 @@
+/*
+ * Copyright 2005-2006 Luc Verhaegen.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ *
+ * Trivial CRT ViaOutput implementation.
+ *
+ */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "via_driver.h"
+
+#ifndef _XF86_ANSIC_H
+#include <string.h>
+#include <unistd.h>
+#endif
+
+#include "via_vgahw.h"
+#include "via_id.h"
+#include "via_mode.h"
+
+/*
+ * Option handling.
+ */
+enum CRTOpts {
+ OPTION_CRTSENSE
+};
+
+static OptionInfoRec CRTOptions[] =
+{
+ {OPTION_CRTSENSE, "CRTSense", OPTV_BOOLEAN, {0}, FALSE },
+ {-1, NULL, OPTV_NONE, {0}, FALSE }
+};
+
+/*
+ * Not functional on the VT3122Ax.
+ */
+static Bool
+CRTSense(struct ViaOutput *Output)
+{
+ ScrnInfoPtr pScrn = xf86Screens[Output->scrnIndex];
+ vgaHWPtr hwp = VGAHWPTR(pScrn);
+ CARD8 SR01, CR36;
+ Bool Found = FALSE;
+
+ VIAFUNC(pScrn->scrnIndex);
+
+ SR01 = hwp->readSeq(hwp, 0x01);
+ CR36 = hwp->readCrtc(hwp, 0x36);
+
+ ViaSeqMask(hwp, 0x01, 0x00, 0x20);
+ ViaCrtcMask(hwp, 0x36, 0x00, 0xF0);
+
+ ViaSeqMask(hwp, 0x40, 0x80, 0x80);
+
+ usleep(1);
+
+ if (hwp->readST00(hwp) & 0x10)
+ Found = TRUE;
+
+ ViaSeqMask(hwp, 0x40, 0x00, 0x80);
+
+ hwp->writeSeq(hwp, 0x01, SR01);
+ hwp->writeCrtc(hwp, 0x36, CR36);
+
+ return Found;
+}
+
+/*
+ * Sync/Unsync
+ */
+static void
+CRTPower(struct ViaOutput *Output, Bool On)
+{
+ ScrnInfoPtr pScrn = xf86Screens[Output->scrnIndex];
+ vgaHWPtr hwp = VGAHWPTR(pScrn);
+
+ VIAFUNC(pScrn->scrnIndex);
+
+ if (On)
+ ViaCrtcMask(hwp, 0x36, 0x00, 0x30);
+ else
+ ViaCrtcMask(hwp, 0x36, 0x30, 0x30);
+}
+
+/*
+ * Empty.
+ */
+static ModeStatus
+CRTModeValid(struct ViaOutput *Output, DisplayModePtr mode)
+{
+ VIAFUNC(Output->scrnIndex);
+
+ return MODE_OK;
+}
+
+/*
+ * Empty.
+ */
+static void
+CRTMode(struct ViaOutput *Output, DisplayModePtr mode)
+{
+ VIAFUNC(Output->scrnIndex);
+}
+
+/*
+ * Initialise the MonRec for the CRT. Add in some configured
+ * values as well.
+ */
+static MonPtr
+CRTMonitor(struct ViaOutput *Output)
+{
+ ScrnInfoPtr pScrn = xf86Screens[Output->scrnIndex];
+ VIAPtr pVia = VIAPTR(pScrn);
+ MonPtr Config = pScrn->confScreen->monitor;
+ xf86MonPtr DDC = NULL;
+ MonPtr Monitor;
+
+ Monitor = xnfcalloc(1, sizeof(MonRec));
+ memset(Monitor, 0, sizeof(MonRec));
+
+ if (pVia->pI2CBus1)
+ DDC = xf86DoEDID_DDC2(pScrn->scrnIndex, pVia->pI2CBus1);
+
+ if (DDC) {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Printing CRT EDID (DDC) info:\n");
+ xf86PrintEDID(DDC);
+ ViaDDCMonitorSet(pScrn->scrnIndex, Monitor, DDC);
+
+ /* did the user configure a Monitor? */
+ if (strncmp("<default Monitor>", Config->id, 18)) {
+ /* keep DDC name, vendor, model */
+
+ /* Use configured H ranges */
+ if (Config->nHsync) {
+ int i;
+
+ Monitor->nHsync = Config->nHsync;
+ for (i = 0; i < Config->nHsync; i++) {
+ Monitor->hsync[i].hi = Config->hsync[i].hi;
+ Monitor->hsync[i].lo = Config->hsync[i].lo;
+ }
+ }
+
+ /* Use configured V ranges */
+ if (Config->nVrefresh) {
+ int i;
+
+ Monitor->nVrefresh = Config->nVrefresh;
+ for (i = 0; i < Config->nVrefresh; i++) {
+ Monitor->vrefresh[i].hi = Config->vrefresh[i].hi;
+ Monitor->vrefresh[i].lo = Config->vrefresh[i].lo;
+ }
+ }
+
+ /* add options */
+ Monitor->options = Config->options;
+
+ if (Config->gamma.red || Config->gamma.green || Config->gamma.blue) {
+ Monitor->gamma.red = Config->gamma.red;
+ Monitor->gamma.green = Config->gamma.green;
+ Monitor->gamma.blue = Config->gamma.blue;
+ }
+
+#ifdef MONREC_HAS_REDUCED
+ /* if user wants reduced, he gets reduced */
+ if (Config->reducedblanking)
+ Monitor->reducedblanking = TRUE;
+#endif
+ }
+
+ } else {
+ memcpy(Monitor, Config, sizeof(MonRec));
+ if (Config->id)
+ Monitor->id = xnfstrdup(Config->id);
+ if (Config->vendor)
+ Monitor->vendor = xnfstrdup(Config->vendor);
+ if (Config->model)
+ Monitor->model = xnfstrdup(Config->model);
+
+ /* Only set DURING xf86ValidateModes currently - idiots.
+ * Also assume a non-multisync 14"er, instead of a multisync 72Hz one.
+ */
+ if (!Monitor->nHsync) {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "%s: Adding default "
+ "horizontal timing.\n", Monitor->id);
+ Monitor->nHsync = 3;
+ Monitor->hsync[0].lo = 31.5;
+ Monitor->hsync[0].hi = 31.5;
+ Monitor->hsync[1].lo = 35.15;
+ Monitor->hsync[1].hi = 35.15;
+ Monitor->hsync[2].lo = 35.5;
+ Monitor->hsync[2].hi = 35.5;
+ }
+
+ if (!Monitor->nVrefresh) {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "%s: Adding default "
+ "vertical timing.\n", Monitor->id);
+ Monitor->nVrefresh = 1;
+ Monitor->vrefresh[0].lo = 50;
+ Monitor->vrefresh[0].hi = 61;
+ }
+
+ Monitor->Modes = NULL;
+ Monitor->Last = NULL;
+
+#ifdef MONREC_HAS_REDUCED
+ Monitor->reducedblanking = FALSE;
+#endif
+ }
+
+ ViaModesCopyAdd(Monitor, Config->Modes);
+
+ return Monitor;
+}
+
+/*
+ *
+ */
+struct ViaOutput *
+ViaCRTInit(ScrnInfoPtr pScrn, I2CDevPtr pDev)
+{
+ VIAPtr pVia = VIAPTR(pScrn);
+ struct ViaOutput *Output;
+
+ VIAFUNC(pScrn->scrnIndex);
+
+ if (pDev)
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "%s: Ignoring I2C Device.\n", __func__);
+
+ Output = xnfcalloc(1, sizeof(struct ViaOutput));
+ memset(Output, 0, sizeof(struct ViaOutput));
+
+ Output->scrnIndex = pScrn->scrnIndex;
+ Output->Type = OUTPUT_CRT;
+ Output->Name = "CRT";
+
+ Output->Active = TRUE;
+ Output->ClockMaster = FALSE;
+
+ /* Sensing doesn't work on VT3122Ax */
+ if ((pVia->Chipset > VT3122) || VT3122_REV_IS_CX(pVia->ChipRev)) {
+ OptionInfoPtr Options = xnfalloc(sizeof(CRTOptions));
+ memcpy(Options, CRTOptions, sizeof(CRTOptions));
+
+ xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, Options);
+
+ if (!xf86ReturnOptValBool(Options, OPTION_CRTSENSE, TRUE))
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Disabling CRT Sensing."
+ " CRT is considered always attached.\n");
+ else
+ Output->Sense = CRTSense;
+
+ xfree(Options);
+ }
+
+ Output->ModeValid = CRTModeValid;
+ Output->Mode = CRTMode;
+ Output->Power = CRTPower;
+
+ Output->Monitor = CRTMonitor(Output);
+
+ return Output;
+}
diff --git a/src/via_mode.c b/src/via_mode.c
index 2467faa..7d12096 100644
--- a/src/via_mode.c
+++ b/src/via_mode.c
@@ -486,268 +486,6 @@ ViaOutputRemove(ScrnInfoPtr pScrn, struct ViaOutput *Output)
/*
*
- */
-static void
-ViaMonitorDebug(int scrnIndex, MonPtr Monitor)
-{
- int i;
- DisplayModePtr Mode;
-
- ViaDebug(scrnIndex, "Monitor: %s (%s - %s)\n", Monitor->id,
- Monitor->vendor, Monitor->model);
-
- for (i = 0; i < Monitor->nHsync; i++)
- ViaDebug(scrnIndex, "Horizontal Range %d: %f - %f\n", i,
- Monitor->hsync[i].lo, Monitor->hsync[i].hi);
-
- for (i = 0; i < Monitor->nVrefresh; i++)
- ViaDebug(scrnIndex, "Vertical Range %d: %f - %f\n", i,
- Monitor->vrefresh[i].lo, Monitor->vrefresh[i].hi);
-
- Mode = Monitor->Modes;
- while (Mode) {
- ViaPrintModeline(scrnIndex, Mode);
- Mode = Mode->next;
- }
- ViaDebug(scrnIndex, "Physical dimensions: %dmm x %dmm\n",
- Monitor->widthmm, Monitor->heightmm);
-
- ViaDebug(scrnIndex, "Gamma %f, %f, %f\n", Monitor->gamma.red,
- Monitor->gamma.green, Monitor->gamma.blue);
-
- if (Monitor->DDC)
- ViaDebug(scrnIndex, "Monitor has DDC\n");
-
-#ifdef MONREC_HAS_REDUCED
- if (Monitor->reducedblanking)
- ViaDebug(scrnIndex, "Monitor allows for reduced blanking\n");
-#endif
-}
-
-/*
- *
- * Trivial CRT ViaOutput implementation.
- *
- */
-
-/*
- * This is non-Functional on my VT3122Ax.
- */
-static Bool
-ViaCRTSense(struct ViaOutput *Output)
-{
- ScrnInfoPtr pScrn = xf86Screens[Output->scrnIndex];
- vgaHWPtr hwp = VGAHWPTR(pScrn);
- CARD8 SR01, CR36;
- Bool Found = FALSE;
-
- VIAFUNC(pScrn->scrnIndex);
-
- SR01 = hwp->readSeq(hwp, 0x01);
- CR36 = hwp->readCrtc(hwp, 0x36);
-
- ViaSeqMask(hwp, 0x01, 0x00, 0x20);
- ViaCrtcMask(hwp, 0x36, 0x00, 0xF0);
-
- ViaSeqMask(hwp, 0x40, 0x80, 0x80);
-
- usleep(1);
-
- if (hwp->readST00(hwp) & 0x10)
- Found = TRUE;
-
- ViaSeqMask(hwp, 0x40, 0x00, 0x80);
-
- hwp->writeSeq(hwp, 0x01, SR01);
- hwp->writeCrtc(hwp, 0x36, CR36);
-
- return Found;
-}
-
-/*
- * Sync/Unsync
- */
-static void
-ViaCRTPower(struct ViaOutput *Output, Bool On)
-{
- ScrnInfoPtr pScrn = xf86Screens[Output->scrnIndex];
- vgaHWPtr hwp = VGAHWPTR(pScrn);
-
- VIAFUNC(pScrn->scrnIndex);
-
- if (On)
- ViaCrtcMask(hwp, 0x36, 0x00, 0x30);
- else
- ViaCrtcMask(hwp, 0x36, 0x30, 0x30);
-}
-
-/*
- * Empty.
- */
-static ModeStatus
-ViaCRTModeValid(struct ViaOutput *Output, DisplayModePtr mode)
-{
- VIAFUNC(Output->scrnIndex);
-
- return MODE_OK;
-}
-
-/*
- * Empty.
- */
-static void
-ViaCRTMode(struct ViaOutput *Output, DisplayModePtr mode)
-{
- VIAFUNC(Output->scrnIndex);
-}
-
-/*
- * Initialise the MonRec for the CRT. Add in some configured
- * values as well.
- */
-static MonPtr
-ViaCRTMonitor(struct ViaOutput *Output)
-{
- ScrnInfoPtr pScrn = xf86Screens[Output->scrnIndex];
- VIAPtr pVia = VIAPTR(pScrn);
- MonPtr Config = pScrn->confScreen->monitor;
- xf86MonPtr DDC = NULL;
- MonPtr Monitor;
-
- Monitor = xnfcalloc(1, sizeof(MonRec));
- memset(Monitor, 0, sizeof(MonRec));
-
- if (pVia->pI2CBus1)
- DDC = xf86DoEDID_DDC2(pScrn->scrnIndex, pVia->pI2CBus1);
-
- if (DDC) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Printing CRT EDID (DDC) info:\n");
- xf86PrintEDID(DDC);
- ViaDDCMonitorSet(pScrn->scrnIndex, Monitor, DDC);
-
- /* did the user configure a Monitor? */
- if (strncmp("<default Monitor>", Config->id, 18)) {
- /* keep DDC name, vendor, model */
-
- /* Use configured H ranges */
- if (Config->nHsync) {
- int i;
-
- Monitor->nHsync = Config->nHsync;
- for (i = 0; i < Config->nHsync; i++) {
- Monitor->hsync[i].hi = Config->hsync[i].hi;
- Monitor->hsync[i].lo = Config->hsync[i].lo;
- }
- }
-
- /* Use configured V ranges */
- if (Config->nVrefresh) {
- int i;
-
- Monitor->nVrefresh = Config->nVrefresh;
- for (i = 0; i < Config->nVrefresh; i++) {
- Monitor->vrefresh[i].hi = Config->vrefresh[i].hi;
- Monitor->vrefresh[i].lo = Config->vrefresh[i].lo;
- }
- }
-
- /* add options */
- Monitor->options = Config->options;
-
- if (Config->gamma.red || Config->gamma.green || Config->gamma.blue) {
- Monitor->gamma.red = Config->gamma.red;
- Monitor->gamma.green = Config->gamma.green;
- Monitor->gamma.blue = Config->gamma.blue;
- }
-
-#ifdef MONREC_HAS_REDUCED
- /* if user wants reduced, he gets reduced */
- if (Config->reducedblanking)
- Monitor->reducedblanking = TRUE;
-#endif
- }
-
- } else {
- memcpy(Monitor, Config, sizeof(MonRec));
- if (Config->id)
- Monitor->id = xnfstrdup(Config->id);
- if (Config->vendor)
- Monitor->vendor = xnfstrdup(Config->vendor);
- if (Config->model)
- Monitor->model = xnfstrdup(Config->model);
-
- /* Only set DURING xf86ValidateModes currently - idiots.
- * Also assume a non-multisync 14"er, instead of a multisync 72Hz one.
- */
- if (!Monitor->nHsync) {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "%s: Adding default "
- "horizontal timing.\n", Monitor->id);
- Monitor->nHsync = 3;
- Monitor->hsync[0].lo = 31.5;
- Monitor->hsync[0].hi = 31.5;
- Monitor->hsync[1].lo = 35.15;
- Monitor->hsync[1].hi = 35.15;
- Monitor->hsync[2].lo = 35.5;
- Monitor->hsync[2].hi = 35.5;
- }
-
- if (!Monitor->nVrefresh) {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "%s: Adding default "
- "vertical timing.\n", Monitor->id);
- Monitor->nVrefresh = 1;
- Monitor->vrefresh[0].lo = 50;
- Monitor->vrefresh[0].hi = 61;
- }
-
- Monitor->Modes = NULL;
- Monitor->Last = NULL;
-
-#ifdef MONREC_HAS_REDUCED
- Monitor->reducedblanking = FALSE;
-#endif
- }
-
- ViaModesCopyAdd(Monitor, Config->Modes);
-
- return Monitor;
-}
-
-/*
- *
- */
-static struct ViaOutput *
-ViaCRTInit(ScrnInfoPtr pScrn)
-{
- VIAPtr pVia = VIAPTR(pScrn);
- struct ViaOutput *Output;
-
- VIAFUNC(pScrn->scrnIndex);
-
- Output = xnfcalloc(1, sizeof(struct ViaOutput));
- memset(Output, 0, sizeof(struct ViaOutput));
-
- Output->scrnIndex = pScrn->scrnIndex;
- Output->Type = OUTPUT_CRT;
- Output->Name = "CRT";
-
- Output->Active = TRUE;
- Output->ClockMaster = FALSE;
-
- /* Doesn't work on VT3122Ax */
- if ((pVia->Chipset > VT3122) || VT3122_REV_IS_CX(pVia->ChipRev))
- Output->Sense = ViaCRTSense;
-
- Output->ModeValid = ViaCRTModeValid;
- Output->Mode = ViaCRTMode;
- Output->Power = ViaCRTPower;
-
- Output->Monitor = ViaCRTMonitor(Output);
-
- return Output;
-}
-
-/*
- *
* Whine about TODOs.
*
*/
@@ -1052,7 +790,7 @@ ViaOutputsDetect(ScrnInfoPtr pScrn)
VIAFUNC(pScrn->scrnIndex);
/* CRT */
- Output = ViaCRTInit(pScrn);
+ Output = ViaCRTInit(pScrn, NULL);
if (Output && !ViaOutputAdd(pScrn, Output))
while (Output) /* could be a whole list */
Output = ViaOutputDestroy(Output);
@@ -1583,6 +1321,46 @@ ViaOutputsSelect(ScrnInfoPtr pScrn)
#endif
/*
+ *
+ */
+static void
+ViaMonitorDebug(int scrnIndex, MonPtr Monitor)
+{
+ int i;
+ DisplayModePtr Mode;
+
+ ViaDebug(scrnIndex, "Monitor: %s (%s - %s)\n", Monitor->id,
+ Monitor->vendor, Monitor->model);
+
+ for (i = 0; i < Monitor->nHsync; i++)
+ ViaDebug(scrnIndex, "Horizontal Range %d: %f - %f\n", i,
+ Monitor->hsync[i].lo, Monitor->hsync[i].hi);
+
+ for (i = 0; i < Monitor->nVrefresh; i++)
+ ViaDebug(scrnIndex, "Vertical Range %d: %f - %f\n", i,
+ Monitor->vrefresh[i].lo, Monitor->vrefresh[i].hi);
+
+ Mode = Monitor->Modes;
+ while (Mode) {
+ ViaPrintModeline(scrnIndex, Mode);
+ Mode = Mode->next;
+ }
+ ViaDebug(scrnIndex, "Physical dimensions: %dmm x %dmm\n",
+ Monitor->widthmm, Monitor->heightmm);
+
+ ViaDebug(scrnIndex, "Gamma %f, %f, %f\n", Monitor->gamma.red,
+ Monitor->gamma.green, Monitor->gamma.blue);
+
+ if (Monitor->DDC)
+ ViaDebug(scrnIndex, "Monitor has DDC\n");
+
+#ifdef MONREC_HAS_REDUCED
+ if (Monitor->reducedblanking)
+ ViaDebug(scrnIndex, "Monitor allows for reduced blanking\n");
+#endif
+}
+
+/*
* Make sure that range is properly sorted and properly reduced.
*/
static int
diff --git a/src/via_mode.h b/src/via_mode.h
index 80672fd..b9f762f 100644
--- a/src/via_mode.h
+++ b/src/via_mode.h
@@ -113,7 +113,8 @@ void ViaModesCopyAdd(MonPtr Monitor, DisplayModePtr Additions);
void ViaMonitorAddModetable(MonPtr Monitor, DisplayModePtr Modes);
void ViaModesDestroy(DisplayModePtr Modes);
-/* outputs: via_panel.c, via_vt162x.c and via_ch7xxx.c */
+/* outputs: via_crt.c, via_panel.c, via_vt162x.c and via_ch7xxx.c */
+struct ViaOutput *ViaCRTInit(ScrnInfoPtr pScrn, I2CDevPtr pDev);
struct ViaOutput *ViaPanelInit(ScrnInfoPtr pScrn, I2CDevPtr pDev);
struct ViaOutput *ViaVT162xInit(ScrnInfoPtr pScrn, I2CDevPtr pDev);
struct ViaOutput *ViaCH7xxxInit(ScrnInfoPtr pScrn, I2CDevPtr pDev);