Lines Matching refs:vbox
82 struct vbox_private *vbox = fb->dev->dev_private;
86 LogFunc(("vboxvideo: %d: fb=%p, cRects=%u, vbox=%p\n", __LINE__, fb,
87 cRects, vbox));
88 spin_lock_irqsave(&vbox->dev_lock, flags);
95 struct VBVABUFFER *pVBVA = vbox->paVBVACtx[iCrtc].pVBVA;
100 pVBVA = (struct VBVABUFFER *) ( ((uint8_t *)vbox->vram)
101 + vbox->vram_size
103 if (!VBoxVBVAEnable(&vbox->paVBVACtx[iCrtc], &vbox->Ctx, pVBVA, iCrtc))
118 if (VBoxVBVABufferBeginUpdate(&vbox->paVBVACtx[iCrtc],
119 &vbox->Ctx))
121 VBoxVBVAWrite(&vbox->paVBVACtx[iCrtc], &vbox->Ctx, &cmdHdr,
123 VBoxVBVABufferEndUpdate(&vbox->paVBVACtx[iCrtc]);
127 spin_unlock_irqrestore(&vbox->dev_lock, flags);
222 static int vbox_vbva_init(struct vbox_private *vbox)
226 LogFunc(("vboxvideo: %d: vbox=%p, vbox->cCrtcs=%u, vbox->paVBVACtx=%p\n",
227 __LINE__, vbox, (unsigned)vbox->cCrtcs, vbox->paVBVACtx));
228 if (!vbox->paVBVACtx)
230 vbox->paVBVACtx = kzalloc( sizeof(struct VBVABUFFERCONTEXT)
231 * vbox->cCrtcs,
233 if (!vbox->paVBVACtx)
237 vbox->vram_size -= vbox->cCrtcs * VBVA_MIN_BUFFER_SIZE;
238 for (i = 0; i < vbox->cCrtcs; ++i)
239 VBoxVBVASetupBufferContext(&vbox->paVBVACtx[i],
240 vbox->vram_size + i * VBVA_MIN_BUFFER_SIZE,
242 LogFunc(("vboxvideo: %d: vbox->paVBVACtx=%p, vbox->vram_size=%u\n",
243 __LINE__, vbox->paVBVACtx, (unsigned)vbox->vram_size));
300 struct vbox_private *vbox;
307 vbox = kzalloc(sizeof(struct vbox_private), GFP_KERNEL);
308 if (!vbox)
311 dev->dev_private = vbox;
312 vbox->dev = dev;
314 spin_lock_init(&vbox->dev_lock);
316 vbox->vram = pci_iomap(dev->pdev, 0, 0);
317 if (!vbox->vram)
322 vbox->full_vram_size = VBoxVideoGetVRAMSize();
323 vbox->fAnyX = VBoxVideoAnyWidthAllowed();
324 DRM_INFO("VRAM %08x\n", vbox->full_vram_size);
326 ret = setupAcceleration(vbox, &offBase);
330 ret = vbox_mm_init(vbox);
350 LogFunc(("vboxvideo: %d: vbox=%p, vbox->vram=%p, vbox->full_vram_size=%u\n",
351 __LINE__, vbox, vbox->vram, (unsigned)vbox->full_vram_size));
354 if (vbox->vram)
355 pci_iounmap(dev->pdev, vbox->vram);
356 kfree(vbox);
364 struct vbox_private *vbox = dev->dev_private;
372 disableVBVA(vbox);
373 vbox_mm_fini(vbox);
374 pci_iounmap(dev->pdev, vbox->vram);
375 kfree(vbox);