mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
drm/nouveau: consolidate identical functions in nouveau_ttm.c
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
792067e00b
commit
6be4421a9f
1 changed files with 17 additions and 46 deletions
|
@ -33,17 +33,23 @@
|
|||
#include <core/tegra.h>
|
||||
|
||||
static int
|
||||
nouveau_vram_manager_init(struct ttm_mem_type_manager *man, unsigned long psize)
|
||||
nouveau_manager_init(struct ttm_mem_type_manager *man, unsigned long psize)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
nouveau_vram_manager_fini(struct ttm_mem_type_manager *man)
|
||||
nouveau_manager_fini(struct ttm_mem_type_manager *man)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
nouveau_manager_debug(struct ttm_mem_type_manager *man,
|
||||
struct drm_printer *printer)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void
|
||||
nvkm_mem_node_cleanup(struct nvkm_mem *node)
|
||||
{
|
||||
|
@ -103,24 +109,13 @@ nouveau_vram_manager_new(struct ttm_mem_type_manager *man,
|
|||
}
|
||||
|
||||
const struct ttm_mem_type_manager_func nouveau_vram_manager = {
|
||||
.init = nouveau_vram_manager_init,
|
||||
.takedown = nouveau_vram_manager_fini,
|
||||
.init = nouveau_manager_init,
|
||||
.takedown = nouveau_manager_fini,
|
||||
.get_node = nouveau_vram_manager_new,
|
||||
.put_node = nouveau_vram_manager_del,
|
||||
.debug = nouveau_manager_debug,
|
||||
};
|
||||
|
||||
static int
|
||||
nouveau_gart_manager_init(struct ttm_mem_type_manager *man, unsigned long psize)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
nouveau_gart_manager_fini(struct ttm_mem_type_manager *man)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
nouveau_gart_manager_del(struct ttm_mem_type_manager *man,
|
||||
struct ttm_mem_reg *reg)
|
||||
|
@ -172,32 +167,14 @@ nouveau_gart_manager_new(struct ttm_mem_type_manager *man,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
nouveau_gart_manager_debug(struct ttm_mem_type_manager *man,
|
||||
struct drm_printer *printer)
|
||||
{
|
||||
}
|
||||
|
||||
const struct ttm_mem_type_manager_func nouveau_gart_manager = {
|
||||
.init = nouveau_gart_manager_init,
|
||||
.takedown = nouveau_gart_manager_fini,
|
||||
.init = nouveau_manager_init,
|
||||
.takedown = nouveau_manager_fini,
|
||||
.get_node = nouveau_gart_manager_new,
|
||||
.put_node = nouveau_gart_manager_del,
|
||||
.debug = nouveau_gart_manager_debug
|
||||
.debug = nouveau_manager_debug
|
||||
};
|
||||
|
||||
static int
|
||||
nv04_gart_manager_init(struct ttm_mem_type_manager *man, unsigned long psize)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
nv04_gart_manager_fini(struct ttm_mem_type_manager *man)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
nv04_gart_manager_del(struct ttm_mem_type_manager *man, struct ttm_mem_reg *reg)
|
||||
{
|
||||
|
@ -241,18 +218,12 @@ nv04_gart_manager_new(struct ttm_mem_type_manager *man,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
nv04_gart_manager_debug(struct ttm_mem_type_manager *man,
|
||||
struct drm_printer *printer)
|
||||
{
|
||||
}
|
||||
|
||||
const struct ttm_mem_type_manager_func nv04_gart_manager = {
|
||||
.init = nv04_gart_manager_init,
|
||||
.takedown = nv04_gart_manager_fini,
|
||||
.init = nouveau_manager_init,
|
||||
.takedown = nouveau_manager_fini,
|
||||
.get_node = nv04_gart_manager_new,
|
||||
.put_node = nv04_gart_manager_del,
|
||||
.debug = nv04_gart_manager_debug
|
||||
.debug = nouveau_manager_debug
|
||||
};
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in a new issue