Use bind fence atomically
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
parent
0845a3b34b
commit
81609c7695
|
@ -420,6 +420,10 @@ int Drm::queryVmId(uint32_t drmContextId, uint32_t &vmId) {
|
|||
return retVal;
|
||||
}
|
||||
|
||||
std::unique_lock<std::mutex> Drm::lockBindFenceMutex() {
|
||||
return std::unique_lock<std::mutex>(this->bindFenceMutex);
|
||||
}
|
||||
|
||||
int Drm::getEuTotal(int &euTotal) {
|
||||
return getParamIoctl(I915_PARAM_EU_TOTAL, &euTotal);
|
||||
}
|
||||
|
|
|
@ -230,6 +230,8 @@ class Drm : public DriverModel {
|
|||
|
||||
static std::vector<std::unique_ptr<HwDeviceId>> discoverDevices(ExecutionEnvironment &executionEnvironment);
|
||||
|
||||
std::unique_lock<std::mutex> lockBindFenceMutex();
|
||||
|
||||
protected:
|
||||
Drm(std::unique_ptr<HwDeviceIdDrm> hwDeviceIdIn, RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
|
||||
|
@ -275,6 +277,7 @@ class Drm : public DriverModel {
|
|||
TopologyMap topologyMap;
|
||||
std::unordered_map<unsigned long, std::pair<long long, uint64_t>> ioctlStatistics;
|
||||
|
||||
std::mutex bindFenceMutex;
|
||||
std::array<uint64_t, EngineLimits::maxHandleCount> pagingFence;
|
||||
std::array<uint64_t, EngineLimits::maxHandleCount> fenceVal;
|
||||
StackVec<uint32_t, size_t(ResourceClass::MaxSize)> classHandles;
|
||||
|
|
Loading…
Reference in New Issue