Module Name: xsrc
Committed By: macallan
Date: Wed Jun 18 16:55:28 UTC 2014
Modified Files:
xsrc/external/mit/xf86-video-suntcx/dist/src: tcx.h tcx_driver.c
Log Message:
make this work properly on 8bit SUNW,tcx
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xf86-video-suntcx/dist/src/tcx.h
cvs rdiff -u -r1.6 -r1.7 \
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.4 xsrc/external/mit/xf86-video-suntcx/dist/src/tcx.h:1.5
--- xsrc/external/mit/xf86-video-suntcx/dist/src/tcx.h:1.4 Tue Jun 4 22:20:42 2013
+++ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx.h Wed Jun 18 16:55:28 2014
@@ -37,6 +37,8 @@
/* Various offsets in virtual (ie. mmap()) spaces Linux and Solaris support. */
#define TCX_RAM8_VOFF 0x00000000
#define TCX_RAM24_VOFF 0x01000000
+#define TCX_STIP_VOFF 0x10000000
+#define TCX_BLIT_VOFF 0x20000000
#define TCX_CPLANE_VOFF 0x28000000
#define TCX_RSTIP_VOFF 0x30000000
#define TCX_RBLIT_VOFF 0x38000000
@@ -56,6 +58,7 @@ typedef struct {
sbusDevicePtr psdp;
CloseScreenProcPtr CloseScreen;
Bool HWCursor;
+ Bool Is8bit;
uint64_t *rblit;
uint64_t *rstip;
xf86CursorInfoPtr CursorInfoRec;
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.6 xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c:1.7
--- xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c:1.6 Tue Jun 4 22:20:42 2013
+++ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c Wed Jun 18 16:55:28 2014
@@ -341,12 +341,13 @@ TCXPreInit(ScrnInfoPtr pScrn, int flags)
**********************/
hwCursor = 0;
lowDepth = 1;
- if (sparcPromInit() >= 0) {
- hwCursor = sparcPromGetBool(&psdp->node, "hw-cursor");
- lowDepth = sparcPromGetBool(&psdp->node, "tcx-8-bit");
- sparcPromClose();
+ if (sparcPromInit() >= 0) {
+ hwCursor = sparcPromGetBool(&psdp->node, "hw-cursor");
+ lowDepth = sparcPromGetBool(&psdp->node, "tcx-8-bit");
+ sparcPromClose();
}
+ pTcx->Is8bit = (lowDepth != 0);
/* all S24 support a hardware cursor */
if (!lowDepth)
hwCursor = 1;
@@ -357,7 +358,7 @@ TCXPreInit(ScrnInfoPtr pScrn, int flags)
deal with depth
*********************/
- if (!xf86SetDepthBpp(pScrn, 0, 0, 0,
+ if (!xf86SetDepthBpp(pScrn, lowDepth ? 8 : 0, 0, 0,
lowDepth ? NoDepth24Support : Support32bppFb)) {
return FALSE;
} else {
@@ -524,15 +525,30 @@ TCXScreenInit(SCREEN_INIT_ARGS_DECL)
return FALSE;
}
- pTcx->rblit = xf86MapSbusMem(pTcx->psdp, TCX_RBLIT_VOFF, 8 * 1024 * 1024);
- if (pTcx->rblit == NULL) {
- xf86Msg(X_ERROR, "Couldn't map RBLIT space\n");
- return FALSE;
- }
- pTcx->rstip = xf86MapSbusMem(pTcx->psdp, TCX_RSTIP_VOFF, 8 * 1024 * 1024);
- if (pTcx->rstip == NULL) {
- xf86Msg(X_ERROR, "Couldn't map RSTIP space\n");
- return FALSE;
+ if (pTcx->Is8bit) {
+ /* use STIP and BLIT on tcx */
+ pTcx->rblit = xf86MapSbusMem(pTcx->psdp, TCX_BLIT_VOFF, 8 * 1024 * 1024);
+ if (pTcx->rblit == NULL) {
+ xf86Msg(X_ERROR, "Couldn't map BLIT space\n");
+ return FALSE;
+ }
+ pTcx->rstip = xf86MapSbusMem(pTcx->psdp, TCX_STIP_VOFF, 8 * 1024 * 1024);
+ if (pTcx->rstip == NULL) {
+ xf86Msg(X_ERROR, "Couldn't map STIP space\n");
+ return FALSE;
+ }
+ } else {
+ /* use RSTIP and RBLIT on S24 */
+ pTcx->rblit = xf86MapSbusMem(pTcx->psdp, TCX_RBLIT_VOFF, 8 * 1024 * 1024);
+ if (pTcx->rblit == NULL) {
+ xf86Msg(X_ERROR, "Couldn't map RBLIT space\n");
+ return FALSE;
+ }
+ pTcx->rstip = xf86MapSbusMem(pTcx->psdp, TCX_RSTIP_VOFF, 8 * 1024 * 1024);
+ if (pTcx->rstip == NULL) {
+ xf86Msg(X_ERROR, "Couldn't map RSTIP space\n");
+ return FALSE;
+ }
}
if (! pTcx->fb)
@@ -605,9 +621,7 @@ TCXScreenInit(SCREEN_INIT_ARGS_DECL)
fbPictureInit (pScreen, 0, 0);
#endif
-#if 0
- if (!pTcx->NoAccel)
- {
+ if (!pTcx->NoAccel) {
XF86ModReqInfo req;
int errmaj, errmin;
@@ -625,7 +639,7 @@ TCXScreenInit(SCREEN_INIT_ARGS_DECL)
}
miInitializeBackingStore(pScreen);
-#endif
+
xf86SetBackingStore(pScreen);
xf86SetSilkenMouse(pScreen);