View Single Post
Old 10-29-10, 09:19 AM   #9
petrovlucca
nVidia Driver
 
Join Date: Oct 2010
Location: USA
Posts: 4
Default Re: Fedora 12 + multiple video cards + Xinerama + vga_arbitor is unusable

Quote:
Originally Posted by underling View Post
Here is a new patch with appropriate macro shielding to only interact with the new vgaarb API when it's present:

Code:
*** usr/src/nv/nv-linux.h.orig	2009-11-22 19:27:38.000000000 -0800
--- usr/src/nv/nv-linux.h	2009-12-16 11:02:22.000000000 -0800
***************
*** 83,102 ****
--- 83,105 ----
  
  #if !defined(KERNEL_2_4)
  #include <linux/sched.h>            /* suser(), capable() replacement   */
  #include <linux/moduleparam.h>      /* module_param()                   */
  #include <linux/smp_lock.h>         /* kernel_locked                    */
  #include <asm/tlbflush.h>           /* flush_tlb(), flush_tlb_all()     */
  #include <asm/kmap_types.h>         /* page table entry lookup          */
  #endif
  
  #include <linux/pci.h>              /* pci_find_class, etc              */
+ #if defined(CONFIG_VGA_ARB)
+ #include <linux/vgaarb.h>           /* vga_set_legacy_decoding          */
+ #endif
  #include <linux/interrupt.h>        /* tasklets, interrupt helpers      */
  #include <linux/timer.h>
  
  #include <asm/div64.h>              /* do_div()                         */
  #include <asm/system.h>             /* cli, sli, save_flags             */
  #include <asm/io.h>                 /* ioremap, virt_to_phys            */
  #include <asm/uaccess.h>            /* access_ok                        */
  #include <asm/page.h>               /* PAGE_OFFSET                      */
  #include <asm/pgtable.h>            /* pte bit definitions              */
  
*** usr/src/nv/nv.c.orig	2009-11-22 19:27:36.000000000 -0800
--- usr/src/nv/nv.c	2009-12-16 11:02:54.000000000 -0800
***************
*** 724,743 ****
--- 724,747 ----
                  goto failed;
              }
  
              entry->data = nv;
              entry->read_proc = nv_kern_read_agpinfo;
  #if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
              entry->owner = THIS_MODULE;
  #endif
          }
  
+ #if defined(CONFIG_VGA_ARB)
+         vga_set_legacy_decoding(dev, VGA_RSRC_NONE);
+ #endif
+ 
          NV_PCI_DEV_PUT(dev);
      }
  
      entry = create_proc_entry("version", flags, proc_nvidia);
      if (!entry)
          goto failed;
  
      entry->read_proc = nv_kern_read_version;
  #if defined(NV_PROC_DIR_ENTRY_HAS_OWNER)
      entry->owner = THIS_MODULE;
Thanks for the patch. It solve my problems. Everything is going nicely now.
petrovlucca is offline   Reply With Quote