[PATCH] huge
Chris Wilson
chris at chris-wilson.co.uk
Tue Jan 12 13:43:44 UTC 2021
---
drivers/gpu/drm/i915/gem/selftests/huge_gem_object.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_gem_object.c b/drivers/gpu/drm/i915/gem/selftests/huge_gem_object.c
index 2fb501a78a85..9f6700b17431 100644
--- a/drivers/gpu/drm/i915/gem/selftests/huge_gem_object.c
+++ b/drivers/gpu/drm/i915/gem/selftests/huge_gem_object.c
@@ -27,7 +27,7 @@ static void huge_free_pages(struct drm_i915_gem_object *obj,
static int huge_get_pages(struct drm_i915_gem_object *obj)
{
-#define GFP (GFP_KERNEL | __GFP_NOWARN | __GFP_RETRY_MAYFAIL)
+#define GFP (GFP_KERNEL)
const unsigned long nreal = obj->scratch / PAGE_SIZE;
const unsigned long npages = obj->base.size / PAGE_SIZE;
struct scatterlist *sg, *src, *end;
@@ -35,10 +35,13 @@ static int huge_get_pages(struct drm_i915_gem_object *obj)
unsigned long n;
pages = kmalloc(sizeof(*pages), GFP);
- if (!pages)
+ if (!pages) {
+ pr_err("kmalloc fail\n");
return -ENOMEM;
+ }
if (sg_alloc_table(pages, npages, GFP)) {
+ pr_err("sg_alloc_table fail\n");
kfree(pages);
return -ENOMEM;
}
@@ -49,6 +52,7 @@ static int huge_get_pages(struct drm_i915_gem_object *obj)
page = alloc_page(GFP | __GFP_HIGHMEM);
if (!page) {
+ pr_err("alloc_page fail\n");
sg_mark_end(sg);
goto err;
}
@@ -65,8 +69,10 @@ static int huge_get_pages(struct drm_i915_gem_object *obj)
}
}
- if (i915_gem_gtt_prepare_pages(obj, pages))
+ if (i915_gem_gtt_prepare_pages(obj, pages)) {
+ pr_err("gtt prepare fail\n");
goto err;
+ }
__i915_gem_object_set_pages(obj, pages, PAGE_SIZE);
--
2.20.1
More information about the Intel-gfx-trybot
mailing list