Lines Matching refs:bochs
29 static int bochs_ttm_global_init(struct bochs_device *bochs) in bochs_ttm_global_init() argument
34 global_ref = &bochs->ttm.mem_global_ref; in bochs_ttm_global_init()
46 bochs->ttm.bo_global_ref.mem_glob = in bochs_ttm_global_init()
47 bochs->ttm.mem_global_ref.object; in bochs_ttm_global_init()
48 global_ref = &bochs->ttm.bo_global_ref.ref; in bochs_ttm_global_init()
56 drm_global_item_unref(&bochs->ttm.mem_global_ref); in bochs_ttm_global_init()
63 static void bochs_ttm_global_release(struct bochs_device *bochs) in bochs_ttm_global_release() argument
65 if (bochs->ttm.mem_global_ref.release == NULL) in bochs_ttm_global_release()
68 drm_global_item_unref(&bochs->ttm.bo_global_ref.ref); in bochs_ttm_global_release()
69 drm_global_item_unref(&bochs->ttm.mem_global_ref); in bochs_ttm_global_release()
70 bochs->ttm.mem_global_ref.release = NULL; in bochs_ttm_global_release()
138 struct bochs_device *bochs = bochs_bdev(bdev); in bochs_ttm_io_mem_reserve() local
153 mem->bus.base = bochs->fb_base; in bochs_ttm_io_mem_reserve()
217 int bochs_mm_init(struct bochs_device *bochs) in bochs_mm_init() argument
219 struct ttm_bo_device *bdev = &bochs->ttm.bdev; in bochs_mm_init()
222 ret = bochs_ttm_global_init(bochs); in bochs_mm_init()
226 ret = ttm_bo_device_init(&bochs->ttm.bdev, in bochs_mm_init()
227 bochs->ttm.bo_global_ref.ref.object, in bochs_mm_init()
229 bochs->dev->anon_inode->i_mapping, in bochs_mm_init()
238 bochs->fb_size >> PAGE_SHIFT); in bochs_mm_init()
244 bochs->ttm.initialized = true; in bochs_mm_init()
248 void bochs_mm_fini(struct bochs_device *bochs) in bochs_mm_fini() argument
250 if (!bochs->ttm.initialized) in bochs_mm_fini()
253 ttm_bo_device_release(&bochs->ttm.bdev); in bochs_mm_fini()
254 bochs_ttm_global_release(bochs); in bochs_mm_fini()
255 bochs->ttm.initialized = false; in bochs_mm_fini()
339 struct bochs_device *bochs; in bochs_mmap() local
345 bochs = file_priv->minor->dev->dev_private; in bochs_mmap()
346 return ttm_bo_mmap(filp, vma, &bochs->ttm.bdev); in bochs_mmap()
354 struct bochs_device *bochs = dev->dev_private; in bochs_bo_create() local
369 bochsbo->bo.bdev = &bochs->ttm.bdev; in bochs_bo_create()
374 acc_size = ttm_bo_dma_acc_size(&bochs->ttm.bdev, size, in bochs_bo_create()
377 ret = ttm_bo_init(&bochs->ttm.bdev, &bochsbo->bo, size, in bochs_bo_create()