]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: Ensure that if we ever try to pin+fence it is mappable.
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 3 Nov 2010 09:27:53 +0000 (09:27 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 3 Nov 2010 09:31:57 +0000 (09:31 +0000)
When merging Daniel's full-gtt patches I had a set of tweaks which I
thought I had undone. I was half right...

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31286
Reported-by: jinjin.wang@intel.com
Reported-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/intel_display.c

index 5bd86033a88e8fe03f1332ce537847d445b0d860..12dae003c01162e721448db7e8c889757565e790 100644 (file)
@@ -4151,6 +4151,7 @@ i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment,
        int ret;
 
        BUG_ON(obj_priv->pin_count == DRM_I915_GEM_OBJECT_MAX_PIN_COUNT);
+       BUG_ON(need_fence && !mappable);
        WARN_ON(i915_verify_lists(dev));
 
        if (obj_priv->gtt_space != NULL) {
index 33c178c8d6dd04da2f41da8ecb2f9034defe978a..a33d9a2c742992db03dedab7ed4cc8abb4c1afaa 100644 (file)
@@ -1462,7 +1462,8 @@ intel_pin_and_fence_fb_obj(struct drm_device *dev,
        }
 
        ret = i915_gem_object_pin(obj, alignment,
-                                 !pipelined, obj_priv->tiling_mode);
+                                 !pipelined || obj_priv->tiling_mode,
+                                 obj_priv->tiling_mode);
        if (ret)
                return ret;