Skip to content

Commit

Permalink
drm/i915: Use memset64() to prefill the GTT page
Browse files Browse the repository at this point in the history
Take advantage of optimised memset64() instead of open coding it to
prefill the GTT pages.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20170926095353.11036-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
  • Loading branch information
Chris Wilson committed Sep 28, 2017
1 parent 163e8ae commit 4dd504f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/gpu/drm/i915/i915_gem_gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,8 @@ static void fill_page_dma(struct i915_address_space *vm,
const u64 val)
{
u64 * const vaddr = kmap_atomic(p->page);
int i;

for (i = 0; i < 512; i++)
vaddr[i] = val;
memset64(vaddr, val, PAGE_SIZE / sizeof(val));

kunmap_atomic(vaddr);
}
Expand Down

0 comments on commit 4dd504f

Please sign in to comment.