lkml.org 
[lkml]   [2004]   [Apr]   [27]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
From"Hemmann, Volker Armin" <>
SubjectRe: [PATCH] SIS AGP vs 2.6.6-rc2
DateTue, 27 Apr 2004 19:29:16 +0200
Hi,
I tried your patch and is has rejects again:
energy linux # patch -p1 < sis.agp.patch
patching file drivers/char/agp/sis-agp.c
Hunk #1 succeeded at 13 with fuzz 2.
Hunk #2 succeeded at 69 with fuzz 2.
Hunk #3 FAILED at 96.
Hunk #4 FAILED at 224.
2 out of 5 hunks FAILED -- saving rejects to file 
drivers/char/agp/sis-agp.c.rej

Attached is the .rej file. 

Glück Auf
Volker

-- 
Conclusions
 In a straight-up fight, the Empire squashes the Federation like a bug. Even 
with its numerical advantage removed, the Empire would still squash the 
Federation like a bug. Accept it. -Michael Wong
***************
*** 94,106 ****
                 pci_write_config_dword(device, agp + PCI_AGP_COMMAND, command);
                 /*
-                 * Weird: on 648(fx) and 746(fx) chipsets any rate change in the target
                  * command register triggers a 5ms screwup during which the master
                  * cannot be configured          
                  */
-                if (device->device == PCI_DEVICE_ID_SI_648 ||
-                    device->device == PCI_DEVICE_ID_SI_746) {
-                        printk(KERN_INFO PFX "SiS chipset with AGP problems detected. Giving bridge time to recover.\n");
                         set_current_state(TASK_UNINTERRUPTIBLE);
                         schedule_timeout (1+(HZ*10)/1000);
                 }
--- 96,107 ----
                 pci_write_config_dword(device, agp + PCI_AGP_COMMAND, command);
                 /*
+                 * Weird: on some sis chipsets any rate change in the target
                  * command register triggers a 5ms screwup during which the master
                  * cannot be configured          
                  */
+                if (device->device == agp_bridge->dev->device) {
+                        printk(KERN_INFO PFX "SiS delay workaround: giving bridge time to recover.\n");
                         set_current_state(TASK_UNINTERRUPTIBLE);
                         schedule_timeout (1+(HZ*10)/1000);
                 }
***************
*** 223,250 ****
  };

  static void __devinit sis_get_driver(struct agp_bridge_data *bridge)
  {
-        if (bridge->dev->device == PCI_DEVICE_ID_SI_648) { 
-                sis_driver.agp_enable=sis_648_enable;
-                if (agp_bridge->major_version == 3) {
-                        sis_driver.aperture_sizes = agp3_generic_sizes;
-                        sis_driver.size_type = U16_APER_SIZE;
-                        sis_driver.num_aperture_sizes = AGP_GENERIC_SIZES_ENTRIES;
-                        sis_driver.configure = agp3_generic_configure;
-                        sis_driver.fetch_size = agp3_generic_fetch_size;
-                        sis_driver.cleanup = agp3_generic_cleanup;
-                        sis_driver.tlb_flush = agp3_generic_tlbflush;
-                }
-        }
-        if (bridge->dev->device == PCI_DEVICE_ID_SI_746) {
-                /*
-                 * We don't know enough about the 746 to enable it properly.
-                 * Though we do know that it needs the 'delay' hack to settle
-                 * after changing modes.
-                 */
-                sis_driver.agp_enable=sis_648_enable;
         }
  }
--- 224,258 ----
  };

+ // chipsets that require the 'delay hack'
+ static int sis_broken_chipsets[] __devinitdata = {
+        PCI_DEVICE_ID_SI_648,
+        PCI_DEVICE_ID_SI_746,
+        0 // terminator
+ };
+ 
  static void __devinit sis_get_driver(struct agp_bridge_data *bridge)
  {
+        int i;
+        for(i=0; sis_broken_chipsets[i]!=0; ++i)
+                if(bridge->dev->device==sis_broken_chipsets[i])
+                        break;
+        
+        if(sis_broken_chipsets[i] || agp_sis_force_delay)
+                sis_driver.agp_enable=sis_delayed_enable;
+ 
+        // sis chipsets that indicate less than agp3.5
+        // are not actually fully agp3 compliant
+        if ((agp_bridge->major_version == 3 && agp_bridge->minor_version >= 5
+             && agp_sis_agp_spec!=0) || agp_sis_agp_spec==1) {
+                sis_driver.aperture_sizes = agp3_generic_sizes;
+                sis_driver.size_type = U16_APER_SIZE;
+                sis_driver.num_aperture_sizes = AGP_GENERIC_SIZES_ENTRIES;
+                sis_driver.configure = agp3_generic_configure;
+                sis_driver.fetch_size = agp3_generic_fetch_size;
+                sis_driver.cleanup = agp3_generic_cleanup;
+                sis_driver.tlb_flush = agp3_generic_tlbflush;
         }
  }
\
 
 \ /
  Last update: 2005-03-22 13:02    [from the cache]
©2003-2008