xf86-video-r128: Branch 'master' - 6 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Aug 2 19:48:54 UTC 2018
configure.ac | 2
src/r128.h | 3 -
src/r128_driver.c | 112 ++++++++++++++++--------------------------------------
src/r128_exa.c | 24 +++--------
4 files changed, 44 insertions(+), 97 deletions(-)
New commits:
commit 1fe5b0c0ab444d7c902a1d348ae4d982cf5c1790
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Aug 2 12:47:54 2018 -0700
Version bumped to 6.11.101
Performed DRI1 and EXA / XAA initialization code refactoring.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/configure.ac b/configure.ac
index fd78f41..ecef5c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-video-r128],
- [6.11.100],
+ [6.11.101],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xf86-video-r128])
AC_CONFIG_SRCDIR([Makefile.am])
commit fb625410051dcf2e0bbd3bbcefe83dbc53f9a33c
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Aug 2 12:41:31 2018 -0700
Hold off enabling acceleration until EXA / XAA are fully initialized
The turn on timing is premature. Wait until completion of the
initialization process.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/r128_driver.c b/src/r128_driver.c
index e9115fb..a280aca 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -1343,9 +1343,8 @@ R128PreInitAccel(ScrnInfoPtr pScrn)
"Loading EXA module...\n");
if (LoadSubModule(pScrn->module, "exa", NULL, NULL, NULL,
&info->exaReq, &errmaj, &errmin)) {
- info->accelOn = TRUE;
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "EXA acceleration enabled.\n");
+ "Loading EXA module.\n");
} else {
LoaderErrorMsg(NULL, "exa", errmaj, errmin);
}
@@ -1356,9 +1355,8 @@ R128PreInitAccel(ScrnInfoPtr pScrn)
((info->useEXA) && (!info->accelOn))) {
#ifdef HAVE_XAA_H
if (xf86LoadSubModule(pScrn, "xaa")) {
- info->accelOn = TRUE;
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "XAA acceleration enabled.\n");
+ "Loading XAA module.\n");
}
#endif
}
commit b395a05428831faf7a0502b52c78c99a8a4d6a8e
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Aug 2 12:38:39 2018 -0700
Consolidate EXA initialization code into R128EXAInit
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/r128.h b/src/r128.h
index 2df674f..5e6502b 100644
--- a/src/r128.h
+++ b/src/r128.h
@@ -604,7 +604,7 @@ extern int R128CCEStop(ScrnInfoPtr pScrn);
extern void R128CopySwap(uint8_t *dst, uint8_t *src, unsigned int size, int swap);
#ifdef USE_EXA
-extern Bool R128EXAInit(ScreenPtr pScreen);
+extern Bool R128EXAInit(ScreenPtr pScreen, int total);
extern Bool R128GetDatatypeBpp(int bpp, uint32_t *type);
extern Bool R128GetPixmapOffsetPitch(PixmapPtr pPix, uint32_t *pitch_offset);
extern void R128DoPrepareCopy(ScrnInfoPtr pScrn, uint32_t src_pitch_offset,
diff --git a/src/r128_driver.c b/src/r128_driver.c
index 010a3cc..e9115fb 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -1880,38 +1880,22 @@ Bool R128ScreenInit(SCREEN_INIT_ARGS_DECL)
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Filling in EXA memory info\n");
- info->ExaDriver = exaDriverAlloc();
- if (!info->ExaDriver) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Could not allocate EXA driver...\n");
- info->accelOn = FALSE;
- } else {
- info->ExaDriver->offScreenBase = pScrn->virtualY * width_bytes;
+ /*
+ * Don't give EXA the true full memory size, because
+ * the textureSize sized chunk on the end is handled
+ * by DRI.
+ */
+ if (R128EXAInit(pScreen, total)) {
+ info->accelOn = TRUE;
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Filled in offs\n");
-
- /*
- * Don't give EXA the true full memory size, because
- * the textureSize sized chunk on the end is handled
- * by DRI.
- */
- info->ExaDriver->memorySize = total;
-
+ "EXA Acceleration enabled.\n");
+ } else {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "EXA Acceleration initialization "
+ "failed.\n");
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Going to init EXA...\n");
-
- if (R128EXAInit(pScreen)) {
- info->accelOn = TRUE;
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "EXA Acceleration enabled.\n");
- } else {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "EXA Acceleration initialization "
- "failed.\n");
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "EXA Acceleration disabled.\n");
- }
+ "Acceleration disabled.\n");
}
}
#endif
diff --git a/src/r128_exa.c b/src/r128_exa.c
index b7501ac..cf9b74f 100644
--- a/src/r128_exa.c
+++ b/src/r128_exa.c
@@ -394,15 +394,26 @@ R128CCESync(ScreenPtr pScreen, int marker)
#endif
Bool
-R128EXAInit(ScreenPtr pScreen)
+R128EXAInit(ScreenPtr pScreen, int total)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
R128InfoPtr info = R128PTR(pScrn);
+ info->ExaDriver = exaDriverAlloc();
+ if (!info->ExaDriver) {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Could not allocate EXA driver...\n");
+ return FALSE;
+ }
+
info->ExaDriver->exa_major = EXA_VERSION_MAJOR;
info->ExaDriver->exa_minor = EXA_VERSION_MINOR;
info->ExaDriver->memoryBase = info->FB + pScrn->fbOffset;
+ info->ExaDriver->offScreenBase = pScrn->virtualY *
+ (pScrn->displayWidth *
+ info->CurrentLayout.pixel_bytes);
+ info->ExaDriver->memorySize = total;
info->ExaDriver->flags = EXA_OFFSCREEN_PIXMAPS | EXA_OFFSCREEN_ALIGN_POT;
#if EXA_VERSION_MAJOR > 2 || (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 3)
commit 78b21efdce6f1231b0c9c8a4e801ee476acd5dc4
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Aug 2 10:44:15 2018 -0700
Deprecate R128VerboseInitEXA
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/r128_driver.c b/src/r128_driver.c
index 3023cc1..010a3cc 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -1643,30 +1643,6 @@ R128BlockHandler(BLOCKHANDLER_ARGS_DECL)
}
}
-#ifdef USE_EXA
-Bool R128VerboseInitEXA(ScreenPtr pScreen)
-{
- ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
- R128InfoPtr info = R128PTR(pScrn);
-
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Going to init EXA...\n");
-
- if (R128EXAInit(pScreen)) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "EXA Acceleration enabled\n");
- info->accelOn = TRUE;
-
- return TRUE;
- } else {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "EXA Acceleration initialization failed\n");
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "EXA Acceleration disabled\n");
- info->accelOn = FALSE;
-
- return FALSE;
- }
-}
-#endif
-
/* Called at the start of each server generation. */
Bool R128ScreenInit(SCREEN_INIT_ARGS_DECL)
{
@@ -1922,7 +1898,20 @@ Bool R128ScreenInit(SCREEN_INIT_ARGS_DECL)
*/
info->ExaDriver->memorySize = total;
- R128VerboseInitEXA(pScreen);
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Going to init EXA...\n");
+
+ if (R128EXAInit(pScreen)) {
+ info->accelOn = TRUE;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "EXA Acceleration enabled.\n");
+ } else {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "EXA Acceleration initialization "
+ "failed.\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "EXA Acceleration disabled.\n");
+ }
}
}
#endif
commit 370dc01505718dc07d444b4534794d0b988d27ad
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Aug 2 10:43:18 2018 -0700
Deprecate R128AccelInit
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/r128_driver.c b/src/r128_driver.c
index 6960a19..3023cc1 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -1667,30 +1667,6 @@ Bool R128VerboseInitEXA(ScreenPtr pScreen)
}
#endif
-void
-R128AccelInit(Bool noAccel, ScreenPtr pScreen)
-{
- ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
- R128InfoPtr info = R128PTR(pScrn);
-
- if (!noAccel) {
- if ((!info->useEXA) ||
- ((info->useEXA) && (!info->accelOn))) {
-#ifdef HAVE_XAA_H
- if (R128XAAAccelInit(pScreen)) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "XAA acceleration enabled.\n");
- }
-#endif
- }
-
- if (!info->accelOn) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Acceleration disabled.\n");
- }
- }
-}
-
/* Called at the start of each server generation. */
Bool R128ScreenInit(SCREEN_INIT_ARGS_DECL)
{
@@ -1911,9 +1887,18 @@ Bool R128ScreenInit(SCREEN_INIT_ARGS_DECL)
width, height);
}
- R128AccelInit(info->noAccel, pScreen);
- }
- }
+ if (!info->noAccel) {
+ if (R128XAAAccelInit(pScreen)) {
+ info->accelOn = TRUE;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "XAA acceleration enabled.\n");
+ } else {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Acceleration disabled.\n");
+ }
+ }
+ }
+ }
#ifdef USE_EXA
else {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
commit 4685a918ff68e4a9e20df31c37028626b96743cb
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Aug 2 10:42:03 2018 -0700
Deprecate R128EXAAccelInit
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/r128.h b/src/r128.h
index 032c40b..2df674f 100644
--- a/src/r128.h
+++ b/src/r128.h
@@ -604,7 +604,6 @@ extern int R128CCEStop(ScrnInfoPtr pScrn);
extern void R128CopySwap(uint8_t *dst, uint8_t *src, unsigned int size, int swap);
#ifdef USE_EXA
-extern Bool R128EXAAccelInit(ScreenPtr pScreen);
extern Bool R128EXAInit(ScreenPtr pScreen);
extern Bool R128GetDatatypeBpp(int bpp, uint32_t *type);
extern Bool R128GetPixmapOffsetPitch(PixmapPtr pPix, uint32_t *pitch_offset);
diff --git a/src/r128_driver.c b/src/r128_driver.c
index a8cdb20..6960a19 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -1674,15 +1674,6 @@ R128AccelInit(Bool noAccel, ScreenPtr pScreen)
R128InfoPtr info = R128PTR(pScrn);
if (!noAccel) {
- if (info->useEXA) {
-#ifdef USE_EXA
- if (R128EXAAccelInit(pScreen)) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "EXA acceleration enabled.\n");
- }
-#endif
- }
-
if ((!info->useEXA) ||
((info->useEXA) && (!info->accelOn))) {
#ifdef HAVE_XAA_H
@@ -1924,22 +1915,31 @@ Bool R128ScreenInit(SCREEN_INIT_ARGS_DECL)
}
}
#ifdef USE_EXA
- else {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Filling in EXA memory info\n");
+ else {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Filling in EXA memory info\n");
- R128AccelInit(info->noAccel, pScreen);
- info->ExaDriver->offScreenBase = pScrn->virtualY * width_bytes;
+ info->ExaDriver = exaDriverAlloc();
+ if (!info->ExaDriver) {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Could not allocate EXA driver...\n");
+ info->accelOn = FALSE;
+ } else {
+ info->ExaDriver->offScreenBase = pScrn->virtualY * width_bytes;
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Filled in offs\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Filled in offs\n");
- /* Don't give EXA the true full memory size, because the
- textureSize sized chunk on the end is handled by DRI */
- info->ExaDriver->memorySize = total;
+ /*
+ * Don't give EXA the true full memory size, because
+ * the textureSize sized chunk on the end is handled
+ * by DRI.
+ */
+ info->ExaDriver->memorySize = total;
- R128VerboseInitEXA(pScreen);
- }
+ R128VerboseInitEXA(pScreen);
+ }
+ }
#endif
#ifdef R128DRI
diff --git a/src/r128_exa.c b/src/r128_exa.c
index 5a54740..b7501ac 100644
--- a/src/r128_exa.c
+++ b/src/r128_exa.c
@@ -394,25 +394,6 @@ R128CCESync(ScreenPtr pScreen, int marker)
#endif
Bool
-R128EXAAccelInit(ScreenPtr pScreen)
-{
- ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
- R128InfoPtr info = R128PTR(pScrn);
-
- /* Don't init EXA here because it'll be taken care of in mm init */
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Allocating EXA driver...\n");
- info->ExaDriver = exaDriverAlloc();
- if (!info->ExaDriver) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Could not allocate EXA driver...\n");
- info->accelOn = FALSE;
- }
-
- return TRUE;
-}
-
-Bool
R128EXAInit(ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
More information about the xorg-commit
mailing list