[MPlayer-dev-eng] [SiS vidix support]

Jake Page jake at CS.Stanford.EDU
Fri Oct 10 02:51:52 CEST 2003


On Thu, 9 Oct 2003, Alex Beregszaszi wrote:

> Could you test the sis_vid version I committed into the CVS as I've made
> several changes to it, to integrate better into the mplayer
> architecture.

Right now it works if the iopl() calls are added back in - without that it 
segfaults when writing to registers. 

I added the included libdha-portable patch - using enable_app_io() instead 
of iopl() - to get it to work...

-Jake
-------------- next part --------------
Index: sis_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/sis_vid.c,v
retrieving revision 1.2
diff -u -r1.2 sis_vid.c
--- sis_vid.c	9 Oct 2003 22:20:31 -0000	1.2
+++ sis_vid.c	10 Oct 2003 00:49:07 -0000
@@ -299,7 +299,7 @@
 		case DEVICE_SIS_650_VGA:
 		    /* M650 & 651 have 2 overlays */
 		    /* JCP: I think this works, but not really tested yet */
-		    {
+		    if (enable_app_io() == 0) {
 			unsigned char CR5F;
 			unsigned char tempreg1, tempreg2;
 
@@ -353,6 +353,11 @@
 	return (EINTR);
     }
 
+    if (enable_app_io() != 0) {
+	printf("[SiS] can't enable register IO\n");
+        return(EINTR);
+    }
+
     /* JCP: this is WRONG.  Need to coordinate w/ sisfb to use correct mem */
     /* map 16MB scary hack for now. */
     sis_mem_base = map_phys_mem(pci_info.base0, 0x1000000);
@@ -411,6 +416,7 @@
     /* unmap_phys_mem(sis_reg_base, 0x20000); */
     /* JCP: see above, hence also a hack. */
     unmap_phys_mem(sis_mem_base, 0x1000000);
+    disable_app_io();
 }
 
 int vixGetCapability(vidix_capability_t * to)


More information about the MPlayer-dev-eng mailing list