[openchrome-devel] xf86-video-openchrome: 4 commits - src/via_driver.c
Kevin Brace
kevinbrace at kemper.freedesktop.org
Fri Jan 3 03:08:07 UTC 2020
src/via_driver.c | 55 +++++++++++++++++++++++++------------------------------
1 file changed, 25 insertions(+), 30 deletions(-)
New commits:
commit 4b3a280af31f66645a98c6937447be7bd7d1f7df
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Jan 2 18:28:05 2020 -0600
Update various log messages written from VIAScreenInit()
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_driver.c b/src/via_driver.c
index eb24135..d2d4b16 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -1389,12 +1389,14 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
pScrn->pScreen = pScreen;
pScrn->displayWidth = pScrn->virtualX;
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIAScreenInit\n"));
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Entered %s.\n", __func__));
#ifdef HAVE_DRI
if (pVia->KMS) {
if (drmSetMaster(pVia->drmmode.fd)) {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"drmSetMaster failed: %s\n",
strerror(errno));
return FALSE;
@@ -1405,7 +1407,8 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
if (pVia->directRenderingType == DRI_1) {
/* DRI2 or DRI1 support */
if (VIADRI1ScreenInit(pScreen))
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "DRI1 ScreenInit commplete\n"));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "DRI1 ScreenInit complete.\n"));
else
pVia->directRenderingType = DRI_NONE;
}
@@ -1526,7 +1529,7 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
if (!xf86_cursors_init(pScreen, size, size, flags)) {
pVia->drmmode.hwcursor = FALSE;
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "Hardware cursor initialization failed\n");
+ "Hardware cursor initialization failed.\n");
}
}
@@ -1549,10 +1552,12 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
#ifdef HAVE_DRI
if (pVia->directRenderingType == DRI_1) {
if (!VIADRIFinishScreenInit(pScreen)) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "direct rendering disabled\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Direct rendering disabled.\n");
pVia->directRenderingType = DRI_NONE;
} else
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "direct rendering enabled\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Direct rendering enabled.\n");
}
#endif
if (!pVia->NoAccel)
@@ -1567,17 +1572,18 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
#ifdef HAVE_DEBUG
if (pVia->PrintVGARegs) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "VIAScreenInit: Printing VGA registers.\n");
+ "Printing VGA registers.\n");
ViaVgahwPrint(VGAHWPTR(pScrn));
}
if (pVia->PrintTVRegs) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "VIAScreenInit: Printing TV registers.\n");
+ "Printing TV registers.\n");
ViaTVPrintRegs(pScrn);
}
#endif
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "- Done\n"));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Exiting %s.\n", __func__));
return TRUE;
}
commit 42b0af34ee0c598b2674b338dff391e0ca874176
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Jan 2 16:52:46 2020 -0600
Move the location where the color map is initialized
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_driver.c b/src/via_driver.c
index 0d1af5a..eb24135 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -1485,6 +1485,14 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
xf86SetBlackWhitePixels(pScreen);
+ if (!miCreateDefColormap(pScreen))
+ return FALSE;
+
+ if (!xf86HandleColormaps(pScreen, 256, 8, LoadPalette, NULL,
+ CMAP_RELOAD_ON_MODE_SWITCH
+ | CMAP_PALETTED_TRUECOLOR))
+ return FALSE;
+
miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
if (pVia->drmmode.hwcursor) {
@@ -1532,14 +1540,6 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
if (!xf86CrtcScreenInit(pScreen))
return FALSE;
- if (!miCreateDefColormap(pScreen))
- return FALSE;
-
- if (!xf86HandleColormaps(pScreen, 256, 8, LoadPalette, NULL,
- CMAP_RELOAD_ON_MODE_SWITCH
- | CMAP_PALETTED_TRUECOLOR))
- return FALSE;
-
xf86DPMSInit(pScreen, xf86DPMSSet, 0);
if (!VIAEnterVT_internal(pScrn, 1))
commit d946791e9a54b3a57c87dc71a8f847bf384b93d7
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Jan 2 15:52:38 2020 -0600
Move the location where xf86SetBlackWhitePixels() is invoked
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_driver.c b/src/via_driver.c
index f15476f..0d1af5a 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -1456,8 +1456,6 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
pScrn->bitsPerPixel))
return FALSE;
- xf86SetBlackWhitePixels(pScreen);
-
if (pScrn->bitsPerPixel > 8) {
VisualPtr visual;
@@ -1485,6 +1483,8 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
xf86SetSilkenMouse(pScreen);
#endif
+ xf86SetBlackWhitePixels(pScreen);
+
miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
if (pVia->drmmode.hwcursor) {
commit 333c0e44b3299014cb4880e73a6adcc7c7928da3
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Jan 2 15:10:25 2020 -0600
Remove not so important debug messages from VIAScreenInit()
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_driver.c b/src/via_driver.c
index da93ddb..f15476f 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -1440,8 +1440,6 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
return FALSE;
}
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "- Visuals set up\n"));
-
if (pVia->shadowFB) {
int pitch = BitmapBytePad(pScrn->bitsPerPixel * pScrn->virtualX);
@@ -1459,7 +1457,6 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
return FALSE;
xf86SetBlackWhitePixels(pScreen);
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "- B & W\n"));
if (pScrn->bitsPerPixel > 8) {
VisualPtr visual;
@@ -1487,10 +1484,8 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
#if 0
xf86SetSilkenMouse(pScreen);
#endif
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "- Backing store set up\n"));
miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "- SW cursor set up\n"));
if (pVia->drmmode.hwcursor) {
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
@@ -1506,7 +1501,6 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
cursorSize = ((size * size) >> 3) * 2;
break;
default:
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "HWCursor ARGB enabled\n"));
flags |= (HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64 | HARDWARE_CURSOR_ARGB);
size = 64;
cursorSize = (size * size) << 2;
@@ -1540,18 +1534,13 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
if (!miCreateDefColormap(pScreen))
return FALSE;
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "- Def Color map set up\n"));
if (!xf86HandleColormaps(pScreen, 256, 8, LoadPalette, NULL,
CMAP_RELOAD_ON_MODE_SWITCH
| CMAP_PALETTED_TRUECOLOR))
return FALSE;
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "- Palette loaded\n"));
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "- Color maps etc. set up\n"));
-
xf86DPMSInit(pScreen, xf86DPMSSet, 0);
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "- DPMS set up\n"));
if (!VIAEnterVT_internal(pScrn, 1))
return FALSE;
More information about the openchrome-devel
mailing list