Mercurial > mplayer.hg
comparison vidix/drivers/mach64_vid.c @ 16820:4d38f0b33f80
mach64_mmio size fix from vidix.sf.net, possible bugfix for #59
author | faust3 |
---|---|
date | Thu, 20 Oct 2005 18:03:43 +0000 |
parents | 9545bda5e951 |
children | f580a7755ac5 |
comparison
equal
deleted
inserted
replaced
16819:9545bda5e951 | 16820:4d38f0b33f80 |
---|---|
463 printf("[mach64] Driver was not probed but is being initializing\n"); | 463 printf("[mach64] Driver was not probed but is being initializing\n"); |
464 return EINTR; | 464 return EINTR; |
465 } | 465 } |
466 if(__verbose>0) printf("[mach64] version %s\n", VERSION); | 466 if(__verbose>0) printf("[mach64] version %s\n", VERSION); |
467 | 467 |
468 if((mach64_mmio_base = map_phys_mem(pci_info.base2,0x4000))==(void *)-1) return ENOMEM; | 468 if((mach64_mmio_base = map_phys_mem(pci_info.base2,0x1000))==(void *)-1) return ENOMEM; |
469 mach64_wait_for_idle(); | 469 mach64_wait_for_idle(); |
470 mach64_ram_size = INREG(MEM_CNTL) & CTL_MEM_SIZEB; | 470 mach64_ram_size = INREG(MEM_CNTL) & CTL_MEM_SIZEB; |
471 if (mach64_ram_size < 8) mach64_ram_size = (mach64_ram_size + 1) * 512; | 471 if (mach64_ram_size < 8) mach64_ram_size = (mach64_ram_size + 1) * 512; |
472 else if (mach64_ram_size < 12) mach64_ram_size = (mach64_ram_size - 3) * 1024; | 472 else if (mach64_ram_size < 12) mach64_ram_size = (mach64_ram_size - 3) * 1024; |
473 else mach64_ram_size = (mach64_ram_size - 7) * 2048; | 473 else mach64_ram_size = (mach64_ram_size - 7) * 2048; |
520 /*restore this*/ | 520 /*restore this*/ |
521 mach64_wait_for_idle(); | 521 mach64_wait_for_idle(); |
522 OUTREG(OVERLAY_GRAPHICS_KEY_CLR,SAVED_OVERLAY_GRAPHICS_KEY_CLR); | 522 OUTREG(OVERLAY_GRAPHICS_KEY_CLR,SAVED_OVERLAY_GRAPHICS_KEY_CLR); |
523 | 523 |
524 unmap_phys_mem(mach64_mem_base,mach64_ram_size); | 524 unmap_phys_mem(mach64_mem_base,mach64_ram_size); |
525 unmap_phys_mem(mach64_mmio_base,0x4000); | 525 unmap_phys_mem(mach64_mmio_base,0x1000); |
526 } | 526 } |
527 | 527 |
528 int vixGetCapability(vidix_capability_t *to) | 528 int vixGetCapability(vidix_capability_t *to) |
529 { | 529 { |
530 memcpy(to, &mach64_cap, sizeof(vidix_capability_t)); | 530 memcpy(to, &mach64_cap, sizeof(vidix_capability_t)); |