drm: drop drm_[cm]alloc* helpers
Now that drm_[cm]alloc* helpers are simple one line wrappers around kvmalloc_array and drm_free_large is just kvfree alias we can drop them and replace by their native forms. This shouldn't introduce any functional change. Changes since v1 - fix typo in drivers/gpu//drm/etnaviv/etnaviv_gem.c - noticed by 0day build robot Suggested-by: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Michal Hocko <mhocko@suse.com>drm: drop drm_[cm]alloc* helpers [danvet: Fixup vgem which grew another user very recently.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Christian König <christian.koenig@amd.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170517122312.GK18247@dhcp22.suse.cz
Šī revīzija ir iekļauta:

revīziju iesūtīja
Daniel Vetter

vecāks
c4f51dc872
revīzija
2098105ec6
@@ -39,7 +39,6 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/export.h>
|
||||
#include <drm/drm_cache.h>
|
||||
#include <drm/drm_mem_util.h>
|
||||
#include <drm/ttm/ttm_module.h>
|
||||
#include <drm/ttm/ttm_bo_driver.h>
|
||||
#include <drm/ttm/ttm_placement.h>
|
||||
@@ -53,14 +52,16 @@
|
||||
*/
|
||||
static void ttm_tt_alloc_page_directory(struct ttm_tt *ttm)
|
||||
{
|
||||
ttm->pages = drm_calloc_large(ttm->num_pages, sizeof(void*));
|
||||
ttm->pages = kvmalloc_array(ttm->num_pages, sizeof(void*),
|
||||
GFP_KERNEL | __GFP_ZERO);
|
||||
}
|
||||
|
||||
static void ttm_dma_tt_alloc_page_directory(struct ttm_dma_tt *ttm)
|
||||
{
|
||||
ttm->ttm.pages = drm_calloc_large(ttm->ttm.num_pages,
|
||||
ttm->ttm.pages = kvmalloc_array(ttm->ttm.num_pages,
|
||||
sizeof(*ttm->ttm.pages) +
|
||||
sizeof(*ttm->dma_address));
|
||||
sizeof(*ttm->dma_address),
|
||||
GFP_KERNEL | __GFP_ZERO);
|
||||
ttm->dma_address = (void *) (ttm->ttm.pages + ttm->ttm.num_pages);
|
||||
}
|
||||
|
||||
@@ -208,7 +209,7 @@ EXPORT_SYMBOL(ttm_tt_init);
|
||||
|
||||
void ttm_tt_fini(struct ttm_tt *ttm)
|
||||
{
|
||||
drm_free_large(ttm->pages);
|
||||
kvfree(ttm->pages);
|
||||
ttm->pages = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(ttm_tt_fini);
|
||||
@@ -243,7 +244,7 @@ void ttm_dma_tt_fini(struct ttm_dma_tt *ttm_dma)
|
||||
{
|
||||
struct ttm_tt *ttm = &ttm_dma->ttm;
|
||||
|
||||
drm_free_large(ttm->pages);
|
||||
kvfree(ttm->pages);
|
||||
ttm->pages = NULL;
|
||||
ttm_dma->dma_address = NULL;
|
||||
}
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user