]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Replace a calloc followed by copying data over it with malloc.
authorEric Anholt <eric@anholt.net>
Sun, 22 Nov 2009 02:49:37 +0000 (03:49 +0100)
committerEric Anholt <eric@anholt.net>
Wed, 25 Nov 2009 14:36:21 +0000 (06:36 -0800)
commitb7ebc18efec93ffe6dd4d9e7dd37a74c6608006b
treeefa286f2e381d60b514c897cd148e5a824cce667
parentd3d62de77fdf8a6520f98409f0a518b9696a9eb5
drm/i915: Replace a calloc followed by copying data over it with malloc.

Execbufs involve quite a bit of payload, to the extent that cache misses
show up in the profiles here, and a suspicion that some of those cachelines
may get evicted and then reloaded in the subsequent copy.

This is still abstracted like drm_calloc_large since we want to check for
size overflow, and because we want to choose between kmalloc and vmalloc
on the fly.  cairo's interface for malloc-with-calloc's-args was used as
the model.

Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_gem.c
include/drm/drmP.h