[Intel-gfx] [PATCH 2/2] drm/i915/userptr: fix size calculation
Chris Wilson
chris at chris-wilson.co.uk
Thu Jan 16 19:34:23 UTC 2020
Quoting Matthew Auld (2020-01-16 19:28:09)
> diff --git a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
> index 077b8f7cf6cb..0d7820c49f5b 100644
> --- a/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
> +++ b/drivers/gpu/drm/i915/gt/gen8_ppgtt.c
> @@ -379,6 +379,7 @@ gen8_ppgtt_insert_pte(struct i915_ppgtt *ppgtt,
> pd = i915_pd_entry(pdp, gen8_pd_index(idx, 2));
> vaddr = kmap_atomic_px(i915_pt_entry(pd, gen8_pd_index(idx, 1)));
> do {
> + GEM_BUG_ON(iter->sg->length < PAGE_SIZE);
s/PAGE_SIZE/I915_GTT_PAGE_SIZE/
> vaddr[gen8_pd_index(idx, 0)] = pte_encode | iter->dma;
>
> iter->dma += I915_GTT_PAGE_SIZE;
> --
> 2.20.1
>
More information about the Intel-gfx
mailing list