comparison vidix/drivers/mach64_vid.c @ 5641:85df37cde3d3

print version number, so we know if the user forgot to copy/install the driver
author michael
date Mon, 15 Apr 2002 20:54:28 +0000
parents 8f2b7e0a8b1f
children 56983ecb89aa
comparison
equal deleted inserted replaced
5640:a0cee3bb7f78 5641:85df37cde3d3
18 #include "../../libdha/libdha.h" 18 #include "../../libdha/libdha.h"
19 #include "../../libdha/pci_ids.h" 19 #include "../../libdha/pci_ids.h"
20 #include "../../libdha/pci_names.h" 20 #include "../../libdha/pci_names.h"
21 21
22 #include "mach64.h" 22 #include "mach64.h"
23 #include "../../version.h"
23 24
24 #define UNUSED(x) ((void)(x)) /**< Removes warning about unused arguments */ 25 #define UNUSED(x) ((void)(x)) /**< Removes warning about unused arguments */
25 26
26 static void *mach64_mmio_base = 0; 27 static void *mach64_mmio_base = 0;
27 static void *mach64_mem_base = 0; 28 static void *mach64_mem_base = 0;
260 int vert_stretching; 261 int vert_stretching;
261 int ext_vert_stretch; 262 int ext_vert_stretch;
262 int ret; 263 int ret;
263 int yres= mach64_get_yres(); 264 int yres= mach64_get_yres();
264 265
265 if(!supports_lcd_v_stretch) return 1<<16; 266 if(!supports_lcd_v_stretch){
267 if(__verbose>0) printf("[mach64] vertical stretching not supported\n");
268 return 1<<16;
269 }
266 270
267 lcd_index= INREG(LCD_INDEX); 271 lcd_index= INREG(LCD_INDEX);
268 272
269 vert_stretching= ATIGetMach64LCDReg(LCD_VERT_STRETCHING); 273 vert_stretching= ATIGetMach64LCDReg(LCD_VERT_STRETCHING);
270 if(!(vert_stretching&VERT_STRETCH_EN)) ret= 1<<16; 274 if(!(vert_stretching&VERT_STRETCH_EN)) ret= 1<<16;
440 if(!probed) 444 if(!probed)
441 { 445 {
442 printf("[mach64] Driver was not probed but is being initializing\n"); 446 printf("[mach64] Driver was not probed but is being initializing\n");
443 return EINTR; 447 return EINTR;
444 } 448 }
449 if(__verbose>0) printf("[mach64] version %s\n", VERSION);
450
445 if((mach64_mmio_base = map_phys_mem(pci_info.base2,0x4000))==(void *)-1) return ENOMEM; 451 if((mach64_mmio_base = map_phys_mem(pci_info.base2,0x4000))==(void *)-1) return ENOMEM;
446 mach64_wait_for_idle(); 452 mach64_wait_for_idle();
447 mach64_ram_size = INREG(MEM_CNTL) & CTL_MEM_SIZEB; 453 mach64_ram_size = INREG(MEM_CNTL) & CTL_MEM_SIZEB;
448 if (mach64_ram_size < 8) mach64_ram_size = (mach64_ram_size + 1) * 512; 454 if (mach64_ram_size < 8) mach64_ram_size = (mach64_ram_size + 1) * 512;
449 else if (mach64_ram_size < 12) mach64_ram_size = (mach64_ram_size - 3) * 1024; 455 else if (mach64_ram_size < 12) mach64_ram_size = (mach64_ram_size - 3) * 1024;