From: Jason Ekstrand Date: Fri, 23 Jul 2021 17:21:37 +0000 (-0500) Subject: drm/i915/gem: Call i915_gem_flush_free_objects() in i915_gem_dumb_create() X-Git-Tag: libata-5.15-2021-09-05~42^2~11^2~83 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=82ec88e11d46e3d981e2db854fa5ab037c2c0f1f;p=linux-block.git 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: Jason Ekstrand Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210723172142.3273510-4-jason@jlekstrand.net --- diff --git a/drivers/gpu/drm/i915/gem/i915_gem_create.c b/drivers/gpu/drm/i915/gem/i915_gem_create.c index aa687b10dcd4..adcce37c04b8 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_create.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_create.c @@ -151,6 +151,8 @@ i915_gem_dumb_create(struct drm_file *file, if (args->pitch < args->width) return -EINVAL; + i915_gem_flush_free_objects(i915); + args->size = mul_u32_u32(args->pitch, args->height); mem_type = INTEL_MEMORY_SYSTEM;