Merge branch 'master' of ../../drm into modesetting-101
authorDave Airlie <airlied@redhat.com>
Fri, 7 Mar 2008 00:59:21 +0000 (11:59 +1100)
committerDave Airlie <airlied@redhat.com>
Fri, 7 Mar 2008 00:59:21 +0000 (11:59 +1100)
1  2 
linux-core/drm_bo.c
linux-core/drm_compat.h

diff --combined linux-core/drm_bo.c
@@@ -574,6 -574,7 +574,6 @@@ void drm_putback_buffer_objects(struct 
  }
  EXPORT_SYMBOL(drm_putback_buffer_objects);
  
 -
  /*
   * Note. The caller has to register (if applicable)
   * and deregister fence object usage.
@@@ -969,7 -970,7 +969,7 @@@ static int drm_bo_modify_proposed_flag
                return -EINVAL;
        }
  
-       if ((new_mask & DRM_BO_FLAG_NO_EVICT) && !DRM_SUSER(DRM_CURPROC)) {
+       if (bo->type != drm_bo_type_kernel && (new_mask & DRM_BO_FLAG_NO_EVICT) && !DRM_SUSER(DRM_CURPROC)) {
                DRM_ERROR("DRM_BO_FLAG_NO_EVICT is only available to priviliged processes.\n");
                return -EPERM;
        }
@@@ -1757,7 -1758,7 +1757,7 @@@ int drm_buffer_object_create(struct drm
        size += buffer_start & ~PAGE_MASK;
        num_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
        if (num_pages == 0) {
 -              DRM_ERROR("Illegal buffer object size.\n");
 +              DRM_ERROR("Illegal buffer object size %ld.\n", size);
                return -EINVAL;
        }
  
@@@ -2359,7 -2360,6 +2359,7 @@@ out
        mutex_unlock(&dev->struct_mutex);
        return ret;
  }
 +EXPORT_SYMBOL(drm_bo_driver_finish);
  
  /*
   * This function is intended to be called on drm driver load.
diff --combined linux-core/drm_compat.h
  #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
  #undef DRM_IRQ_ARGS
  #define DRM_IRQ_ARGS          int irq, void *arg, struct pt_regs *regs
 +
 +typedef _Bool bool;
 +enum {
 +        false   = 0,
 +        true    = 1
 +};
 +
  #endif
  
  #ifndef list_for_each_safe
@@@ -159,7 -152,7 +159,7 @@@ static __inline__ void *kcalloc(size_t 
  
  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
  #define vmalloc_user(_size) ({void * tmp = vmalloc(_size);   \
 -      if (tmp) memset(tmp, 0, size);                       \
 +      if (tmp) memset(tmp, 0, _size);                      \
        (tmp);})
  #endif
  
@@@ -332,15 -325,7 +332,15 @@@ void *idr_replace(struct idr *idp, voi
  #endif
  
  #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
 -typedef _Bool                   bool;
 +extern unsigned long round_jiffies_relative(unsigned long j);
 +#endif
 +
 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
 +extern struct pci_dev * pci_get_bus_and_slot(unsigned int bus, unsigned int devfn);
 +#endif
 +
 +#ifndef PM_EVENT_PRETHAW 
 +#define PM_EVENT_PRETHAW 3
  #endif
  
  #if (defined(CONFIG_X86) && defined(CONFIG_X86_32) && defined(CONFIG_HIMEM))
  extern void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type,
                                  pgprot_t protection);
  #endif
+ #if !defined(flush_agp_mappings)
+ #define flush_agp_mappings() do {} while(0)
+ #endif
  #endif