[openchrome-devel] xf86-video-openchrome: 3 commits - configure.ac src/via_driver.c src/via_ums.c
Kevin Brace
kevinbrace at kemper.freedesktop.org
Sat Jan 11 01:16:40 UTC 2020
configure.ac | 2 +-
src/via_driver.c | 4 +---
src/via_ums.c | 50 ++++++++++++++++++++++++++++++++------------------
3 files changed, 34 insertions(+), 22 deletions(-)
New commits:
commit f2c731085ae7cddc3ec93f0e85b0c257897c10b6
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jan 10 19:16:21 2020 -0600
Version bumped to 0.6.204
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/configure.ac b/configure.ac
index 274e217..7190941 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-video-openchrome],
- [0.6.203],
+ [0.6.204],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
[xf86-video-openchrome])
commit 5e6d99cb23f5ed3d972e62a715a9e65e28616d0a
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jan 10 19:03:25 2020 -0600
Modify how pScreen->ModifyPixmapHeader() is invoked
Inside VIACreateScreenResources().
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_driver.c b/src/via_driver.c
index c366312..dc87deb 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -1298,9 +1298,7 @@ VIACreateScreenResources(ScreenPtr pScreen)
if (pVia->shadowFB)
surface = pVia->ShadowPtr;
- if (!pScreen->ModifyPixmapHeader(rootPixmap, pScrn->virtualX,
- pScrn->virtualY, -1, -1,
- pVia->drmmode.front_bo->pitch,
+ if (!pScreen->ModifyPixmapHeader(rootPixmap, -1, -1, -1, -1, -1,
surface))
return FALSE;
commit 9a6d8615a8ca999528cad288d7858edf5834ae04
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed Jan 8 21:31:14 2020 -0600
Minor code clean up inside viaUMSCreate()
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_ums.c b/src/via_ums.c
index 3a46cc1..1f119c1 100644
--- a/src/via_ums.c
+++ b/src/via_ums.c
@@ -691,11 +691,10 @@ viaUMSCreate(ScrnInfoPtr pScrn)
{
ScreenPtr pScreen = pScrn->pScreen;
VIAPtr pVia = VIAPTR(pScrn);
- unsigned long offset;
BoxRec AvailFBArea;
- Bool ret = TRUE;
- long size;
+ int offset, size;
int maxY;
+ Bool ret = TRUE;
#ifdef HAVE_DRI
if (pVia->directRenderingType == DRI_1) {
@@ -705,7 +704,7 @@ viaUMSCreate(ScrnInfoPtr pScrn)
/* In the case of DRI we handle all VRAM by the DRI ioctls */
if (pVia->useEXA)
- return TRUE;
+ goto exit;
/* XAA has to use FBManager so we have to split the space with DRI */
maxY = pScrn->virtualY + (pVia->driSize / pVia->Bpl);
@@ -724,31 +723,46 @@ viaUMSCreate(ScrnInfoPtr pScrn)
pVia->FBFreeStart = (AvailFBArea.y2 + 1) * pVia->Bpl;
/*
- * Initialization of the XFree86 framebuffer manager is done via
- * Bool xf86InitFBManager(ScreenPtr pScreen, BoxPtr FullBox)
- * FullBox represents the area of the framebuffer that the manager
- * is allowed to manage. This is typically a box with a width
- * of pScrn->displayWidth and a height of as many lines as can be fit
- * within the total video memory
+ * Initialization of the XFree86 framebuffer manager is done via
+ * Bool xf86InitFBManager(ScreenPtr pScreen, BoxPtr FullBox)
+ * FullBox represents the area of the framebuffer that the manager
+ * is allowed to manage. This is typically a box with a width of
+ * pScrn->displayWidth and a height of as many lines as can be fit
+ * within the total video memory.
*/
ret = xf86InitFBManager(pScreen, &AvailFBArea);
- if (ret != TRUE)
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "xf86InitFBManager init failed\n");
+ if (!ret) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "xf86InitFBManager initialization failed.\n");
+ goto exit;
+ }
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Frame Buffer From (%d,%d) To (%d,%d)\n",
- AvailFBArea.x1, AvailFBArea.y1, AvailFBArea.x2, AvailFBArea.y2));
+ "Frame buffer from (%d,%d) to (%d,%d).\n",
+ AvailFBArea.x1, AvailFBArea.y1,
+ AvailFBArea.x2, AvailFBArea.y2));
offset = (pVia->FBFreeStart + ((pScrn->bitsPerPixel >> 3) - 1)) /
(pScrn->bitsPerPixel >> 3);
size = (pVia->FBFreeEnd / (pScrn->bitsPerPixel >> 3)) - offset;
- if (size > 0)
- xf86InitFBManagerLinear(pScreen, offset, size);
+ if (size <= 0) {
+ ret = FALSE;
+ goto exit;
+ }
+
+ ret = xf86InitFBManagerLinear(pScreen, offset, size);
+ if (!ret) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "xf86InitFBManagerLinear initialization "
+ "failed.\n");
+ goto exit;
+ }
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Using %d lines for offscreen memory.\n",
+ "Using %d lines for off screen memory.\n",
AvailFBArea.y2 - pScrn->virtualY));
- return TRUE;
+exit:
+ return ret;
}
static Bool
More information about the openchrome-devel
mailing list