Module Name: xsrc
Committed By: macallan
Date: Tue Jul 8 17:05:27 UTC 2014
Modified Files:
xsrc/external/mit/xf86-video-suntcx/dist/src: tcx.h tcx_accel.c
tcx_driver.c
Log Message:
if the hardware supports stipples with ROPs, use them
while there, downgrade some config output from X_ERROR to X_PROBED
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xf86-video-suntcx/dist/src/tcx.h
cvs rdiff -u -r1.8 -r1.9 \
xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_accel.c \
xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/xf86-video-suntcx/dist/src/tcx.h
diff -u xsrc/external/mit/xf86-video-suntcx/dist/src/tcx.h:1.6 xsrc/external/mit/xf86-video-suntcx/dist/src/tcx.h:1.7
--- xsrc/external/mit/xf86-video-suntcx/dist/src/tcx.h:1.6 Wed Jul 2 11:54:48 2014
+++ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx.h Tue Jul 8 17:05:26 2014
@@ -59,6 +59,7 @@ typedef struct {
CloseScreenProcPtr CloseScreen;
Bool HWCursor;
Bool Is8bit;
+ Bool HasStipROP;
int vramsize; /* size of the 8bit fb */
uint64_t *rblit;
uint64_t *rstip;
Index: xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_accel.c
diff -u xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_accel.c:1.8 xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_accel.c:1.9
--- xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_accel.c:1.8 Wed Jul 2 11:54:48 2014
+++ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_accel.c Tue Jul 8 17:05:26 2014
@@ -21,7 +21,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-/* $NetBSD: tcx_accel.c,v 1.8 2014/07/02 11:54:48 macallan Exp $ */
+/* $NetBSD: tcx_accel.c,v 1.9 2014/07/08 17:05:26 macallan Exp $ */
#include <sys/types.h>
@@ -178,22 +178,29 @@ TcxPrepareSolid(
{
ScrnInfoPtr pScreenInfo = xf86Screens[pPixmap->drawable.pScreen->myNum];
TcxPtr pTcx = GET_TCX_FROM_SCRN(pScreenInfo);
+ uint32_t hwfg;
ENTER;
+
/* weed out the cases we can't accelerate */
- if (alu != GXcopy)
+ if (pTcx->HasStipROP) {
+ hwfg = alu << 28;
+ } else if (alu == GXcopy) {
+ hwfg = 0x30000000;
+ } else
return FALSE;
+
if ((planemask != 0xffffffff) && (planemask != 0x00ffffff))
return FALSE;
if (exaGetPixmapOffset(pPixmap) != 0)
return FALSE;
pTcx->fg = (fg & 0x00ffffff);
- if (pTcx->pitchshift == 0) {
- pTcx->fg |= 0x30000000;
- } else
- pTcx->fg |= 0x33000000;
+ /* set colour space ID if we're in 24bit mode */
+ if (pTcx->pitchshift != 0)
+ hwfg |= 0x03000000;
+ pTcx->fg |= hwfg;
#ifdef DEBUG
- xf86Msg(X_ERROR, "fg: %08x\n", fg);
+ xf86Msg(X_ERROR, "fg: %08x\n", hwfg);
#endif
LEAVE;
return TRUE;
Index: xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c
diff -u xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c:1.8 xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c:1.9
--- xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c:1.8 Wed Jul 2 11:54:48 2014
+++ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c Tue Jul 8 17:05:26 2014
@@ -345,7 +345,9 @@ TCXPreInit(ScrnInfoPtr pScrn, int flags)
prom = sparcPromInit();
hwCursor = sparcPromGetBool(&psdp->node, "hw-cursor");
lowDepth = sparcPromGetBool(&psdp->node, "tcx-8-bit");
-
+ if (pTcx->HasStipROP = sparcPromGetBool(&psdp->node, "stip-rop")) {
+ xf86Msg(X_PROBED, "stipple space supports ROPs\n");
+ }
pTcx->Is8bit = (lowDepth != 0);
/* all S24 support a hardware cursor */
if (!lowDepth) {
@@ -362,13 +364,14 @@ TCXPreInit(ScrnInfoPtr pScrn, int flags)
if ((v > 0) && (v < 3))
pTcx->vramsize = 0x100000 * v;
}
- xf86Msg(X_ERROR, "found %d MB video memory\n", v);
+ xf86Msg(X_PROBED, "found %d MB video memory\n", v);
}
if (prom)
sparcPromClose();
- xf86Msg(X_ERROR, "hw-cursor: %d\n", hwCursor);
+ xf86Msg(X_PROBED, "hardware cursor support %s\n",
+ hwCursor ? "found" : "not found");
/*********************
deal with depth