Merge commit drm-intel-fixes into topic/ppgtt
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 18 Dec 2013 15:23:37 +0000 (16:23 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 18 Dec 2013 15:23:37 +0000 (16:23 +0100)
I need the tricky do_switch fix before I can merge the final piece of
the ppgtt enabling puzzle. Otherwise the conflict will be a real pain
to resolve since the do_switch hunk from -fixes must be placed at the
exact right place within a hunk in the next patch.

Conflicts:
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/i915/intel_display.c

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 files changed:
1  2 
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_evict.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/intel_ddi.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_pm.c

Simple merge
Simple merge
Simple merge
Simple merge
index d3a17ef78ba6f48aff30a64dab9bc10ed60f6b85,b0f42b9ca037ed472e1a0dd4cd663df6ffd70f06..165a5c7d9424bf7ebedb65ff4884fd6bef198a2b
@@@ -515,24 -347,13 +515,22 @@@ void i915_gem_context_close(struct drm_
  {
        struct drm_i915_file_private *file_priv = file->driver_priv;
  
-       mutex_lock(&dev->struct_mutex);
 +      if (!HAS_HW_CONTEXTS(dev)) {
 +              kfree(file_priv->private_default_ctx);
 +              return;
 +      }
 +
        idr_for_each(&file_priv->context_idr, context_idr_cleanup, NULL);
 +      i915_gem_context_unreference(file_priv->private_default_ctx);
        idr_destroy(&file_priv->context_idr);
-       mutex_unlock(&dev->struct_mutex);
  }
  
 -static struct i915_hw_context *
 +struct i915_hw_context *
  i915_gem_context_get(struct drm_i915_file_private *file_priv, u32 id)
  {
 +      if (!HAS_HW_CONTEXTS(file_priv->dev_priv->dev))
 +              return file_priv->private_default_ctx;
 +
        return (struct i915_hw_context *)idr_find(&file_priv->context_idr, id);
  }
  
@@@ -615,10 -433,12 +621,12 @@@ static int do_switch(struct intel_ring_
         * that thanks to write = false in this call and us not setting any gpu
         * write domains when putting a context object onto the active list
         * (when switching away from it), this won't block.
-        * XXX: We need a real interface to do this instead of trickery. */
+        *
+        * XXX: We need a real interface to do this instead of trickery.
+        */
        ret = i915_gem_object_set_to_gtt_domain(to->obj, false);
        if (ret) {
 -              i915_gem_object_unpin(to->obj);
 +              i915_gem_object_ggtt_unpin(to->obj);
                return ret;
        }
  
Simple merge
index e78c5c0e33d87a9c94ad181a3258e5b0292ecacc,b7e787fb4649321cd67d7456aef11af861757aac..8779d75bee1f2c66a3b4a32fd14905d7a67f0b62
@@@ -197,7 -190,28 +200,28 @@@ static struct i915_vma *eb_get_vma(stru
        }
  }
  
- static void eb_destroy(struct eb_vmas *eb) {
+ static void
+ i915_gem_execbuffer_unreserve_vma(struct i915_vma *vma)
+ {
+       struct drm_i915_gem_exec_object2 *entry;
+       struct drm_i915_gem_object *obj = vma->obj;
+       if (!drm_mm_node_allocated(&vma->node))
+               return;
+       entry = vma->exec_entry;
+       if (entry->flags & __EXEC_OBJECT_HAS_FENCE)
+               i915_gem_object_unpin_fence(obj);
+       if (entry->flags & __EXEC_OBJECT_HAS_PIN)
 -              i915_gem_object_unpin(obj);
++              vma->pin_count--;
+       entry->flags &= ~(__EXEC_OBJECT_HAS_FENCE | __EXEC_OBJECT_HAS_PIN);
+ }
+ static void eb_destroy(struct eb_vmas *eb)
+ {
        while (!list_empty(&eb->vmas)) {
                struct i915_vma *vma;
  
Simple merge
Simple merge
index 596ad09f0e5157b83ae1bf026cf26d82fed848c5,8b8bde7dce53abce2fea3c655e06ef765433d50f..af3717a8a463da9965e1b6826424ac28d1560390
@@@ -6589,7 -6402,7 +6589,7 @@@ static void hsw_restore_lcpll(struct dr
  
        /* Make sure we're not on PC8 state before disabling PC8, otherwise
         * we'll hang the machine! */
-       dev_priv->uncore.funcs.force_wake_get(dev_priv, FORCEWAKE_ALL);
 -      gen6_gt_force_wake_get(dev_priv);
++      gen6_gt_force_wake_get(dev_priv, FORCEWAKE_ALL);
  
        if (val & LCPLL_POWER_DOWN_ALLOW) {
                val &= ~LCPLL_POWER_DOWN_ALLOW;
                        DRM_ERROR("Switching back to LCPLL failed\n");
        }
  
-       dev_priv->uncore.funcs.force_wake_put(dev_priv, FORCEWAKE_ALL);
 -      gen6_gt_force_wake_put(dev_priv);
++      gen6_gt_force_wake_put(dev_priv, FORCEWAKE_ALL);
  }
  
  void hsw_enable_pc8_work(struct work_struct *__work)
Simple merge
Simple merge
index cba4be88eddb993105c261b9e29a15dcd0ee1917,e0dec95c764ec2826c9b43f85d33f6da85fc278f..0731338c0bfdad36576464b812f3b55dbf185d40
@@@ -6176,10 -6120,17 +6177,10 @@@ int vlv_freq_opcode(struct drm_i915_pri
                return -1;
        }
  
 -      val /= mult;
 -      val -= base / mult;
 -      val += 0xbd;
 -
 -      if (val > 0xea)
 -              val = 0xea;
 -
 -      return val;
 +      return DIV_ROUND_CLOSEST(4 * mul * val, dev_priv->mem_freq) + 0xbd - 6;
  }
  
- void intel_pm_init(struct drm_device *dev)
+ void intel_pm_setup(struct drm_device *dev)
  {
        struct drm_i915_private *dev_priv = dev->dev_private;