]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/gem: Call i915_gem_flush_free_objects() in i915_gem_dumb_create()
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 23 Jul 2021 17:21:37 +0000 (12:21 -0500)
committerMatthew Auld <matthew.auld@intel.com>
Mon, 26 Jul 2021 15:37:32 +0000 (16:37 +0100)
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 <jason@jlekstrand.net>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210723172142.3273510-4-jason@jlekstrand.net
drivers/gpu/drm/i915/gem/i915_gem_create.c

index aa687b10dcd455cbb273addde20301d868318331..adcce37c04b8db48961e78ff83aeaeef37dd27ec 100644 (file)
@@ -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;