Lines Matching defs:vXvMC
125 initViaXvMC(ViaXvMCPtr vXvMC)
130 vXvMC->contexts[i] = 0;
131 vXvMC->cPrivs[i] = 0;
135 vXvMC->surfaces[i] = 0;
136 vXvMC->sPrivs[i] = 0;
141 cleanupViaXvMC(ViaXvMCPtr vXvMC, XF86VideoAdaptorPtr * XvAdaptors,
147 vXvMC->contexts[i] = 0;
148 if (vXvMC->cPrivs[i]) {
149 free(vXvMC->cPrivs[i]);
150 vXvMC->cPrivs[i] = 0;
155 vXvMC->surfaces[i] = 0;
156 if (vXvMC->sPrivs[i]) {
157 free(vXvMC->sPrivs[i]);
158 vXvMC->sPrivs[i] = 0;
316 ViaXvMCPtr vXvMC = &(pVia->xvmc);
351 vXvMC->mmioBase = pVia->registerHandle;
356 &(vXvMC->fbBase)) < 0) {
362 initViaXvMC(vXvMC);
368 drmRmMap(pVia->drmmode.fd, vXvMC->fbBase);
391 vXvMC->activePorts = 0;
407 ViaXvMCPtr vXvMC = &(pVia->xvmc);
412 drmRmMap(pVia->drmmode.fd, vXvMC->mmioBase);
413 cleanupViaXvMC(vXvMC, XvAdaptors, XvAdaptorCount);
434 ViaXvMCPtr vXvMC = &(pVia->xvmc);
448 vx->xvmc_port = (vXvMC->activePorts++);
453 if (vXvMC->nContexts >= VIA_XVMC_MAX_CONTEXTS) {
470 if (0 == vXvMC->contexts[ctxNo])
487 contextRec->fbOffset = vXvMC->fbBase;
489 contextRec->mmioOffset = vXvMC->mmioBase;
507 vXvMC->nContexts++;
508 vXvMC->contexts[ctxNo] = pContext->context_id;
509 vXvMC->cPrivs[ctxNo] = cPriv;
519 ViaXvMCPtr vXvMC = &(pVia->xvmc);
526 if (VIA_XVMC_MAX_SURFACES == vXvMC->nSurfaces) {
577 if (0 == vXvMC->sPrivs[srfNo])
610 vXvMC->sPrivs[srfNo] = sPriv;
611 vXvMC->surfaces[srfNo] = pSurf->surface_id;
612 vXvMC->nSurfaces++;
621 ViaXvMCPtr vXvMC = &(pVia->xvmc);
627 if (VIA_XVMC_MAX_SURFACES == vXvMC->nSurfaces) {
655 if (0 == vXvMC->sPrivs[srfNo])
673 vXvMC->sPrivs[srfNo] = sPriv;
674 vXvMC->surfaces[srfNo] = pSubp->subpicture_id;
675 vXvMC->nSurfaces++;
684 ViaXvMCPtr vXvMC = &(pVia->xvmc);
692 if (vXvMC->contexts[i] == pContext->context_id) {
703 free(vXvMC->cPrivs[i]);
704 vXvMC->cPrivs[i] = 0;
705 vXvMC->nContexts--;
706 vXvMC->contexts[i] = 0;
717 ViaXvMCPtr vXvMC = &(pVia->xvmc);
726 if (vXvMC->surfaces[i] == pSurf->surface_id) {
736 drm_bo_free(pScrn, vXvMC->sPrivs[i]->memory_ref);
737 free(vXvMC->sPrivs[i]);
738 vXvMC->nSurfaces--;
739 vXvMC->sPrivs[i] = 0;
740 vXvMC->surfaces[i] = 0;
751 ViaXvMCPtr vXvMC = &(pVia->xvmc);
760 if (vXvMC->surfaces[i] == pSubp->subpicture_id) {
778 drm_bo_free(pScrn, vXvMC->sPrivs[i]->memory_ref);
779 free(vXvMC->sPrivs[i]);
780 vXvMC->nSurfaces--;
781 vXvMC->sPrivs[i] = 0;
782 vXvMC->surfaces[i] = 0;