Commit 085ce264 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Ensure that if we ever try to pin+fence it is mappable.

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: default avatarAlexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent 27153f72
...@@ -4151,6 +4151,7 @@ i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment, ...@@ -4151,6 +4151,7 @@ i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment,
int ret; int ret;
BUG_ON(obj_priv->pin_count == DRM_I915_GEM_OBJECT_MAX_PIN_COUNT); BUG_ON(obj_priv->pin_count == DRM_I915_GEM_OBJECT_MAX_PIN_COUNT);
BUG_ON(need_fence && !mappable);
WARN_ON(i915_verify_lists(dev)); WARN_ON(i915_verify_lists(dev));
if (obj_priv->gtt_space != NULL) { if (obj_priv->gtt_space != NULL) {
......
...@@ -1462,7 +1462,8 @@ intel_pin_and_fence_fb_obj(struct drm_device *dev, ...@@ -1462,7 +1462,8 @@ intel_pin_and_fence_fb_obj(struct drm_device *dev,
} }
ret = i915_gem_object_pin(obj, alignment, ret = i915_gem_object_pin(obj, alignment,
!pipelined, obj_priv->tiling_mode); !pipelined || obj_priv->tiling_mode,
obj_priv->tiling_mode);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment