[MPlayer-cvslog] r23278 - trunk/vidix/sis_vid.c
ben
subversion at mplayerhq.hu
Wed May 9 19:16:59 CEST 2007
Author: ben
Date: Wed May 9 19:16:59 2007
New Revision: 23278
Log:
allow sis vidix driver to access registers and avoid segfaulting (patch by Andrew Calkin)
Modified:
trunk/vidix/sis_vid.c
Modified: trunk/vidix/sis_vid.c
==============================================================================
--- trunk/vidix/sis_vid.c (original)
+++ trunk/vidix/sis_vid.c Wed May 9 19:16:59 2007
@@ -291,6 +291,7 @@ static int sis_probe(int verbose, int fo
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;
@@ -315,6 +316,7 @@ static int sis_probe(int verbose, int fo
printf
("[SiS] detected M650/651 with 2 overlays\n");
}
+ disable_app_io();
}
sis_vga_engine = SIS_315_VGA;
break;
@@ -345,6 +347,12 @@ static int sis_init(void)
return (EINTR);
}
+ if (enable_app_io() != 0)
+ {
+ printf("[SiS] can't enable register I/O\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);
@@ -395,6 +403,7 @@ static void sis_destroy(void)
/* unmap_phys_mem(sis_reg_base, 0x20000); */
/* JCP: see above, hence also a hack. */
unmap_phys_mem(sis_mem_base, 0x1000000);
+ disable_app_io();
}
static int sis_get_caps(vidix_capability_t * to)
More information about the MPlayer-cvslog
mailing list