32 #define pr_fmt(fmt) "[TTM] " fmt
40 #include <linux/module.h>
41 #include <linux/slab.h>
45 struct ttm_agp_backend {
53 struct ttm_agp_backend *agp_be =
container_of(ttm,
struct ttm_agp_backend, ttm);
79 pr_err(
"AGP Bind memory failed\n");
84 static int ttm_agp_unbind(
struct ttm_tt *ttm)
86 struct ttm_agp_backend *agp_be =
container_of(ttm,
struct ttm_agp_backend, ttm);
89 if (agp_be->mem->is_bound)
97 static void ttm_agp_destroy(
struct ttm_tt *ttm)
99 struct ttm_agp_backend *agp_be =
container_of(ttm,
struct ttm_agp_backend, ttm);
108 .
bind = ttm_agp_bind,
109 .unbind = ttm_agp_unbind,
110 .destroy = ttm_agp_destroy,
118 struct ttm_agp_backend *agp_be;
125 agp_be->bridge = bridge;
126 agp_be->ttm.func = &ttm_agp_func;
128 if (
ttm_tt_init(&agp_be->ttm, bdev, size, page_flags, dummy_read_page)) {
136 int ttm_agp_tt_populate(
struct ttm_tt *ttm)
138 if (ttm->
state != tt_unpopulated)
145 void ttm_agp_tt_unpopulate(
struct ttm_tt *ttm)