]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
drm: merge in Linus mainline
authorDave Airlie <airlied@starflyer.(none)>
Tue, 3 Jan 2006 07:18:01 +0000 (18:18 +1100)
committerDave Airlie <airlied@linux.ie>
Tue, 3 Jan 2006 07:18:01 +0000 (18:18 +1100)
1  2 
drivers/char/drm/drm_lock.c
drivers/char/drm/drm_memory.c
drivers/char/drm/drm_memory_debug.h
drivers/char/drm/mga_drv.c
drivers/char/drm/radeon_drv.h

index f970dc36c18f84011dfe97fba6dfadb71448e713,b48a595d54eca0e9c13b0cb269b88fba6dc49f56..f9e45303498dd66164106d7af210200b7b6c86ba
@@@ -126,6 -127,10 +127,9 @@@ int drm_lock(struct inode *inode, struc
                }
        }
  
 -
+       /* dev->driver->kernel_context_switch isn't used by any of the x86
+        *  drivers but is used by the Sparc driver.
+        */
        if (dev->driver->kernel_context_switch &&
            dev->last_context != lock.context) {
                dev->driver->kernel_context_switch(dev, dev->last_context,
Simple merge
index 706b75251ea102dc8d1e8cf5c1e87a3d1b7dd6d0,b370aca718d278602217bbbcb58fb5812218c96d..e84605fc54af09e8073cd3a99c399fc658b1cfd4
@@@ -212,26 -213,26 +212,26 @@@ unsigned long drm_alloc_pages (int orde
        unsigned long addr;
        unsigned int sz;
  
 -      spin_lock(&DRM(mem_lock));
 -      if ((DRM(ram_used) >> PAGE_SHIFT)
 -          > (DRM_RAM_PERCENT * DRM(ram_available)) / 100) {
 -              spin_unlock(&DRM(mem_lock));
 +      spin_lock(&drm_mem_lock);
 +      if ((drm_ram_used >> PAGE_SHIFT)
 +          > (DRM_RAM_PERCENT * drm_ram_available) / 100) {
 +              spin_unlock(&drm_mem_lock);
                return 0;
        }
 -      spin_unlock(&DRM(mem_lock));
 +      spin_unlock(&drm_mem_lock);
  
-       address = __get_free_pages(GFP_KERNEL, order);
+       address = __get_free_pages(GFP_KERNEL|__GFP_COMP, order);
        if (!address) {
 -              spin_lock(&DRM(mem_lock));
 -              ++DRM(mem_stats)[area].fail_count;
 -              spin_unlock(&DRM(mem_lock));
 +              spin_lock(&drm_mem_lock);
 +              ++drm_mem_stats[area].fail_count;
 +              spin_unlock(&drm_mem_lock);
                return 0;
        }
 -      spin_lock(&DRM(mem_lock));
 -      ++DRM(mem_stats)[area].succeed_count;
 -      DRM(mem_stats)[area].bytes_allocated += bytes;
 -      DRM(ram_used) += bytes;
 -      spin_unlock(&DRM(mem_lock));
 +      spin_lock(&drm_mem_lock);
 +      ++drm_mem_stats[area].succeed_count;
 +      drm_mem_stats[area].bytes_allocated += bytes;
 +      drm_ram_used += bytes;
 +      spin_unlock(&drm_mem_lock);
  
        /* Zero outside the lock */
        memset((void *)address, 0, bytes);
Simple merge
Simple merge