Move KMD Notify logic from CSR to specialized helper

- Decission about timeout enabling and value moved out of CSR
- Timeout multiplier is no longer Linux specific

Change-Id: I6858fe2f811ef13802b95e0470e310210a9dea8b
This commit is contained in:
Dunajski, Bartosz
2018-04-09 10:05:32 +02:00
committed by sys_ocldev
parent 10ada58bd6
commit 87f8f735f9
10 changed files with 63 additions and 53 deletions

View File

@@ -67,7 +67,6 @@ class DrmCommandStreamReceiver : public DeviceCommandStreamReceiver<GfxFamily> {
protected:
void makeResident(BufferObject *bo);
void programVFEState(LinearStream &csr, DispatchFlags &dispatchFlags) override;
int64_t computeTimeoutMultiplier(bool useQuickKmdSleep, uint32_t taskCountToWait) const override;
std::vector<BufferObject *> residency;
std::vector<drm_i915_gem_exec_object2> execObjectsStorage;

View File

@@ -191,12 +191,4 @@ inline void DrmCommandStreamReceiver<GfxFamily>::programVFEState(LinearStream &c
}
}
template <typename GfxFamily>
inline int64_t DrmCommandStreamReceiver<GfxFamily>::computeTimeoutMultiplier(bool useQuickKmdSleep, uint32_t taskCountToWait) const {
auto currentHwTag = *getTagAddress();
if (currentHwTag >= taskCountToWait || useQuickKmdSleep) {
return 1u;
}
return static_cast<int64_t>(taskCountToWait - currentHwTag);
}
} // namespace OCLRT