Module Name: xsrc
Committed By: macallan
Date: Thu Feb 28 12:39:37 UTC 2013
Modified Files:
xsrc/external/mit/xf86-video-siliconmotion/dist/src: smi.h smi_driver.c
smilynx_crtc.c smilynx_hw.c smilynx_output.c
Log Message:
make this work on Gdium ( and NetBSD in general )
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 \
xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi.h
cvs rdiff -u -r1.1.1.5 -r1.2 \
xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c
cvs rdiff -u -r1.1.1.2 -r1.2 \
xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_crtc.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_hw.c \
xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_output.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-siliconmotion/dist/src/smi.h
diff -u xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi.h:1.1.1.3 xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi.h:1.2
--- xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi.h:1.1.1.3 Sat May 22 10:09:12 2010
+++ xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi.h Thu Feb 28 12:39:37 2013
@@ -60,6 +60,12 @@ authorization from the XFree86 Project a
#include "xf86xv.h"
#include <X11/extensions/Xv.h>
+#ifndef __BYTE_ORDER
+#define __BYTE_ORDER BYTE_ORDER
+#define __BIG_ENDIAN BIG_ENDIAN
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#endif
+
/******************************************************************************/
/* D E F I N I T I O N S */
/******************************************************************************/
@@ -70,7 +76,7 @@ authorization from the XFree86 Project a
#define SMI_USE_IMAGE_WRITES 0
#define SMI_USE_VIDEO 1
-#define SMI_USE_CAPTURE 1
+#define SMI_USE_CAPTURE 0
#define SMI501_CLI_DEBUG 0
/*
Index: xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c
diff -u xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c:1.1.1.5 xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c:1.2
--- xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c:1.1.1.5 Sat Jul 23 08:12:10 2011
+++ xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c Thu Feb 28 12:39:37 2013
@@ -54,7 +54,6 @@ authorization from The XFree86 Project o
#include <X11/extensions/dpms.h>
#endif
-
/*
* Internals
*/
@@ -1016,6 +1015,7 @@ SMI_DetectPanelSize(ScrnInfoPtr pScrn)
if (pSmi->lcdWidth == 0 || pSmi->lcdHeight == 0) {
/* panel size detection ... requires BIOS call on 730 hardware */
+#ifdef USE_INT10
if (pSmi->Chipset == SMI_COUGAR3DR) {
if (pSmi->pInt10 != NULL) {
pSmi->pInt10->num = 0x10;
@@ -1072,7 +1072,9 @@ SMI_DetectPanelSize(ScrnInfoPtr pScrn)
/* Set this to indicate that we've done the detection */
pSmi->lcd = 1;
}
- else if (IS_MSOC(pSmi)) {
+ else
+#endif /* USE_INT10 */
+ if (IS_MSOC(pSmi)) {
pSmi->lcdWidth = (READ_SCR(pSmi, PANEL_WWIDTH) >> 16) & 2047;
pSmi->lcdHeight = (READ_SCR(pSmi, PANEL_WHEIGHT) >> 16) & 2047;
}
@@ -1262,7 +1264,7 @@ SMI_MapMmio(ScrnInfoPtr pScrn)
result);
if (err)
- return (FALSE);
+ pSmi->MapBase = NULL;
}
#endif
Index: xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_crtc.c
diff -u xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_crtc.c:1.1.1.2 xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_crtc.c:1.2
--- xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_crtc.c:1.1.1.2 Thu Jul 9 03:41:39 2009
+++ xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_crtc.c Thu Feb 28 12:39:37 2013
@@ -565,7 +565,7 @@ SMILynx_CrtcModeSet_bios(xf86CrtcPtr crt
CARD8 tmp;
ENTER();
-
+#ifdef USE_INT10
/* Find the INT 10 mode number */
{
static struct {
@@ -604,14 +604,14 @@ SMILynx_CrtcModeSet_bios(xf86CrtcPtr crt
}
}
}
-
+#endif
if(!reg->mode){
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "SMILynx_CrtcModeSet_bios: Not a known BIOS mode: "
"falling back to direct modesetting.\n");
SMILynx_CrtcModeSet_vga(crtc,mode,adjusted_mode,x,y);
LEAVE();
}
-
+#ifdef USE_INT10
pSmi->pInt10->num = 0x10;
pSmi->pInt10->ax = reg->mode | 0x80;
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Setting mode 0x%02X\n",
@@ -632,7 +632,7 @@ SMILynx_CrtcModeSet_bios(xf86CrtcPtr crt
SMICRTC(crtc)->video_init(crtc);
SMILynx_CrtcAdjustFrame(crtc, x,y);
-
+#endif
LEAVE();
}
Index: xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_hw.c
diff -u xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_hw.c:1.1.1.1 xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_hw.c:1.2
--- xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_hw.c:1.1.1.1 Wed Jun 10 06:41:36 2009
+++ xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_hw.c Thu Feb 28 12:39:37 2013
@@ -297,6 +297,7 @@ SMILynx_Save(ScrnInfoPtr pScrn)
pSmi->ModeStructInit = TRUE;
}
+#ifdef USE_INT10
if (pSmi->useBIOS && pSmi->pInt10 != NULL) {
pSmi->pInt10->num = 0x10;
pSmi->pInt10->ax = 0x0F00;
@@ -305,7 +306,7 @@ SMILynx_Save(ScrnInfoPtr pScrn)
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Current mode 0x%02X.\n",
save->mode);
}
-
+#endif
if (xf86GetVerbosity() > 1) {
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, VERBLEV,
"Saved current video mode. Register dump:\n");
@@ -358,6 +359,7 @@ SMILynx_WriteMode(ScrnInfoPtr pScrn, vga
VGAOUT8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0xA0, restore->SRA0);
if (pSmi->useBIOS && restore->mode != 0){
+#ifdef USE_INT10
pSmi->pInt10->num = 0x10;
pSmi->pInt10->ax = restore->mode | 0x80;
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Setting mode 0x%02X\n",
@@ -372,6 +374,7 @@ SMILynx_WriteMode(ScrnInfoPtr pScrn, vga
/* Enable DPR/VPR registers. */
tmp = VGAIN8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x21);
VGAOUT8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x21, tmp & ~0x03);
+#endif
} else {
/* Restore the standard VGA registers */
vgaHWRestore(pScrn, vgaSavePtr, VGA_SR_ALL);
Index: xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_output.c
diff -u xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_output.c:1.1.1.1 xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_output.c:1.2
--- xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_output.c:1.1.1.1 Wed Jun 10 06:41:36 2009
+++ xsrc/external/mit/xf86-video-siliconmotion/dist/src/smilynx_output.c Thu Feb 28 12:39:37 2013
@@ -124,6 +124,7 @@ SMILynx_OutputDPMS_lcd(xf86OutputPtr out
static void
SMILynx_OutputDPMS_bios(xf86OutputPtr output, int mode)
{
+#ifdef USE_INT10
ScrnInfoPtr pScrn = output->scrn;
SMIPtr pSmi = SMIPTR(pScrn);
@@ -147,7 +148,7 @@ SMILynx_OutputDPMS_bios(xf86OutputPtr ou
pSmi->pInt10->cx = 0x0000;
pSmi->pInt10->num = 0x10;
xf86ExecX86int10(pSmi->pInt10);
-
+#endif
LEAVE();
}