Changeset 89849 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- Jun 23, 2021 9:18:30 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 145306
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevHda.cpp
r89848 r89849 3049 3049 DECLINLINE(VBOXSTRICTRC) hdaWriteReg(PPDMDEVINS pDevIns, PHDASTATE pThis, int idxRegDsc, uint32_t u32Value, char const *pszLog) 3050 3050 { 3051 DEVHDA_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_WRITE);3052 3053 3051 if ( (HDA_REG(pThis, GCTL) & HDA_GCTL_CRST) 3054 3052 || idxRegDsc == HDA_REG_GCTL) … … 3060 3058 g_aHdaRegMap[idxRegDsc].abbrev)); 3061 3059 STAM_COUNTER_INC(&pThis->StatRegWritesBlockedByReset); 3062 3063 DEVHDA_UNLOCK(pDevIns, pThis);3064 3060 return VINF_SUCCESS; 3065 3061 } … … 3086 3082 g_aHdaRegMap[idxRegDsc].abbrev)); 3087 3083 STAM_COUNTER_INC(&pThis->StatRegWritesBlockedByRun); 3088 3089 DEVHDA_UNLOCK(pDevIns, pThis);3090 3084 return VINF_SUCCESS; 3091 3085 } … … 3106 3100 STAM_COUNTER_INC(&pThis->aStatRegWrites[idxRegDsc]); 3107 3101 3108 DEVHDA_UNLOCK(pDevIns, pThis);3109 3102 RT_NOREF(pszLog); 3110 3103 return rc; … … 3162 3155 if (idxRegDsc >= 0 && g_aHdaRegMap[idxRegDsc].size == cb) 3163 3156 { 3157 DEVHDA_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_WRITE); 3158 3164 3159 Log3Func(("@%#05x u%u=%#0*RX64 %s\n", (uint32_t)off, cb * 8, 2 + cb * 2, u64Value, g_aHdaRegMap[idxRegDsc].abbrev)); 3165 3160 rc = hdaWriteReg(pDevIns, pThis, idxRegDsc, u64Value, ""); 3166 3161 Log3Func((" %#x -> %#x\n", u32LogOldValue, idxRegMem != UINT32_MAX ? pThis->au32Regs[idxRegMem] : UINT32_MAX)); 3162 3163 DEVHDA_UNLOCK(pDevIns, pThis); 3167 3164 } 3168 3165 /* … … 3172 3169 && cb < g_aHdaRegMap[idxRegDsc].size) 3173 3170 { 3174 /** @todo r=bird: This is not correctly serialized! Also we're not gaining 3175 * any advantage by not entering the critsect here already, because 3176 * hdaWriteReg will enter it! */ 3171 DEVHDA_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_WRITE); 3172 3177 3173 u64Value |= pThis->au32Regs[g_aHdaRegMap[idxRegDsc].mem_idx] 3178 3174 & g_afMasks[g_aHdaRegMap[idxRegDsc].size] … … 3185 3181 Log4Func((" %#x -> %#x\n", u32LogOldValue, idxRegMem != UINT32_MAX ? pThis->au32Regs[idxRegMem] : UINT32_MAX)); 3186 3182 STAM_COUNTER_INC(&pThis->CTX_SUFF_Z(StatRegSubWrite)); 3183 3184 DEVHDA_UNLOCK(pDevIns, pThis); 3187 3185 } 3188 3186 /* … … 3192 3190 { 3193 3191 #ifdef IN_RING3 3194 /** @todo r=bird: This is not correctly serialized! Also we're not gaining 3195 * much of an advantage by not entering the critsect here already, 3196 * becuase hdaWriteReg will eventually enter it, possibly multiple 3197 * times! The only would be unknown wrights, which should be rare 3198 * and not something we need to optimize for. */ 3192 DEVHDA_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_WRITE); 3193 3199 3194 if (idxRegDsc == -1) 3200 3195 Log4Func(("@%#05x u32=%#010x cb=%d\n", (uint32_t)off, *(uint32_t const *)pv, cb)); … … 3280 3275 } 3281 3276 } 3277 3278 DEVHDA_UNLOCK(pDevIns, pThis); 3282 3279 3283 3280 #else /* !IN_RING3 */
Note:
See TracChangeset
for help on using the changeset viewer.