diff options
author | 2002-10-22 13:20:53 +0000 | |
---|---|---|
committer | 2002-10-22 13:20:53 +0000 | |
commit | 6a7eedaccc1c27abb840c31f67c8a855e297bbe5 (patch) | |
tree | c44b96f2043d5f38f3d26e04a31fd8c28ae0411f | |
parent | 6c8416503d036be2d5eae08c50cd1a9ab7fd0a18 (diff) |
save colorkey stuff patch by (Colin Leroy <colin at colino dot net>)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7839 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | vidix/drivers/mach64_vid.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vidix/drivers/mach64_vid.c b/vidix/drivers/mach64_vid.c index 22c7988068..cd4e3c8f09 100644 --- a/vidix/drivers/mach64_vid.c +++ b/vidix/drivers/mach64_vid.c @@ -119,6 +119,9 @@ static video_registers_t vregs[] = DECLARE_VREG(VIDEO_SYNC_TEST_B) }; +/* have to restore it on exit */ +static uint32_t SAVED_OVERLAY_GRAPHICS_KEY_CLR; + /* VIDIX exports */ /* MMIO space*/ @@ -465,6 +468,10 @@ int vixInit(void) printf("[mach64] Video memory = %uMb\n",mach64_ram_size/0x100000); err = mtrr_set_type(pci_info.base0,mach64_ram_size,MTRR_TYPE_WRCOMB); if(!err) printf("[mach64] Set write-combining type of video memory\n"); + + /* save this */ + mach64_wait_for_idle(); + SAVED_OVERLAY_GRAPHICS_KEY_CLR = INREG(OVERLAY_GRAPHICS_KEY_CLR); /* check if planar formats are supported */ supports_planar=0; @@ -501,6 +508,10 @@ int vixInit(void) void vixDestroy(void) { + /*restore this*/ + mach64_wait_for_idle(); + OUTREG(OVERLAY_GRAPHICS_KEY_CLR,SAVED_OVERLAY_GRAPHICS_KEY_CLR); + unmap_phys_mem(mach64_mem_base,mach64_ram_size); unmap_phys_mem(mach64_mmio_base,0x4000); } |