Commit 82ec88e1 authored by Jason Ekstrand's avatar Jason Ekstrand Committed by Matthew Auld

drm/i915/gem: Call i915_gem_flush_free_objects() in i915_gem_dumb_create()

This doesn't really fix anything serious since the chances of a client
creating and destroying a mass of dumb BOs is pretty low.  However, it
is called by the other two create IOCTLs to garbage collect old objects.
Call it here too for consistency.
Signed-off-by: default avatarJason Ekstrand <jason@jlekstrand.net>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210723172142.3273510-4-jason@jlekstrand.net
parent 34c7ef0a
...@@ -151,6 +151,8 @@ i915_gem_dumb_create(struct drm_file *file, ...@@ -151,6 +151,8 @@ i915_gem_dumb_create(struct drm_file *file,
if (args->pitch < args->width) if (args->pitch < args->width)
return -EINVAL; return -EINVAL;
i915_gem_flush_free_objects(i915);
args->size = mul_u32_u32(args->pitch, args->height); args->size = mul_u32_u32(args->pitch, args->height);
mem_type = INTEL_MEMORY_SYSTEM; mem_type = INTEL_MEMORY_SYSTEM;
......
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