VirtualBox

Ignore:
Timestamp:
Nov 28, 2013 9:46:38 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
90966
Message:

Additions/x11/vboxvideo: fixes for when DRI fails to initialise.

Location:
trunk/src/VBox/Additions/x11/vboxvideo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/vboxvideo/undefined

    r49628 r49696  
    2828chown
    2929close
     30drmClose
    3031drmFreeVersion
    3132drmGetVersion
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo_dri.c

    r45356 r49696  
    271271        TRACE_LOG("Calling DRIScreenInit\n");
    272272        if (!DRIScreenInit(pScreen, pDRIInfo, &pVBox->drmFD))
     273        {
    273274            rc = FALSE;
    274         if (!rc)
    275275            xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
    276276                       "DRIScreenInit failed, disabling DRI.\n");
     277            if (pVBox->drmFD)
     278            {
     279                drmClose(pVBox->drmFD);
     280                pVBox->drmFD = -1;
     281            }
     282        }
    277283    }
    278284    if (rc && !VBOXInitVisualConfigs(pScrn, pVBox))
     
    282288        rc = FALSE;
    283289    }
    284     xf86DrvMsg(pScrn->scrnIndex, X_INFO, "visual configurations initialized\n");
     290    else
     291        xf86DrvMsg(pScrn->scrnIndex, X_INFO, "visual configurations initialized\n");
    285292
    286293    /* Check the DRM version */
     
    305312    if (!rc)
    306313    {
     314        if (pVBox->drmFD >= 0)
     315           VBOXDRICloseScreen(pScreen, pVBox);
     316        pVBox->drmFD = -1;
    307317        if (pVBox->pDRIInfo)
    308318            DRIDestroyInfoRec(pVBox->pDRIInfo);
    309319        pVBox->pDRIInfo = NULL;
    310         if (pVBox->drmFD >= 0)
    311            VBOXDRICloseScreen(pScreen, pVBox);
    312         pVBox->drmFD = -1;
    313320    }
    314321    TRACE_LOG("returning %s\n", BOOL_STR(rc));
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette