Mercurial > mplayer.hg
comparison drivers/mga_vid.c @ 77:9bbba5880f70
printk's updated
author | arpi_esp |
---|---|
date | Sun, 11 Mar 2001 00:13:43 +0000 |
parents | e1cd3bdbea86 |
children | b97d1e5fddea |
comparison
equal
deleted
inserted
replaced
76:d95acdc18f38 | 77:9bbba5880f70 |
---|---|
349 | 349 |
350 //update the registers somewhere between 1 and 2 frames from now. | 350 //update the registers somewhere between 1 and 2 frames from now. |
351 writel( regs.besglobctl + ((readl(mga_mmio_base + VCOUNT)+2)<<16), | 351 writel( regs.besglobctl + ((readl(mga_mmio_base + VCOUNT)+2)<<16), |
352 mga_mmio_base + BESGLOBCTL); | 352 mga_mmio_base + BESGLOBCTL); |
353 | 353 |
354 #if 0 | |
354 printk(KERN_DEBUG "mga_vid: wrote BES registers\n"); | 355 printk(KERN_DEBUG "mga_vid: wrote BES registers\n"); |
355 printk(KERN_DEBUG "mga_vid: BESCTL = 0x%08x\n", | 356 printk(KERN_DEBUG "mga_vid: BESCTL = 0x%08x\n", |
356 readl(mga_mmio_base + BESCTL)); | 357 readl(mga_mmio_base + BESCTL)); |
357 printk(KERN_DEBUG "mga_vid: BESGLOBCTL = 0x%08x\n", | 358 printk(KERN_DEBUG "mga_vid: BESGLOBCTL = 0x%08x\n", |
358 readl(mga_mmio_base + BESGLOBCTL)); | 359 readl(mga_mmio_base + BESGLOBCTL)); |
359 printk(KERN_DEBUG "mga_vid: BESSTATUS= 0x%08x\n", | 360 printk(KERN_DEBUG "mga_vid: BESSTATUS= 0x%08x\n", |
360 readl(mga_mmio_base + BESSTATUS)); | 361 readl(mga_mmio_base + BESSTATUS)); |
362 #endif | |
361 } | 363 } |
362 | 364 |
363 static int mga_vid_set_config(mga_vid_config_t *config) | 365 static int mga_vid_set_config(mga_vid_config_t *config) |
364 { | 366 { |
365 int x, y, sw, sh, dw, dh; | 367 int x, y, sw, sh, dw, dh; |
687 unsigned int card_option, temp; | 689 unsigned int card_option, temp; |
688 | 690 |
689 if((dev = pci_find_device(PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G400, NULL))) | 691 if((dev = pci_find_device(PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G400, NULL))) |
690 { | 692 { |
691 is_g400 = 1; | 693 is_g400 = 1; |
692 printk(KERN_INFO "mga_vid: Found MGA G400\n"); | 694 printk(KERN_INFO "mga_vid: Found MGA G400/G450\n"); |
693 } | 695 } |
694 else if((dev = pci_find_device(PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G200_AGP, NULL))) | 696 else if((dev = pci_find_device(PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_G200_AGP, NULL))) |
695 { | 697 { |
696 is_g400 = 0; | 698 is_g400 = 0; |
697 printk(KERN_INFO "mga_vid: Found MGA G200 AGP\n"); | 699 printk(KERN_INFO "mga_vid: Found MGA G200 AGP\n"); |
719 mga_mem_base = dev->base_address[0] & PCI_BASE_ADDRESS_MEM_MASK; | 721 mga_mem_base = dev->base_address[0] & PCI_BASE_ADDRESS_MEM_MASK; |
720 #endif | 722 #endif |
721 printk(KERN_INFO "mga_vid: MMIO at 0x%p IRQ: %d framebuffer: 0x%08lX\n", mga_mmio_base, mga_irq, mga_mem_base); | 723 printk(KERN_INFO "mga_vid: MMIO at 0x%p IRQ: %d framebuffer: 0x%08lX\n", mga_mmio_base, mga_irq, mga_mem_base); |
722 | 724 |
723 pci_read_config_dword(dev, 0x40, &card_option); | 725 pci_read_config_dword(dev, 0x40, &card_option); |
724 printk(KERN_DEBUG "OPTION word: 0x%08x\n", card_option); | 726 printk(KERN_INFO "mga_vid: OPTION word: 0x%08X mem: 0x%02X %s\n", card_option, |
725 printk(KERN_DEBUG " memory: %d %s\n", (card_option>>10)&7, ((card_option>>14)&1)?"SGRAM":"SDRAM"); | 727 (card_option>>10)&0x17, ((card_option>>14)&1)?"SGRAM":"SDRAM"); |
726 | 728 |
727 // temp = (card_option >> 10) & 0x17; | 729 // temp = (card_option >> 10) & 0x17; |
728 | 730 |
729 #ifdef MGA_MEMORY_SIZE | 731 #ifdef MGA_MEMORY_SIZE |
730 mga_ram_size = MGA_MEMORY_SIZE; | 732 mga_ram_size = MGA_MEMORY_SIZE; |
897 | 899 |
898 static int mga_vid_initialize(void) | 900 static int mga_vid_initialize(void) |
899 { | 901 { |
900 mga_vid_in_use = 0; | 902 mga_vid_in_use = 0; |
901 | 903 |
902 printk(KERN_INFO "Matrox MGA G200/G400 YUV Video interface v0.01 (c) Aaron Holtzman \n"); | 904 // printk(KERN_INFO "Matrox MGA G200/G400 YUV Video interface v0.01 (c) Aaron Holtzman \n"); |
905 printk(KERN_INFO "Matrox MGA G200/G400/G450 YUV Video interface v2.01 (c) Aaron Holtzman & A'rpi\n"); | |
903 if(register_chrdev(MGA_VID_MAJOR, "mga_vid", &mga_vid_fops)) | 906 if(register_chrdev(MGA_VID_MAJOR, "mga_vid", &mga_vid_fops)) |
904 { | 907 { |
905 printk(KERN_ERR "mga_vid: unable to get major: %d\n", MGA_VID_MAJOR); | 908 printk(KERN_ERR "mga_vid: unable to get major: %d\n", MGA_VID_MAJOR); |
906 return -EIO; | 909 return -EIO; |
907 } | 910 } |