Skip to content

Commit

Permalink
drm/i915/gem: Call i915_gem_flush_free_objects() in i915_gem_dumb_cre…
Browse files Browse the repository at this point in the history
…ate()

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 <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Signed-off-by: Matthew Auld <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
gfxstrand authored and matt-auld committed Jul 26, 2021
1 parent 34c7ef0 commit 82ec88e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/gem/i915_gem_create.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 82ec88e

Please sign in to comment.