Changeset 34188 in vbox for trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp
- Timestamp:
- Nov 18, 2010 9:47:50 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp
r34182 r34188 83 83 PHGSMIINSTANCE pHgsmi; 84 84 PVGASTATE pVGAState; 85 bool bEnabled;86 85 #ifdef VBOX_VDMA_WITH_WORKERTHREAD 87 86 VBOXVDMAPIPE Pipe; … … 203 202 } 204 203 205 static int vboxVDMACrCtlHgsmiSetup Async(struct VBOXVDMAHOST *pVdma)204 static int vboxVDMACrCtlHgsmiSetup(struct VBOXVDMAHOST *pVdma) 206 205 { 207 206 PVBOXVDMACMD_CHROMIUM_CTL_CRHGSMI_SETUP pCmd = (PVBOXVDMACMD_CHROMIUM_CTL_CRHGSMI_SETUP)vboxVDMACrCtlCreate( … … 211 210 PVGASTATE pVGAState = pVdma->pVGAState; 212 211 pCmd->pvRamBase = pVGAState->vram_ptrR3; 213 int rc = vboxVDMACrCtlPostAsync(pVGAState, &pCmd->Hdr, vboxVDMACrCtlCbReleaseCmd, NULL); 214 #ifdef DEBUG_misha 212 int rc = vboxVDMACrCtlPost(pVGAState, &pCmd->Hdr); 215 213 AssertRC(rc); 216 #endif217 #if 0218 214 if (RT_SUCCESS(rc)) 219 215 { … … 221 217 } 222 218 vboxVDMACrCtlRelease(&pCmd->Hdr); 223 #endif224 219 return rc; 225 220 } … … 1072 1067 #endif 1073 1068 1074 int vboxVDMAConstruct(PVGASTATE pVGAState, struct VBOXVDMAHOST **ppVdma,uint32_t cPipeElements)1069 int vboxVDMAConstruct(PVGASTATE pVGAState, uint32_t cPipeElements) 1075 1070 { 1076 1071 int rc; … … 1108 1103 # endif 1109 1104 #endif 1110 *ppVdma = pVdma; 1105 pVGAState->pVdma = pVdma; 1106 #ifdef VBOX_WITH_CRHGSMI 1107 rc = vboxVDMACrCtlHgsmiSetup(pVdma); 1108 # ifdef DEBUG_misha 1109 AssertRC(rc); 1110 # endif 1111 #endif 1111 1112 return VINF_SUCCESS; 1112 1113 #ifdef VBOX_VDMA_WITH_WORKERTHREAD … … 1168 1169 int vboxVDMASaveStateExecPrep(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM) 1169 1170 { 1171 #ifdef VBOX_WITH_CRHGSMI 1170 1172 PVGASTATE pVGAState = pVdma->pVGAState; 1171 1173 PVBOXVDMACMD_CHROMIUM_CTL pCmd = (PVBOXVDMACMD_CHROMIUM_CTL)vboxVDMACrCtlCreate( … … 1176 1178 int rc = vboxVDMACrCtlPost(pVGAState, pCmd); 1177 1179 AssertRC(rc); 1180 if (RT_SUCCESS(rc)) 1181 { 1182 rc = vboxVDMACrCtlGetRc(pCmd); 1183 } 1184 vboxVDMACrCtlRelease(pCmd); 1178 1185 return rc; 1179 1186 } 1180 1187 return VERR_NO_MEMORY; 1188 #else 1189 return VINF_SUCCESS; 1190 #endif 1181 1191 } 1182 1192 1183 1193 int vboxVDMASaveStateExecDone(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM) 1184 1194 { 1195 #ifdef VBOX_WITH_CRHGSMI 1185 1196 PVGASTATE pVGAState = pVdma->pVGAState; 1186 1197 PVBOXVDMACMD_CHROMIUM_CTL pCmd = (PVBOXVDMACMD_CHROMIUM_CTL)vboxVDMACrCtlCreate( … … 1191 1202 int rc = vboxVDMACrCtlPost(pVGAState, pCmd); 1192 1203 AssertRC(rc); 1204 if (RT_SUCCESS(rc)) 1205 { 1206 rc = vboxVDMACrCtlGetRc(pCmd); 1207 } 1208 vboxVDMACrCtlRelease(pCmd); 1193 1209 return rc; 1194 1210 } 1195 1211 return VERR_NO_MEMORY; 1212 #else 1213 return VINF_SUCCESS; 1214 #endif 1196 1215 } 1197 1216 … … 1205 1224 { 1206 1225 case VBOXVDMA_CTL_TYPE_ENABLE: 1207 {1208 pVdma->bEnabled = true;1209 1226 pCmd->i32Result = VINF_SUCCESS; 1210 #ifdef VBOX_WITH_CRHGSMI1211 /* @todo: use async completion to ensure we notify a status to guest */1212 int tmpRc = vboxVDMACrCtlHgsmiSetupAsync(pVdma);1213 AssertRC(tmpRc);1214 #endif1215 }1216 1227 break; 1217 1228 case VBOXVDMA_CTL_TYPE_DISABLE: 1218 pVdma->bEnabled = false;1219 1229 pCmd->i32Result = VINF_SUCCESS; 1220 1230 break; … … 1299 1309 AssertRC(tmpRc); 1300 1310 } 1301 1302 bool vboxVDMAIsEnabled(PVBOXVDMAHOST pVdma)1303 {1304 return pVdma->bEnabled;1305 }
Note:
See TracChangeset
for help on using the changeset viewer.