From: Dave Airlie Date: Tue, 3 Jan 2006 07:18:01 +0000 (+1100) Subject: drm: merge in Linus mainline X-Git-Tag: v2.6.16-rc1~178^2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97f2aab6698f3ab2552c41c1024a65ffd0763a6d;p=linux-2.6 drm: merge in Linus mainline --- 97f2aab6698f3ab2552c41c1024a65ffd0763a6d diff --cc drivers/char/drm/drm_lock.c index f970dc36c1,b48a595d54..f9e4530349 --- a/drivers/char/drm/drm_lock.c +++ b/drivers/char/drm/drm_lock.c @@@ -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, diff --cc drivers/char/drm/drm_memory_debug.h index 706b75251e,b370aca718..e84605fc54 --- a/drivers/char/drm/drm_memory_debug.h +++ b/drivers/char/drm/drm_memory_debug.h @@@ -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);