mirror of https://github.com/mpv-player/mpv
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
This commit is contained in:
parent
0838029db9
commit
22546a0351
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue