Disable GEM_WAIT when new residency model available

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2021-04-29 08:58:16 +00:00
committed by Compute-Runtime-Automation
parent 3dbe37c423
commit 8e1e213bcf
23 changed files with 119 additions and 45 deletions

View File

@@ -43,7 +43,7 @@ class DrmCommandStreamReceiver : public DeviceCommandStreamReceiver<GfxFamily> {
MOCKABLE_VIRTUAL void processResidency(const ResidencyContainer &allocationsForResidency, uint32_t handleId) override;
void makeNonResident(GraphicsAllocation &gfxAllocation) override;
bool waitForFlushStamp(FlushStamp &flushStampToWait) override;
bool isAnyDirectSubmissionActive() override;
bool isNewResidencyModelActive() override;
DrmMemoryManager *getMemoryManager() const;
GmmPageTableMngr *createPageTableManager() override;

View File

@@ -82,12 +82,14 @@ bool DrmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer, Reside
memoryOperationsInterface->mergeWithResidencyContainer(this->osContext, allocationsForResidency);
if (this->directSubmission.get()) {
if (this->drm->isVmBindAvailable()) {
memoryOperationsInterface->makeResidentWithinOsContext(this->osContext, ArrayRef<GraphicsAllocation *>(&batchBuffer.commandBufferAllocation, 1), true);
}
if (this->directSubmission.get()) {
return this->directSubmission->dispatchCommandBuffer(batchBuffer, *this->flushStamp.get());
}
if (this->blitterDirectSubmission.get()) {
memoryOperationsInterface->makeResidentWithinOsContext(this->osContext, ArrayRef<GraphicsAllocation *>(&batchBuffer.commandBufferAllocation, 1), true);
return this->blitterDirectSubmission->dispatchCommandBuffer(batchBuffer, *this->flushStamp.get());
}
@@ -200,8 +202,8 @@ bool DrmCommandStreamReceiver<GfxFamily>::waitForFlushStamp(FlushStamp &flushSta
}
template <typename GfxFamily>
bool DrmCommandStreamReceiver<GfxFamily>::isAnyDirectSubmissionActive() {
return this->drm->isDirectSubmissionActive();
bool DrmCommandStreamReceiver<GfxFamily>::isNewResidencyModelActive() {
return this->drm->isVmBindAvailable();
}
} // namespace NEO