Merge commit 'origin/master' into drm-gem
authorEric Anholt <eric@anholt.net>
Fri, 30 May 2008 21:42:08 +0000 (14:42 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 30 May 2008 21:42:08 +0000 (14:42 -0700)
Conflicts:

linux-core/Makefile.kernel
shared-core/i915_drv.h
shared-core/nouveau_state.c

1  2 
linux-core/Makefile.kernel
linux-core/drm_fops.c
linux-core/drm_lock.c
linux-core/i915_drv.c
shared-core/drm.h
shared-core/i915_dma.c
shared-core/i915_drm.h
shared-core/i915_drv.h
shared-core/i915_irq.c

@@@ -12,9 -12,9 +12,9 @@@ drm-objs    := drm_auth.o drm_bufs.o dr
                drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
                drm_sysfs.o drm_pci.o drm_agpsupport.o drm_scatter.o \
                drm_memory_debug.o ati_pcigart.o drm_sman.o \
 -              drm_hashtab.o drm_mm.o drm_object.o drm_compat.o \
 +              drm_hashtab.o drm_memrange.o drm_object.o drm_compat.o \
                drm_fence.o drm_ttm.o drm_bo.o drm_bo_move.o drm_bo_lock.o \
-               drm_regman.o drm_gem.o
 -              drm_regman.o drm_vm_nopage_compat.o
++              drm_regman.o drm_vm_nopage_compat.o drm_gem.o
  tdfx-objs   := tdfx_drv.o
  r128-objs   := r128_drv.o r128_cce.o r128_state.o r128_irq.o
  mga-objs    := mga_drv.o mga_dma.o mga_state.o mga_warp.o mga_irq.o
Simple merge
@@@ -213,18 -211,24 +211,18 @@@ int drm_lock_take(struct drm_lock_data 
                }
                prev = cmpxchg(lock, old, new);
        } while (prev != old);
-       spin_unlock_irqrestore(&lock_data->spinlock, irqflags);
+       spin_unlock_bh(&lock_data->spinlock);
  
 -      if (_DRM_LOCKING_CONTEXT(old) == context) {
 -              if (old & _DRM_LOCK_HELD) {
 -                      if (context != DRM_KERNEL_CONTEXT) {
 -                              DRM_ERROR("%d holds heavyweight lock\n",
 -                                        context);
 -                      }
 -                      return 0;
 +      /* Warn on recursive locking of user contexts. */
 +      if (_DRM_LOCKING_CONTEXT(old) == context && _DRM_LOCK_IS_HELD(old)) {
 +              if (context != DRM_KERNEL_CONTEXT) {
 +                      DRM_ERROR("%d holds heavyweight lock\n",
 +                                context);
                }
 +              return 0;
        }
  
 -      if ((_DRM_LOCKING_CONTEXT(new)) == context && (new & _DRM_LOCK_HELD)) {
 -              /* Have lock */
 -
 -              return 1;
 -      }
 -      return 0;
 +      return !_DRM_LOCK_IS_HELD(old);
  }
  
  /**
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -239,51 -237,10 +239,51 @@@ typedef struct drm_i915_private 
        u8 saveSR[8];
        u8 saveGR[25];
        u8 saveAR_INDEX;
-       u8 saveAR[20];
+       u8 saveAR[21];
        u8 saveDACMASK;
        u8 saveDACDATA[256*3]; /* 256 3-byte colors */
-       u8 saveCR[36];
+       u8 saveCR[37];
 +
 +      struct {
 +              struct drm_memrange gtt_space;
 +
 +              /**
 +               * List of objects currently involved in rendering from the
 +               * ringbuffer.
 +               *
 +               * A reference is held on the buffer while on this list.
 +               */
 +              struct list_head active_list;
 +
 +              /**
 +               * List of objects which are not in the ringbuffer but which
 +               * still have a write_domain which needs to be flushed before
 +               * unbinding.
 +               *
 +               * A reference is held on the buffer while on this list.
 +               */
 +              struct list_head flushing_list;
 +
 +              /**
 +               * LRU list of objects which are not in the ringbuffer and
 +               * are ready to unbind, but are still in the GTT.
 +               *
 +               * A reference is not held on the buffer while on this list,
 +               * as merely being GTT-bound shouldn't prevent its being
 +               * freed, and we'll pull it off the list in the free path.
 +               */
 +              struct list_head inactive_list;
 +
 +              /**
 +               * List of breadcrumbs associated with GPU requests currently
 +               * outstanding.
 +               */
 +              struct list_head request_list;
 +
 +              uint32_t next_gem_seqno;
 +      } mm;
 +
 +      struct work_struct user_interrupt_task;
  } drm_i915_private_t;
  
  enum intel_chip_family {
Simple merge