drm/i915: Fix malloc type in i915_gem_object_bind_to_gtt()

drm_mm.c expects DRM_MEM_MM, not DRM_I915_GEM.
This commit is contained in:
Jean-Sébastien Pédron 2016-03-11 21:00:14 +00:00
parent 163c8ab66f
commit 645e6cf5cc

View File

@ -3263,7 +3263,7 @@ i915_gem_object_bind_to_gtt(struct drm_i915_gem_object *obj,
i915_gem_object_pin_pages(obj);
node = malloc(sizeof(*node), DRM_I915_GEM, M_NOWAIT | M_ZERO);
node = malloc(sizeof(*node), DRM_MEM_MM, M_NOWAIT | M_ZERO);
if (node == NULL) {
i915_gem_object_unpin_pages(obj);
return -ENOMEM;
@ -3286,7 +3286,7 @@ i915_gem_object_bind_to_gtt(struct drm_i915_gem_object *obj,
goto search_free;
i915_gem_object_unpin_pages(obj);
free(node, DRM_I915_GEM);
free(node, DRM_MEM_MM);
return ret;
}
if (WARN_ON(!i915_gem_valid_gtt_space(dev, node, obj->cache_level))) {