Merge branch 'drm-fixes' of /home/airlied/kernel/linux-2.6 into drm-core-next
authorDave Airlie <airlied@redhat.com>
Mon, 18 Oct 2010 23:48:34 +0000 (09:48 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 18 Oct 2010 23:48:34 +0000 (09:48 +1000)
Conflicts:
drivers/gpu/drm/i915/intel_fb.c
drivers/gpu/drm/radeon/r600_blit_kms.c
drivers/gpu/drm/ttm/ttm_bo.c

19 files changed:
1  2 
MAINTAINERS
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/intel_fb.c
drivers/gpu/drm/nouveau/nouveau_fbcon.c
drivers/gpu/drm/nouveau/nouveau_notifier.c
drivers/gpu/drm/radeon/evergreen.c
drivers/gpu/drm/radeon/r100.c
drivers/gpu/drm/radeon/r600.c
drivers/gpu/drm/radeon/r600_blit_kms.c
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_atombios.c
drivers/gpu/drm/radeon/radeon_cursor.c
drivers/gpu/drm/radeon/radeon_fb.c
drivers/gpu/drm/radeon/radeon_object.c
drivers/gpu/drm/radeon/rs600.c
drivers/gpu/drm/radeon/rs690.c
drivers/gpu/drm/radeon/rv770.c
drivers/gpu/drm/ttm/ttm_bo.c
include/drm/ttm/ttm_bo_api.h

diff --cc MAINTAINERS
Simple merge
Simple merge
index b937ccfa7bec9a037ae7b6fddf6d635552a4aba1,b61966c126d3e3839d33be6c8df2c0170c5d1376..521622b9be7a7fa9ddebdd79813c5530c1d06425
@@@ -225,9 -238,11 +225,9 @@@ static void intel_fbdev_destroy(struct 
  
        drm_framebuffer_cleanup(&ifb->base);
        if (ifb->obj) {
-               drm_gem_object_handle_unreference_unlocked(ifb->obj);
-               drm_gem_object_unreference_unlocked(ifb->obj);
+               drm_gem_object_unreference(ifb->obj);
+               ifb->obj = NULL;
        }
 -
 -      return 0;
  }
  
  int intel_fbdev_init(struct drm_device *dev)
Simple merge
Simple merge
index 7c5f855a43e64e0cd504ca593923ff8c7d3f9080,7b65e4efe8af61e2df5404ea52c468fe8ee564db..83ba9644dcb923aaff725dc316a460e644a79613
@@@ -1917,8 -1918,8 +1918,9 @@@ void r600_pciep_wreg(struct radeon_devi
   */
  void r600_cp_stop(struct radeon_device *rdev)
  {
+       rdev->mc.active_vram_size = rdev->mc.visible_vram_size;
        WREG32(R_0086D8_CP_ME_CNTL, S_0086D8_CP_ME_HALT(1));
 +      WREG32(SCRATCH_UMSK, 0);
  }
  
  int r600_init_microcode(struct radeon_device *rdev)
index 39d566dbabfa37a07d9e96d27a2756fad37e8a2a,3473c00781ffaaac06cab0c520231a5a66a21111..8362974ef41ac9eac713f1e66377661aa7106c0b
@@@ -533,18 -532,7 +533,19 @@@ int r600_blit_init(struct radeon_devic
        memcpy(ptr + rdev->r600_blit.ps_offset, r6xx_ps, r6xx_ps_size * 4);
        radeon_bo_kunmap(rdev->r600_blit.shader_obj);
        radeon_bo_unreserve(rdev->r600_blit.shader_obj);
 +
 +done:
 +      r = radeon_bo_reserve(rdev->r600_blit.shader_obj, false);
 +      if (unlikely(r != 0))
 +              return r;
 +      r = radeon_bo_pin(rdev->r600_blit.shader_obj, RADEON_GEM_DOMAIN_VRAM,
 +                        &rdev->r600_blit.shader_gpu_addr);
 +      radeon_bo_unreserve(rdev->r600_blit.shader_obj);
 +      if (r) {
 +              dev_err(rdev->dev, "(%d) pin blit object failed\n", r);
 +              return r;
 +      }
+       rdev->mc.active_vram_size = rdev->mc.real_vram_size;
        return 0;
  }
  
Simple merge
Simple merge
Simple merge
Simple merge
index ff1cc58920c0b45e517d8d6d8906670510747d1c,9490da700749487c00fe9c57671ec89727653136..ab83f688263afc0df50c9820116da6fadc86cfc0
@@@ -267,8 -267,8 +267,9 @@@ static void rv770_mc_program(struct rad
   */
  void r700_cp_stop(struct radeon_device *rdev)
  {
+       rdev->mc.active_vram_size = rdev->mc.visible_vram_size;
        WREG32(CP_ME_CNTL, (CP_ME_HALT | CP_PFP_HALT));
 +      WREG32(SCRATCH_UMSK, 0);
  }
  
  static int rv770_cp_load_microcode(struct radeon_device *rdev)
index af7b57a47fbc30e8a890f99d91eaa3632e4e5c45,db809e034cc48b6d8c246cba1ede0660113e30de..1e9bb2156dcfbfb77cccecaf0d67059a5e6da48d
@@@ -438,6 -441,43 +438,42 @@@ out_err
        return ret;
  }
  
 -              drm_mm_put_block(bo->mem.mm_node);
 -              bo->mem.mm_node = NULL;
+ /**
+  * Call bo::reserved and with the lru lock held.
+  * Will release GPU memory type usage on destruction.
+  * This is the place to put in driver specific hooks.
+  * Will release the bo::reserved lock and the
+  * lru lock on exit.
+  */
+ static void ttm_bo_cleanup_memtype_use(struct ttm_buffer_object *bo)
+ {
+       struct ttm_bo_global *glob = bo->glob;
+       if (bo->ttm) {
+               /**
+                * Release the lru_lock, since we don't want to have
+                * an atomic requirement on ttm_tt[unbind|destroy].
+                */
+               spin_unlock(&glob->lru_lock);
+               ttm_tt_unbind(bo->ttm);
+               ttm_tt_destroy(bo->ttm);
+               bo->ttm = NULL;
+               spin_lock(&glob->lru_lock);
+       }
+       if (bo->mem.mm_node) {
++              ttm_bo_mem_put(bo, &bo->mem);
+       }
+       atomic_set(&bo->reserved, 0);
+       wake_up_all(&bo->event_queue);
+       spin_unlock(&glob->lru_lock);
+ }
  /**
   * If bo idle, remove from delayed- and lru lists, and unref.
   * If not idle, and already on delayed list, do nothing.
Simple merge