SWDEV-301667 - Fix SDMA mask reuse

If we are using the mask returned by getLastUsedSdmaEngine() then we
need to apply the SDMA Read/Write mask to it before using with HSA
copy_on_engine API.

Change-Id: I6e5dc6c187eeb3c61ee159e9d2a0fa7b4737c06e


[ROCm/clr commit: 3f0bcf7834]
This commit is contained in:
Saleel Kudchadker
2024-04-05 02:02:55 +00:00
orang tua 7cc5dd56ab
melakukan 4285981222
4 mengubah file dengan 15 tambahan dan 2 penghapusan
@@ -3473,6 +3473,12 @@ uint32_t Device::fetchSDMAMask(const device::BlitManager* handle, bool readEngin
return (readEngine ? maxSdmaReadMask_ : maxSdmaWriteMask_) & engine;
}
// ================================================================================================
void Device::getSdmaRWMasks(uint32_t* readMask, uint32_t* writeMask) const {
*readMask = maxSdmaReadMask_;
*writeMask = maxSdmaWriteMask_;
}
// ================================================================================================
void Device::resetSDMAMask(const device::BlitManager* handle) const {
amd::ScopedLock lock(vgpusAccess());