Lines Matching refs:vbox

70  * Adds the vbox memory manager object/structures to the global memory manager.
72 static int vbox_ttm_global_init(struct vbox_private *vbox)
77 global_ref = &vbox->ttm.mem_global_ref;
90 vbox->ttm.bo_global_ref.mem_glob =
91 vbox->ttm.mem_global_ref.object;
92 global_ref = &vbox->ttm.bo_global_ref.ref;
101 drm_global_item_unref(&vbox->ttm.mem_global_ref);
108 * Removes the vbox memory manager object from the global memory manager.
111 vbox_ttm_global_release(struct vbox_private *vbox)
113 if (vbox->ttm.mem_global_ref.release == NULL)
116 drm_global_item_unref(&vbox->ttm.bo_global_ref.ref);
117 drm_global_item_unref(&vbox->ttm.mem_global_ref);
118 vbox->ttm.mem_global_ref.release = NULL;
186 struct vbox_private *vbox = vbox_bdev(bdev);
202 mem->bus.base = pci_resource_start(vbox->dev->pdev, 0);
280 int vbox_mm_init(struct vbox_private *vbox)
283 struct drm_device *dev = vbox->dev;
284 struct ttm_bo_device *bdev = &vbox->ttm.bdev;
286 ret = vbox_ttm_global_init(vbox);
290 ret = ttm_bo_device_init(&vbox->ttm.bdev,
291 vbox->ttm.bo_global_ref.ref.object,
305 vbox->vram_size >> PAGE_SHIFT);
313 vbox->fb_mtrr = drm_mtrr_add(pci_resource_start(dev->pdev, 0),
317 vbox->fb_mtrr = arch_phys_wc_add(pci_resource_start(dev->pdev, 0),
324 void vbox_mm_fini(struct vbox_private *vbox)
326 struct drm_device *dev = vbox->dev;
327 ttm_bo_device_release(&vbox->ttm.bdev);
329 vbox_ttm_global_release(vbox);
331 if (vbox->fb_mtrr >= 0)
334 drm_mtrr_del(vbox->fb_mtrr,
338 arch_phys_wc_del(vbox->fb_mtrr);
340 vbox->fb_mtrr = -1;
383 struct vbox_private *vbox = dev->dev_private;
399 vboxbo->bo.bdev = &vbox->ttm.bdev;
406 acc_size = ttm_bo_dma_acc_size(&vbox->ttm.bdev, size,
409 ret = ttm_bo_init(&vbox->ttm.bdev, &vboxbo->bo, size,
471 /* Move a vbox-owned buffer object to system memory if no one else has it
505 struct vbox_private *vbox;
511 vbox = file_priv->minor->dev->dev_private;
512 return ttm_bo_mmap(filp, vma, &vbox->ttm.bdev);