diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-08-06 15:04:48 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-08-13 14:23:29 +0200 |
commit | 841cd7737557785c0f215b0984c06aaaaa882302 (patch) | |
tree | a58dca612ff402b33b63b678e7ebb841ea731b29 /drivers/gpu/drm/i915/i915_gem_gtt.c | |
parent | 4d884705dababd7d0f3f12796bc7b45e84962596 (diff) | |
download | op-kernel-dev-841cd7737557785c0f215b0984c06aaaaa882302.zip op-kernel-dev-841cd7737557785c0f215b0984c06aaaaa882302.tar.gz |
drm/i915: Only refcount ppgtt if it actually is one
This essentially unbreaks non-ppgtt operation where we'd scribble over
random memory.
While at it give the vm_to_ppgtt function a proper prefix and make it
a bit more paranoid.
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_gtt.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_gtt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index a5715fa..48d8f4a 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -2187,7 +2187,8 @@ i915_gem_obj_lookup_or_create_vma(struct drm_i915_gem_object *obj, if (!vma) vma = __i915_gem_vma_create(obj, vm); - i915_ppgtt_get(vm_to_ppgtt(vm)); + if (!i915_is_ggtt(vm)) + i915_ppgtt_get(i915_vm_to_ppgtt(vm)); return vma; } |