Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm...
[sfrench/cifs-2.6.git] / drivers / gpu / drm / etnaviv / etnaviv_gem_prime.c
index abed6f781281d30b0444784bbb6f77ba1e233d31..e5da4f2300ba13b3450627c1f2c2239e5fe3aeb4 100644 (file)
@@ -87,7 +87,7 @@ static void etnaviv_gem_prime_release(struct etnaviv_gem_object *etnaviv_obj)
         * ours, just free the array we allocated:
         */
        if (etnaviv_obj->pages)
-               drm_free_large(etnaviv_obj->pages);
+               kvfree(etnaviv_obj->pages);
 
        drm_prime_gem_destroy(&etnaviv_obj->base, etnaviv_obj->sgt);
 }
@@ -128,7 +128,7 @@ struct drm_gem_object *etnaviv_gem_prime_import_sg_table(struct drm_device *dev,
        npages = size / PAGE_SIZE;
 
        etnaviv_obj->sgt = sgt;
-       etnaviv_obj->pages = drm_malloc_ab(npages, sizeof(struct page *));
+       etnaviv_obj->pages = kvmalloc_array(npages, sizeof(struct page *), GFP_KERNEL);
        if (!etnaviv_obj->pages) {
                ret = -ENOMEM;
                goto fail;