diff options
author | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2019-06-14 19:43:41 +0300 |
---|---|---|
committer | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2019-06-17 16:30:32 +0300 |
commit | 7d82cc353ad4e57d4d459e459f305bf43dedfdad (patch) | |
tree | a05e2f102cfd473820d86c41b87a8587077c6f6d | |
parent | 0780f3b6f054ec6497a1a16edb9bf5832c0b92f4 (diff) | |
download | linux-7d82cc353ad4e57d4d459e459f305bf43dedfdad.tar.bz2 |
drm/i915/gtt: No need to zero the table for page dirs
We set them to scratch right after allocation so prevent
useless zeroing before.
v2: atomic_t
v3: allow pdp alloc fail
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614164350.30415-1-mika.kuoppala@linux.intel.com
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_gtt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 0392a4c4bb9b..0bad7bff4a73 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -688,7 +688,7 @@ static struct i915_page_directory *alloc_pd(struct i915_address_space *vm) { struct i915_page_directory *pd; - pd = kzalloc(sizeof(*pd), I915_GFP_ALLOW_FAIL); + pd = kmalloc(sizeof(*pd), I915_GFP_ALLOW_FAIL); if (unlikely(!pd)) return ERR_PTR(-ENOMEM); @@ -748,7 +748,7 @@ alloc_pdp(struct i915_address_space *vm) GEM_BUG_ON(!i915_vm_is_4lvl(vm)); - pdp = kzalloc(sizeof(*pdp), GFP_KERNEL); + pdp = kmalloc(sizeof(*pdp), I915_GFP_ALLOW_FAIL); if (!pdp) return ERR_PTR(-ENOMEM); |