linux/drivers/gpu/drm/ttm/ttm_sys_manager.c
Christian König f7dbd8624e drm/ttm: fix warning in new sys man
Include the header for the prototype.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210503142710.153369-1-christian.koenig@amd.com
2021-05-04 16:10:10 +02:00

42 lines
998 B
C

/* SPDX-License-Identifier: GPL-2.0 OR MIT */
#include <drm/ttm/ttm_resource.h>
#include <drm/ttm/ttm_device.h>
#include <drm/ttm/ttm_placement.h>
#include "ttm_module.h"
static int ttm_sys_man_alloc(struct ttm_resource_manager *man,
struct ttm_buffer_object *bo,
const struct ttm_place *place,
struct ttm_resource *mem)
{
return 0;
}
static void ttm_sys_man_free(struct ttm_resource_manager *man,
struct ttm_resource *mem)
{
}
static const struct ttm_resource_manager_func ttm_sys_manager_func = {
.alloc = ttm_sys_man_alloc,
.free = ttm_sys_man_free,
};
void ttm_sys_man_init(struct ttm_device *bdev)
{
struct ttm_resource_manager *man = &bdev->sysman;
/*
* Initialize the system memory buffer type.
* Other types need to be driver / IOCTL initialized.
*/
man->use_tt = true;
man->func = &ttm_sys_manager_func;
ttm_resource_manager_init(man, 0);
ttm_set_driver_manager(bdev, TTM_PL_SYSTEM, man);
ttm_resource_manager_set_used(man, true);
}