changeset 20500:9fa6073f0bde

Add VIDEOMEMORY_SIZE define to allow to easily change it. Needed for xvidix sine X seems to ignore VideoRAM settings < 8MB, causing a mess when MPlayer and X use the same memory.
author reimar
date Sun, 29 Oct 2006 14:45:44 +0000
parents 2d274de63b54
children 30df9a64618a
files vidix/drivers/unichrome_vid.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/vidix/drivers/unichrome_vid.c	Sun Oct 29 14:26:23 2006 +0000
+++ b/vidix/drivers/unichrome_vid.c	Sun Oct 29 14:45:44 2006 +0000
@@ -78,8 +78,9 @@
 #define UC_MAP_V1_FIFO_CONTROL(depth, pre_thr, thr) \
     (((depth)-1) | ((thr) << 8) | ((pre_thr) << 24))
 
-#define FRAMEBUFFER_START	0x600000
+#define VIDEOMEMORY_SIZE	(8 * 1024 * 1024)
 #define FRAMEBUFFER_SIZE	0x200000
+#define FRAMEBUFFER_START	(VIDEOMEMORY_SIZE - FRAMEBUFFER_SIZE)
 
 #ifdef DEBUG_LOGFILE
 FILE *logfile = 0;
@@ -529,7 +530,7 @@
 vixInit (void)
 {
   long tmp;
-  uc_mem = map_phys_mem (pci_info.base0, 0x800000);
+  uc_mem = map_phys_mem (pci_info.base0, VIDEOMEMORY_SIZE);
   enable_app_io ();
 
   outb (0x2f, 0x3c4);
@@ -590,7 +591,7 @@
   outb (mclk_save[2], 0x3c5);
 
   disable_app_io ();
-  unmap_phys_mem (uc_mem, 0x800000);
+  unmap_phys_mem (uc_mem, VIDEOMEMORY_SIZE);
   unmap_phys_mem (vio, 0x1000);
 }