diff options
author | Matthew Auld <matthew.auld@intel.com> | 2017-10-09 12:00:24 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-10-09 17:07:29 +0100 |
commit | 84e8978e62fea661787a216e7fe9abac8f1e056e (patch) | |
tree | 4f62a5dc8622833977cd8079c9faf41b9f0179ab /drivers/gpu/drm/i915/selftests/huge_pages.c | |
parent | 43ae70d97c5195f48d903df31ecac4c5397b2f1e (diff) | |
download | linux-84e8978e62fea661787a216e7fe9abac8f1e056e.tar.bz2 |
drm/i915: s/sg_mask/sg_page_sizes/
It's a little unclear what the sg_mask actually is, so prefer the more
meaningful name of sg_page_sizes.
Suggested-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171009110024.29114-1-matthew.auld@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/huge_pages.c')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/huge_pages.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/selftests/huge_pages.c b/drivers/gpu/drm/i915/selftests/huge_pages.c index b8495882e5b0..b8b9d0822199 100644 --- a/drivers/gpu/drm/i915/selftests/huge_pages.c +++ b/drivers/gpu/drm/i915/selftests/huge_pages.c @@ -68,7 +68,7 @@ static int get_huge_pages(struct drm_i915_gem_object *obj) unsigned int page_mask = obj->mm.page_mask; struct sg_table *st; struct scatterlist *sg; - unsigned int sg_mask; + unsigned int sg_page_sizes; u64 rem; st = kmalloc(sizeof(*st), GFP); @@ -83,7 +83,7 @@ static int get_huge_pages(struct drm_i915_gem_object *obj) rem = obj->base.size; sg = st->sgl; st->nents = 0; - sg_mask = 0; + sg_page_sizes = 0; /* * Our goal here is simple, we want to greedily fill the object from @@ -104,7 +104,7 @@ static int get_huge_pages(struct drm_i915_gem_object *obj) goto err; sg_set_page(sg, page, page_size, 0); - sg_mask |= page_size; + sg_page_sizes |= page_size; st->nents++; rem -= page_size; @@ -124,8 +124,8 @@ static int get_huge_pages(struct drm_i915_gem_object *obj) obj->mm.madv = I915_MADV_DONTNEED; - GEM_BUG_ON(sg_mask != obj->mm.page_mask); - __i915_gem_object_set_pages(obj, st, sg_mask); + GEM_BUG_ON(sg_page_sizes != obj->mm.page_mask); + __i915_gem_object_set_pages(obj, st, sg_page_sizes); return 0; @@ -192,7 +192,7 @@ static int fake_get_huge_pages(struct drm_i915_gem_object *obj) const u64 max_len = rounddown_pow_of_two(UINT_MAX); struct sg_table *st; struct scatterlist *sg; - unsigned int sg_mask; + unsigned int sg_page_sizes; u64 rem; st = kmalloc(sizeof(*st), GFP); @@ -208,7 +208,7 @@ static int fake_get_huge_pages(struct drm_i915_gem_object *obj) rem = obj->base.size; sg = st->sgl; st->nents = 0; - sg_mask = 0; + sg_page_sizes = 0; do { unsigned int page_size = get_largest_page_size(i915, rem); unsigned int len = min(page_size * div_u64(rem, page_size), @@ -221,7 +221,7 @@ static int fake_get_huge_pages(struct drm_i915_gem_object *obj) sg_dma_len(sg) = len; sg_dma_address(sg) = page_size; - sg_mask |= len; + sg_page_sizes |= len; st->nents++; @@ -236,7 +236,7 @@ static int fake_get_huge_pages(struct drm_i915_gem_object *obj) obj->mm.madv = I915_MADV_DONTNEED; - __i915_gem_object_set_pages(obj, st, sg_mask); + __i915_gem_object_set_pages(obj, st, sg_page_sizes); return 0; } |