diff options
author | Matthew Auld <matthew.auld@intel.com> | 2018-09-20 16:27:06 +0200 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-09-20 17:43:17 +0200 |
commit | c6d22ab61bfdeb9d8572859cbc670e7335853817 (patch) | |
tree | 3b78767a54d2157bcb1ba0b461fadab37883fd59 /drivers/gpu/drm/i915/selftests/huge_pages.c | |
parent | drm/i915/guc: Restore preempt-context across S3/S4 (diff) | |
download | linux-c6d22ab61bfdeb9d8572859cbc670e7335853817.tar.xz linux-c6d22ab61bfdeb9d8572859cbc670e7335853817.zip |
drm/i915: don't assume struct page in i915_sg_trim
If we copy all the contents of the sg across and not just the page link,
we can then also put it to work in fake_get_huge_pages and beyond.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180920142707.19659-1-matthew.auld@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/huge_pages.c')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/huge_pages.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/selftests/huge_pages.c b/drivers/gpu/drm/i915/selftests/huge_pages.c index e272127783fe..8d03f64eabd7 100644 --- a/drivers/gpu/drm/i915/selftests/huge_pages.c +++ b/drivers/gpu/drm/i915/selftests/huge_pages.c @@ -235,6 +235,8 @@ static int fake_get_huge_pages(struct drm_i915_gem_object *obj) sg = sg_next(sg); } while (1); + i915_sg_trim(st); + obj->mm.madv = I915_MADV_DONTNEED; __i915_gem_object_set_pages(obj, st, sg_page_sizes); |