54 .placement = &vram_placement_flags,
55 .num_busy_placement = 1,
56 .busy_placement = &vram_placement_flags
59 static uint32_t vram_gmr_placement_flags[] = {
64 static uint32_t gmr_vram_placement_flags[] = {
73 .placement = vram_gmr_placement_flags,
74 .num_busy_placement = 1,
75 .busy_placement = &gmr_placement_flags
78 static uint32_t vram_gmr_ne_placement_flags[] = {
87 .placement = vram_gmr_ne_placement_flags,
88 .num_busy_placement = 1,
89 .busy_placement = &gmr_ne_placement_flags
96 .placement = &vram_placement_flags,
97 .num_busy_placement = 1,
98 .busy_placement = &sys_placement_flags
105 .placement = &vram_ne_placement_flags,
106 .num_busy_placement = 1,
107 .busy_placement = &vram_ne_placement_flags
114 .placement = &sys_placement_flags,
115 .num_busy_placement = 1,
116 .busy_placement = &sys_placement_flags
119 static uint32_t evictable_placement_flags[] = {
129 .placement = evictable_placement_flags,
130 .num_busy_placement = 1,
131 .busy_placement = &sys_placement_flags
138 .num_busy_placement = 2,
139 .placement = &gmr_placement_flags,
140 .busy_placement = gmr_vram_placement_flags
159 static int vmw_ttm_unbind(
struct ttm_tt *
ttm)
167 static void vmw_ttm_destroy(
struct ttm_tt *
ttm)
176 .bind = vmw_ttm_bind,
177 .unbind = vmw_ttm_unbind,
178 .destroy = vmw_ttm_destroy,
191 vmw_be->
ttm.func = &vmw_ttm_func;
194 if (
ttm_tt_init(&vmw_be->
ttm, bdev, size, page_flags, dummy_read_page)) {
239 DRM_ERROR(
"Unsupported memory type %u\n", (
unsigned)type);
266 mem->
bus.is_iomem =
false;
279 mem->
bus.is_iomem =
true;
301 static void *vmw_sync_obj_ref(
void *sync_obj)
308 static void vmw_sync_obj_unref(
void **sync_obj)
313 static int vmw_sync_obj_flush(
void *sync_obj,
void *sync_arg)
319 static bool vmw_sync_obj_signaled(
void *sync_obj,
void *sync_arg)
321 unsigned long flags = (
unsigned long) sync_arg;
327 static int vmw_sync_obj_wait(
void *sync_obj,
void *sync_arg,
328 bool lazy,
bool interruptible)
330 unsigned long flags = (
unsigned long) sync_arg;
346 .verify_access = vmw_verify_access,
347 .sync_obj_signaled = vmw_sync_obj_signaled,
348 .sync_obj_wait = vmw_sync_obj_wait,
349 .sync_obj_flush = vmw_sync_obj_flush,
350 .sync_obj_unref = vmw_sync_obj_unref,
351 .sync_obj_ref = vmw_sync_obj_ref,
354 .fault_reserve_notify = &vmw_ttm_fault_reserve_notify,
355 .io_mem_reserve = &vmw_ttm_io_mem_reserve,
356 .io_mem_free = &vmw_ttm_io_mem_free,