[Intel-gfx] [PATCH 06/21] drm/i915: introduce page_size members
Chris Wilson
chris at chris-wilson.co.uk
Fri Sep 29 21:31:27 UTC 2017
Quoting Matthew Auld (2017-09-29 17:10:17)
> diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c b/drivers/gpu/drm/i915/i915_gem_userptr.c
> index 70ad7489827d..ad5abca1f794 100644
> --- a/drivers/gpu/drm/i915/i915_gem_userptr.c
> +++ b/drivers/gpu/drm/i915/i915_gem_userptr.c
> @@ -405,6 +405,9 @@ __i915_gem_userptr_alloc_pages(struct drm_i915_gem_object *obj,
> {
> unsigned int max_segment = i915_sg_segment_size();
> struct sg_table *st;
> + struct scatterlist *sg;
> + unsigned int sg_mask;
> + int n;
> int ret;
>
> st = kmalloc(sizeof(*st), GFP_KERNEL);
> @@ -434,7 +437,11 @@ __i915_gem_userptr_alloc_pages(struct drm_i915_gem_object *obj,
> return ERR_PTR(ret);
> }
>
> - __i915_gem_object_set_pages(obj, st);
> + sg_mask = 0;
> + for_each_sg(st->sgl, sg, num_pages, n)
> + sg_mask |= sg->length;
No workie as num_pages != nents.
-Chris
More information about the Intel-gfx
mailing list