VirtualBox

Changeset 69847 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 27, 2017 6:01:05 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
119288
Message:

Devices/Graphics: reverted r119268, not entirely correct.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp

    r69837 r69847  
    12781278    }
    12791279
     1280    if (!pVdma->CrSrvInfo.pfnEnable)
     1281    {
     1282# ifdef DEBUG_misha
     1283        WARN(("pfnEnable is NULL\n"));
     1284        return VERR_NOT_SUPPORTED;
     1285# endif
     1286    }
     1287
    12801288    int rc = VBoxVBVAExHSEnable(&pVdma->CmdVbva, pVBVA);
    12811289    if (RT_SUCCESS(rc))
    12821290    {
    1283         if (!pVdma->CrSrvInfo.hSvr)
    1284         {
    1285             /* "HGCM-less" mode. All inited. */
    1286             return VINF_SUCCESS;
    1287         }
    1288 
    12891291        VBOXCRCMDCTL_DISABLE Disable;
    12901292        Disable.Hdr.enmType = VBOXCRCMDCTL_TYPE_DISABLE;
     
    13281330    }
    13291331
    1330     if (!pVdma->CrSrvInfo.hSvr)
    1331     {
    1332         /* "HGCM-less" mode. Just undo what vdmaVBVAEnableProcess did. */
    1333         VBoxVBVAExHSDisable(&pVdma->CmdVbva);
    1334         return VINF_SUCCESS;
    1335     }
    1336 
    13371332    int rc = pVdma->CrSrvInfo.pfnDisable(pVdma->CrSrvInfo.hSvr);
    13381333    if (RT_SUCCESS(rc))
     
    13791374                return VERR_INVALID_STATE;
    13801375            }
    1381             if (!pVdma->CrSrvInfo.hSvr)
    1382             {
    1383                 /* Should not be. */
    1384                 WARN(("VBVAEXHOSTCTL_TYPE_GHH_BE_OPAQUE for HGCM-less mode\n"));
    1385                 return VERR_INVALID_STATE;
    1386             }
    13871376            return pVdma->CrSrvInfo.pfnHostCtl(pVdma->CrSrvInfo.hSvr, pCmd->u.cmd.pu8Cmd, pCmd->u.cmd.cbCmd);
    13881377        }
     
    14291418            VGA_SAVED_STATE_PUT_MARKER(pCmd->u.state.pSSM, 4);
    14301419
    1431             if (!pVdma->CrSrvInfo.hSvr)
    1432             {
    1433                 /* Done. */
    1434                 return VINF_SUCCESS;
    1435             }
    1436 
    14371420            return pVdma->CrSrvInfo.pfnSaveState(pVdma->CrSrvInfo.hSvr, pCmd->u.state.pSSM);
    14381421        }
     
    14501433
    14511434            VGA_SAVED_STATE_GET_MARKER_RETURN_ON_MISMATCH(pCmd->u.state.pSSM, pCmd->u.state.u32Version, 4);
    1452             if (!pVdma->CrSrvInfo.hSvr)
    1453             {
    1454                 /* Done. */
    1455                 return VINF_SUCCESS;
    1456             }
    1457 
    14581435            rc = pVdma->CrSrvInfo.pfnLoadState(pVdma->CrSrvInfo.hSvr, pCmd->u.state.pSSM, pCmd->u.state.u32Version);
    14591436            if (RT_FAILURE(rc))
     
    15721549    ASMBitClearRange(aTargetMap, pVGAState->cMonitors, VBOX_VIDEO_MAX_SCREENS);
    15731550
    1574     if (pVdma->CrSrvInfo.hSvr)
    1575     {
    1576         /* Also inform the HGCM service, if it is there. */
    1577         rc = pVdma->CrSrvInfo.pfnResize(pVdma->CrSrvInfo.hSvr, &Screen, aTargetMap);
    1578         if (RT_FAILURE(rc))
    1579         {
    1580             WARN(("pfnResize failed %d\n", rc));
    1581             return rc;
    1582         }
     1551    rc = pVdma->CrSrvInfo.pfnResize(pVdma->CrSrvInfo.hSvr, &Screen, aTargetMap);
     1552    if (RT_FAILURE(rc))
     1553    {
     1554        WARN(("pfnResize failed %d\n", rc));
     1555        return rc;
    15831556    }
    15841557
     
    16411614            {
    16421615                WARN(("VBVAEXHOSTCTL_TYPE_GHH_BE_OPAQUE for disabled vdma VBVA\n"));
    1643                 return VERR_INVALID_STATE;
    1644             }
    1645             if (!pVdma->CrSrvInfo.hSvr)
    1646             {
    1647                 /* Unexpected. */
    1648                 WARN(("VBVAEXHOSTCTL_TYPE_GHH_BE_OPAQUE in HGCM-less mode\n"));
    16491616                return VERR_INVALID_STATE;
    16501617            }
     
    19281895        }
    19291896        default:
    1930             if (!pVdma->CrSrvInfo.hSvr)
    1931             {
    1932                 /* Unexpected. */
    1933                 WARN(("no HGCM"));
    1934                 return -1;
    1935             }
    19361897            return pVdma->CrSrvInfo.pfnCmd(pVdma->CrSrvInfo.hSvr, pCmd, cbCmd);
    19371898    }
     
    28392800                {
    28402801                    pVGAState->pVdma = pVdma;
    2841 
    2842                     /* No HGCM service if VMSVGA is enabled. */
    2843                     if (!pVGAState->fVMSVGAEnabled)
    2844                     {
    2845                         int rcIgnored = vboxVDMACrCtlHgsmiSetup(pVdma); NOREF(rcIgnored); /** @todo is this ignoring intentional? */
    2846                     }
     2802                    int rcIgnored = vboxVDMACrCtlHgsmiSetup(pVdma); NOREF(rcIgnored); /** @todo is this ignoring intentional? */
    28472803                    return VINF_SUCCESS;
    28482804                }
     
    28872843        return VINF_SUCCESS;
    28882844#ifdef VBOX_WITH_CRHGSMI
    2889     if (pVdma->pVGAState->fVMSVGAEnabled)
    2890         VBoxVBVAExHSDisable(&pVdma->CmdVbva);
    2891     else
    2892     {
    2893         /** @todo Remove. It does nothing because pVdma->CmdVbva is already disabled at this point
    2894          *        as the result of the SharedOpenGL HGCM service unloading.
    2895          */
    2896         vdmaVBVACtlDisableSync(pVdma);
    2897     }
     2845    vdmaVBVACtlDisableSync(pVdma);
    28982846    VBoxVDMAThreadCleanup(&pVdma->Thread);
    28992847    VBoxVBVAExHSTerm(&pVdma->CmdVbva);
Note: See TracChangeset for help on using the changeset viewer.

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