summaryrefslogtreecommitdiffstats
path: root/vidix
diff options
context:
space:
mode:
authorben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-09 17:16:59 +0000
committerben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-09 17:16:59 +0000
commit22546a03512f37fe7f9fecc8628dc9a05d520e0d (patch)
treef130a9fa17d55943bcd513a26f0f74597b322514 /vidix
parent0838029db97280bc07bd449b46878537bd27e91b (diff)
downloadmpv-22546a03512f37fe7f9fecc8628dc9a05d520e0d.tar.bz2
mpv-22546a03512f37fe7f9fecc8628dc9a05d520e0d.tar.xz
allow sis vidix driver to access registers and avoid segfaulting (patch by Andrew Calkin)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23278 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'vidix')
-rw-r--r--vidix/sis_vid.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/vidix/sis_vid.c b/vidix/sis_vid.c
index e8b8e0d4fa..37a6e9e081 100644
--- a/vidix/sis_vid.c
+++ b/vidix/sis_vid.c
@@ -291,6 +291,7 @@ static int sis_probe(int verbose, int force)
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 force)
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)