[openchrome-devel] xf86-video-openchrome: Branch 'main' - 6 commits - configure.ac src/via_driver.c src/via_driver.h src/via_ums.c
Kevin Brace
kevinbrace at kemper.freedesktop.org
Thu Sep 17 15:09:51 UTC 2020
configure.ac | 2
src/via_driver.c | 316 +++++++++++++++++++++++++++++++------------------------
src/via_driver.h | 3
src/via_ums.c | 36 ++----
4 files changed, 200 insertions(+), 157 deletions(-)
New commits:
commit b4dc633d8761c624c975c9d9ae1429d20f6acb3a
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Sep 17 07:59:11 2020 -0700
Version bumped to 0.6.314
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/configure.ac b/configure.ac
index 0970270..806b993 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-video-openchrome],
- [0.6.313],
+ [0.6.314],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
[xf86-video-openchrome])
commit 6f6afcc3582a97726c0701f7bdf0c2ac945a51d7
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Sep 17 07:58:55 2020 -0700
Improvements to viaUMSPreInit() error condition handling
Also, made fixes to VIAPreInit() error condition handling relating to
viaUMSPreInit().
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_driver.c b/src/via_driver.c
index 128c38c..d557633 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -1177,7 +1177,7 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
if (pVia->KMS) {
if (!drmmode_pre_init(pScrn, &pVia->drmmode)) {
- goto fail;
+ goto free_rec;
}
} else {
/*
@@ -1186,7 +1186,7 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
* they will need to be explicitly relinquished.
*/
if (!viaUMSPreInit(pScrn)) {
- goto fail;
+ goto free_rec;
}
}
diff --git a/src/via_ums.c b/src/via_ums.c
index 236f962..681d480 100644
--- a/src/via_ums.c
+++ b/src/via_ums.c
@@ -1335,7 +1335,7 @@ viaUMSPreInit(ScrnInfoPtr pScrn)
#endif
int max_pitch, max_height;
xf86CrtcPtr iga1, iga2;
- Bool ret;
+ Bool status = FALSE;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered %s.\n", __func__));
@@ -1347,12 +1347,10 @@ viaUMSPreInit(ScrnInfoPtr pScrn)
viaQuirksInit(pScrn);
if (!xf86LoadSubModule(pScrn, "vgahw")) {
- ret = FALSE;
goto exit;
}
if (!vgaHWGetHWRec(pScrn)) {
- ret = FALSE;
goto exit;
}
@@ -1365,7 +1363,6 @@ viaUMSPreInit(ScrnInfoPtr pScrn)
#endif
if (!viaProbeVRAM(pScrn)) {
- ret = FALSE;
goto exit;
}
@@ -1396,7 +1393,6 @@ viaUMSPreInit(ScrnInfoPtr pScrn)
/* Map PCI hardware resources to the memory map. */
if (!viaMapMMIO(pScrn)) {
- ret = FALSE;
goto exit;
}
@@ -1437,20 +1433,18 @@ viaUMSPreInit(ScrnInfoPtr pScrn)
if (pVia->drmmode.hwcursor) {
if (!xf86LoadSubModule(pScrn, "ramdac")) {
- ret = FALSE;
- goto exit;
+ goto free_mmio;
}
}
if (!xf86LoadSubModule(pScrn, "i2c")) {
- return FALSE;
+ goto free_mmio;
} else {
ViaI2CInit(pScrn);
}
if (!xf86LoadSubModule(pScrn, "ddc")) {
- ret = FALSE;
- goto exit;
+ goto free_mmio;
}
/*
@@ -1480,16 +1474,14 @@ viaUMSPreInit(ScrnInfoPtr pScrn)
iga1_rec = (drmmode_crtc_private_ptr) xnfcalloc(sizeof(drmmode_crtc_private_rec), 1);
if (!iga1_rec) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "IGA1 Rec allocation failed.\n");
- ret = FALSE;
- goto exit;
+ goto free_mmio;
}
iga1 = xf86CrtcCreate(pScrn, &iga1_crtc_funcs);
if (!iga1) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "xf86CrtcCreate failed.\n");
free(iga1_rec);
- ret = FALSE;
- goto exit;
+ goto free_mmio;
}
iga1_rec->drmmode = &pVia->drmmode;
@@ -1500,8 +1492,7 @@ viaUMSPreInit(ScrnInfoPtr pScrn)
if (!iga2_rec) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "IGA1 Rec allocation failed.\n");
xf86CrtcDestroy(iga1);
- ret = FALSE;
- goto exit;
+ goto free_mmio;
}
iga2 = xf86CrtcCreate(pScrn, &iga2_crtc_funcs);
@@ -1509,8 +1500,7 @@ viaUMSPreInit(ScrnInfoPtr pScrn)
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "xf86CrtcCreate failed.\n");
xf86CrtcDestroy(iga1);
free(iga2_rec);
- ret = FALSE;
- goto exit;
+ goto free_mmio;
}
iga2_rec->drmmode = &pVia->drmmode;
@@ -1522,8 +1512,7 @@ viaUMSPreInit(ScrnInfoPtr pScrn)
"Detected bitsPerPixel to be 0 bit.\n");
xf86CrtcDestroy(iga2);
xf86CrtcDestroy(iga1);
- ret = FALSE;
- goto exit;
+ goto free_mmio;
}
/*
@@ -1545,11 +1534,14 @@ viaUMSPreInit(ScrnInfoPtr pScrn)
viaInitDisplay(pScrn);
- ret = xf86InitialConfiguration(pScrn, TRUE);
+ status = xf86InitialConfiguration(pScrn, TRUE);
+ goto exit;
+free_mmio:
+ viaUnmapMMIO(pScrn);
exit:
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Exiting %s.\n", __func__));
- return ret;
+ return status;
}
void
commit dc2987ca895340cc27dc5107e8412535c55b5103
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Sep 17 07:58:44 2020 -0700
Use macros for storing text string identifying DRM
This is for identifying OpenChrome DRM and VIA DRM.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_driver.c b/src/via_driver.c
index 9687c8b..128c38c 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -863,7 +863,7 @@ viaDrmOpen(ScrnInfoPtr pScrn)
* KMS supports needs to be present for OpenChrome DRM to
* function properly.
*/
- pVia->drmmode.fd = drmOpen("openchrome", busId);
+ pVia->drmmode.fd = drmOpen(OPENCHROME_DRM_DRIVER_NAME, busId);
if (pVia->drmmode.fd != -1) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"OpenChrome DRM detected.\n");
@@ -921,7 +921,7 @@ viaDrmOpen(ScrnInfoPtr pScrn)
*/
if (!pVia->KMS) {
busId = DRICreatePCIBusID(pVia->PciInfo);
- pVia->drmmode.fd = drmOpen("via", busId);
+ pVia->drmmode.fd = drmOpen(VIA_DRM_DRIVER_NAME, busId);
if (pVia->drmmode.fd != -1) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"VIA DRM detected.\n");
diff --git a/src/via_driver.h b/src/via_driver.h
index 2a06e41..73686f0 100644
--- a/src/via_driver.h
+++ b/src/via_driver.h
@@ -95,6 +95,9 @@
(PACKAGE_VERSION_MINOR << 16) | \
PACKAGE_VERSION_PATCHLEVEL
+#define OPENCHROME_DRM_DRIVER_NAME "openchrome"
+#define VIA_DRM_DRIVER_NAME "via"
+
#define VIA_AGP_UPL_SIZE (1024*128)
#define VIA_DMA_DL_SIZE (1024*128)
#define VIA_SCRATCH_SIZE (4*1024*1024)
commit 0a0f6e263bb6a74f8dbf7777d0683a1d5a679fac
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Sep 17 07:57:09 2020 -0700
Move DRM opening operation code into viaDrmOpen()
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_driver.c b/src/via_driver.c
index 2c24143..9687c8b 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -820,16 +820,172 @@ fail:
return FALSE;
}
+/*
+ * viaDrmOpen() probably should not be located here, but for now,
+ * it will stay here. Someday, it will move into a different file.
+ */
+#ifdef OPENCHROMEDRI
+static Bool
+viaDrmOpen(ScrnInfoPtr pScrn)
+{
+ VIAPtr pVia = VIAPTR(pScrn);
+ char *busId = NULL;
+ drmVersionPtr drmVer;
+ Bool status = FALSE;
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Entered %s.\n", __func__));
+
+ if (xf86LoaderCheckSymbol("DRICreatePCIBusID")) {
+ busId = DRICreatePCIBusID(pVia->PciInfo);
+ if (!busId) {
+ goto exit;
+ }
+ } else {
+ busId = malloc(64);
+ if (!busId) {
+ goto exit;
+ }
+
+ sprintf(busId,
+ "PCI:%d:%d:%d",
+ pVia->PciInfo->bus,
+#ifdef XSERVER_LIBPCIACCESS
+ pVia->PciInfo->dev,
+#else
+ pVia->PciInfo->device,
+#endif
+ pVia->PciInfo->func);
+ }
+
+ /*
+ * Look for OpenChrome DRM first.
+ * KMS supports needs to be present for OpenChrome DRM to
+ * function properly.
+ */
+ pVia->drmmode.fd = drmOpen("openchrome", busId);
+ if (pVia->drmmode.fd != -1) {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "OpenChrome DRM detected.\n");
+ drmVer = drmGetVersion(pVia->drmmode.fd);
+ if (drmVer) {
+ pVia->drmVerMajor = drmVer->version_major;
+ pVia->drmVerMinor = drmVer->version_minor;
+ pVia->drmVerPatchLevel = drmVer->version_patchlevel;
+ drmFreeVersion(drmVer);
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "OpenChrome DRM Version: %d.%d.%d\n",
+ pVia->drmVerMajor, pVia->drmVerMinor,
+ pVia->drmVerPatchLevel);
+
+ if ((pVia->drmVerMajor > drmOpenChromeDRMVersion.major) ||
+ ((pVia->drmVerMajor == drmOpenChromeDRMVersion.major) &&
+ (pVia->drmVerMinor >= drmOpenChromeDRMVersion.minor))) {
+ if (!drmCheckModesettingSupported(busId)) {
+ pVia->KMS = TRUE;
+ pVia->directRenderingType = DRI_2;
+ pVia->NoAccel = TRUE;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "KMS is supported by "
+ "OpenChrome DRM.\n");
+ } else {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "KMS is not available.\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Disabling OpenChrome DRM support.\n");
+ }
+ } else {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Unsupported version of OpenChrome DRM "
+ "detected.\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Only OpenChrome DRM Version %d.%d or "
+ "later is supported.\n",
+ drmOpenChromeDRMVersion.major,
+ drmOpenChromeDRMVersion.minor);
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Disabling OpenChrome DRM support.\n");
+ }
+ } else {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Not able to obtain OpenChrome DRM version.\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Disabling OpenChrome DRM support.\n");
+ }
+ }
+
+ free(busId);
+
+ /*
+ * Now, check for "legacy" DRI1 VIA DRM.
+ */
+ if (!pVia->KMS) {
+ busId = DRICreatePCIBusID(pVia->PciInfo);
+ pVia->drmmode.fd = drmOpen("via", busId);
+ if (pVia->drmmode.fd != -1) {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "VIA DRM detected.\n");
+ drmVer = drmGetVersion(pVia->drmmode.fd);
+ if (drmVer) {
+ pVia->drmVerMajor = drmVer->version_major;
+ pVia->drmVerMinor = drmVer->version_minor;
+ pVia->drmVerPatchLevel = drmVer->version_patchlevel;
+ drmFreeVersion(drmVer);
+
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "VIA DRM Version: %d.%d.%d\n",
+ pVia->drmVerMajor, pVia->drmVerMinor,
+ pVia->drmVerPatchLevel);
+
+ if (((pVia->drmVerMajor > drmVIADRMExpected.major) &&
+ (pVia->drmVerMajor < drmVIADRMCompat.major)) ||
+ ((pVia->drmVerMajor == drmVIADRMExpected.major) &&
+ (pVia->drmVerMinor >= drmVIADRMExpected.minor) &&
+ (pVia->drmVerMajor < drmVIADRMCompat.major))) {
+ pVia->directRenderingType = DRI_1;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "This version of VIA DRM is "
+ "compatible with OpenChrome DDX.\n");
+ } else {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "This version of VIA DRM is not "
+ "compatible with OpenChrome DDX.\n"
+ "OpenChrome DDX can work with "
+ "VIA DRM Version %d.%d to %d.%d.\n",
+ drmVIADRMExpected.major,
+ drmVIADRMExpected.minor,
+ drmVIADRMCompat.major,
+ drmVIADRMCompat.minor);
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Disabling VIA DRM support.\n");
+ }
+ } else {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Not able to obtain VIA DRM version.\n");
+ }
+ } else {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "OpenChrome DDX will now operate "
+ "without DRM.\n");
+ }
+
+ free(busId);
+ }
+
+ status = TRUE;
+exit:
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Exiting %s.\n", __func__));
+ return status;
+}
+#endif /* OPENCHROMEDRI */
+
static Bool
VIAPreInit(ScrnInfoPtr pScrn, int flags)
{
EntityInfoPtr pEnt;
VIAPtr pVia;
MessageType from = X_DEFAULT;
-#ifdef OPENCHROMEDRI
- char *busId = NULL;
- drmVersionPtr drmVer;
-#endif
rgb defaultWeight = {0, 0, 0};
rgb defaultMask = {0, 0, 0};
Gamma defaultGamma = {0.0, 0.0, 0.0};
@@ -1005,135 +1161,10 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
pVia->directRenderingType = DRI_NONE;
pVia->KMS = FALSE;
#ifdef OPENCHROMEDRI
- if (xf86LoaderCheckSymbol("DRICreatePCIBusID")) {
- busId = DRICreatePCIBusID(pVia->PciInfo);
- } else {
- busId = malloc(64);
- if (!busId) {
- goto free_rec;
- }
-
- sprintf(busId,
- "PCI:%d:%d:%d",
- pVia->PciInfo->bus,
-#ifdef XSERVER_LIBPCIACCESS
- pVia->PciInfo->dev,
-#else
- pVia->PciInfo->device,
-#endif
- pVia->PciInfo->func);
- }
-
- /* Look for OpenChrome DRM first. */
- /* KMS supports needs to be present for OpenChrome DRM to
- * function properly.*/
- pVia->drmmode.fd = drmOpen("openchrome", busId);
- if (pVia->drmmode.fd != -1) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "OpenChrome DRM detected.\n");
- drmVer = drmGetVersion(pVia->drmmode.fd);
- if (drmVer) {
- pVia->drmVerMajor = drmVer->version_major;
- pVia->drmVerMinor = drmVer->version_minor;
- pVia->drmVerPatchLevel = drmVer->version_patchlevel;
- drmFreeVersion(drmVer);
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "OpenChrome DRM Version: %d.%d.%d\n",
- pVia->drmVerMajor, pVia->drmVerMinor,
- pVia->drmVerPatchLevel);
-
- if ((pVia->drmVerMajor > drmOpenChromeDRMVersion.major) ||
- ((pVia->drmVerMajor == drmOpenChromeDRMVersion.major) &&
- (pVia->drmVerMinor >= drmOpenChromeDRMVersion.minor))) {
- if (!drmCheckModesettingSupported(busId)) {
- pVia->KMS = TRUE;
- pVia->directRenderingType = DRI_2;
- pVia->NoAccel = TRUE;
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "KMS is supported by "
- "OpenChrome DRM.\n");
- } else {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "KMS is not available.\n");
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Disabling OpenChrome DRM support.\n");
- }
- } else {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Unsupported version of OpenChrome DRM "
- "detected.\n");
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Only OpenChrome DRM Version %d.%d or "
- "later is supported.\n",
- drmOpenChromeDRMVersion.major,
- drmOpenChromeDRMVersion.minor);
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Disabling OpenChrome DRM support.\n");
- }
- } else {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Not able to obtain OpenChrome DRM version.\n");
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Disabling OpenChrome DRM support.\n");
- }
- }
-
- free(busId);
-
- /* Now, check for "legacy" DRI1 VIA DRM. */
- if (!pVia->KMS) {
- busId = DRICreatePCIBusID(pVia->PciInfo);
- pVia->drmmode.fd = drmOpen("via", busId);
- if (pVia->drmmode.fd != -1) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "VIA DRM detected.\n");
- drmVer = drmGetVersion(pVia->drmmode.fd);
- if (drmVer) {
- pVia->drmVerMajor = drmVer->version_major;
- pVia->drmVerMinor = drmVer->version_minor;
- pVia->drmVerPatchLevel = drmVer->version_patchlevel;
- drmFreeVersion(drmVer);
-
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "VIA DRM Version: %d.%d.%d\n",
- pVia->drmVerMajor, pVia->drmVerMinor,
- pVia->drmVerPatchLevel);
-
- if (((pVia->drmVerMajor > drmVIADRMExpected.major) &&
- (pVia->drmVerMajor < drmVIADRMCompat.major)) ||
- ((pVia->drmVerMajor == drmVIADRMExpected.major) &&
- (pVia->drmVerMinor >= drmVIADRMExpected.minor) &&
- (pVia->drmVerMajor < drmVIADRMCompat.major))) {
- pVia->directRenderingType = DRI_1;
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "This version of VIA DRM is "
- "compatible with OpenChrome DDX.\n");
- } else {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "This version of VIA DRM is not "
- "compatible with OpenChrome DDX.\n"
- "OpenChrome DDX can work with "
- "VIA DRM Version %d.%d to %d.%d.\n",
- drmVIADRMExpected.major,
- drmVIADRMExpected.minor,
- drmVIADRMCompat.major,
- drmVIADRMCompat.minor);
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Disabling VIA DRM support.\n");
- }
- } else {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Not able to obtain VIA DRM version.\n");
- }
- } else {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "OpenChrome DDX will now operate "
- "without DRM.\n");
- }
-
- free(busId);
+ if (!viaDrmOpen(pScrn)) {
+ goto free_rec;
}
-#endif
+#endif /* OPENCHROMEDRI */
option = xf86NewOption(strEXAOptionName, strEXAValue);
xf86CollectOptions(pScrn, option);
commit 9020ab6abaf04ee84f8199c2412107a3e8b82344
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Sep 17 07:55:43 2020 -0700
Check for DRICreatePCIBusID symbol before calling it
The code is from xf86-video-savage.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_driver.c b/src/via_driver.c
index ac3374d..2c24143 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -1005,7 +1005,24 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
pVia->directRenderingType = DRI_NONE;
pVia->KMS = FALSE;
#ifdef OPENCHROMEDRI
- busId = DRICreatePCIBusID(pVia->PciInfo);
+ if (xf86LoaderCheckSymbol("DRICreatePCIBusID")) {
+ busId = DRICreatePCIBusID(pVia->PciInfo);
+ } else {
+ busId = malloc(64);
+ if (!busId) {
+ goto free_rec;
+ }
+
+ sprintf(busId,
+ "PCI:%d:%d:%d",
+ pVia->PciInfo->bus,
+#ifdef XSERVER_LIBPCIACCESS
+ pVia->PciInfo->dev,
+#else
+ pVia->PciInfo->device,
+#endif
+ pVia->PciInfo->func);
+ }
/* Look for OpenChrome DRM first. */
/* KMS supports needs to be present for OpenChrome DRM to
commit 605dd24651a9dea8736d8f901fa9d08ea22b4f36
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Sep 17 07:55:32 2020 -0700
Convert tab to white spaces for src/via_driver.c
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_driver.c b/src/via_driver.c
index 6e53b7c..ac3374d 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -439,9 +439,9 @@ via_pci_probe(DriverPtr driver, int entity_num,
scrn->ScreenInit = VIAScreenInit;
scrn->SwitchMode = VIASwitchMode;
scrn->AdjustFrame = VIAAdjustFrame;
- scrn->EnterVT = VIAEnterVT;
- scrn->LeaveVT = VIALeaveVT;
- scrn->FreeScreen = VIAFreeScreen;
+ scrn->EnterVT = VIAEnterVT;
+ scrn->LeaveVT = VIALeaveVT;
+ scrn->FreeScreen = VIAFreeScreen;
xf86Msg(X_NOTICE,
"VIA Technologies does not support this driver in any way.\n");
@@ -496,18 +496,18 @@ VIAProbe(DriverPtr drv, int flags)
if ((pScrn = xf86ConfigPciEntity(pScrn, 0, usedChips[i],
VIAPciChipsets, 0, 0, 0, 0, 0))) {
- pScrn->driverVersion = VIA_DRIVER_VERSION;
- pScrn->driverName = VIA_DRIVER_NAME;
- pScrn->name = VIA_NAME;
- pScrn->Probe = VIAProbe;
- pScrn->PreInit = VIAPreInit;
- pScrn->ScreenInit = VIAScreenInit;
- pScrn->SwitchMode = VIASwitchMode;
- pScrn->AdjustFrame = VIAAdjustFrame;
- pScrn->EnterVT = VIAEnterVT;
- pScrn->LeaveVT = VIALeaveVT;
- pScrn->FreeScreen = VIAFreeScreen;
- foundScreen = TRUE;
+ pScrn->driverVersion = VIA_DRIVER_VERSION;
+ pScrn->driverName = VIA_DRIVER_NAME;
+ pScrn->name = VIA_NAME;
+ pScrn->Probe = VIAProbe;
+ pScrn->PreInit = VIAPreInit;
+ pScrn->ScreenInit = VIAScreenInit;
+ pScrn->SwitchMode = VIASwitchMode;
+ pScrn->AdjustFrame = VIAAdjustFrame;
+ pScrn->EnterVT = VIAEnterVT;
+ pScrn->LeaveVT = VIALeaveVT;
+ pScrn->FreeScreen = VIAFreeScreen;
+ foundScreen = TRUE;
}
#if 0
xf86ConfigActivePciEntity(pScrn,
@@ -1203,7 +1203,7 @@ exit:
static void
LoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
- LOCO * colors, VisualPtr pVisual)
+ LOCO * colors, VisualPtr pVisual)
{
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
CARD16 lut_r[256], lut_g[256], lut_b[256];
@@ -1265,7 +1265,7 @@ viaUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
static void *
viaShadowWindow(ScreenPtr pScreen, CARD32 row, CARD32 offset, int mode,
- CARD32 *size, void *closure)
+ CARD32 *size, void *closure)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
VIAPtr pVia = VIAPTR(pScrn);
More information about the openchrome-devel
mailing list