mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
fix: signal notify field before KMD wait
Related-To: NEO-13870 Currently all monitor fences are triggering interrupt due to Notify Enable field. With this change, such field is programmed right before KMD wait. Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
fffe8f8027
commit
ff4da67979
@@ -96,7 +96,7 @@ class DirectSubmissionHw {
|
||||
return relaxedOrderingEnabled;
|
||||
}
|
||||
|
||||
virtual void flushMonitorFence(){};
|
||||
virtual void flushMonitorFence(bool notifyKmd){};
|
||||
|
||||
QueueThrottle getLastSubmittedThrottle() {
|
||||
return this->lastSubmittedThrottle;
|
||||
@@ -263,5 +263,6 @@ class DirectSubmissionHw {
|
||||
bool relaxedOrderingInitialized = false;
|
||||
bool relaxedOrderingSchedulerRequired = false;
|
||||
bool inputMonitorFenceDispatchRequirement = true;
|
||||
bool notifyKmdDuringMonitorFence = false;
|
||||
};
|
||||
} // namespace NEO
|
||||
|
||||
@@ -531,7 +531,7 @@ bool DirectSubmissionHw<GfxFamily, Dispatcher>::stopRingBuffer(bool blocking) {
|
||||
if (disableMonitorFence) {
|
||||
TagData currentTagData = {};
|
||||
getTagAddressValue(currentTagData);
|
||||
Dispatcher::dispatchMonitorFence(ringCommandStream, currentTagData.tagAddress, currentTagData.tagValue, this->rootDeviceEnvironment, this->partitionedMode, this->dcFlushRequired);
|
||||
Dispatcher::dispatchMonitorFence(ringCommandStream, currentTagData.tagAddress, currentTagData.tagValue, this->rootDeviceEnvironment, this->partitionedMode, this->dcFlushRequired, this->notifyKmdDuringMonitorFence);
|
||||
}
|
||||
Dispatcher::dispatchStopCommandBuffer(ringCommandStream);
|
||||
|
||||
@@ -618,7 +618,7 @@ inline void DirectSubmissionHw<GfxFamily, Dispatcher>::dispatchSwitchRingBufferS
|
||||
if (disableMonitorFence) {
|
||||
TagData currentTagData = {};
|
||||
getTagAddressValue(currentTagData);
|
||||
Dispatcher::dispatchMonitorFence(ringCommandStream, currentTagData.tagAddress, currentTagData.tagValue, this->rootDeviceEnvironment, this->partitionedMode, this->dcFlushRequired);
|
||||
Dispatcher::dispatchMonitorFence(ringCommandStream, currentTagData.tagAddress, currentTagData.tagValue, this->rootDeviceEnvironment, this->partitionedMode, this->dcFlushRequired, this->notifyKmdDuringMonitorFence);
|
||||
}
|
||||
Dispatcher::dispatchStartCommandBuffer(ringCommandStream, nextBufferGpuAddress);
|
||||
}
|
||||
@@ -767,7 +767,7 @@ void *DirectSubmissionHw<GfxFamily, Dispatcher>::dispatchWorkloadSection(BatchBu
|
||||
if (dispatchMonitorFence) {
|
||||
TagData currentTagData = {};
|
||||
getTagAddressValue(currentTagData);
|
||||
Dispatcher::dispatchMonitorFence(ringCommandStream, currentTagData.tagAddress, currentTagData.tagValue, this->rootDeviceEnvironment, this->partitionedMode, this->dcFlushRequired);
|
||||
Dispatcher::dispatchMonitorFence(ringCommandStream, currentTagData.tagAddress, currentTagData.tagValue, this->rootDeviceEnvironment, this->partitionedMode, this->dcFlushRequired, this->notifyKmdDuringMonitorFence);
|
||||
}
|
||||
|
||||
dispatchSemaphoreSection(currentQueueWorkCount + 1);
|
||||
|
||||
@@ -24,7 +24,8 @@ class BlitterDispatcher : public Dispatcher<GfxFamily> {
|
||||
uint64_t immediateData,
|
||||
const RootDeviceEnvironment &rootDeviceEnvironment,
|
||||
bool partitionedWorkload,
|
||||
bool dcFlushRequired);
|
||||
bool dcFlushRequired,
|
||||
bool notifyKmd);
|
||||
static size_t getSizeMonitorFence(const RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
|
||||
static void dispatchCacheFlush(LinearStream &cmdBuffer, const RootDeviceEnvironment &rootDeviceEnvironment, uint64_t address);
|
||||
|
||||
@@ -29,11 +29,12 @@ inline void BlitterDispatcher<GfxFamily>::dispatchMonitorFence(LinearStream &cmd
|
||||
uint64_t immediateData,
|
||||
const RootDeviceEnvironment &rootDeviceEnvironment,
|
||||
bool partitionedWorkload,
|
||||
bool dcFlushRequired) {
|
||||
bool dcFlushRequired,
|
||||
bool notifyKmd) {
|
||||
NEO::EncodeDummyBlitWaArgs waArgs{false, const_cast<RootDeviceEnvironment *>(&rootDeviceEnvironment)};
|
||||
MiFlushArgs args{waArgs};
|
||||
args.commandWithPostSync = true;
|
||||
args.notifyEnable = true;
|
||||
args.notifyEnable = notifyKmd;
|
||||
|
||||
EncodeMiFlushDW<GfxFamily>::programWithWa(cmdBuffer, gpuAddress, immediateData, args);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@ class RenderDispatcher : public Dispatcher<GfxFamily> {
|
||||
uint64_t immediateData,
|
||||
const RootDeviceEnvironment &rootDeviceEnvironment,
|
||||
bool partitionedWorkload,
|
||||
bool dcFlushRequired);
|
||||
bool dcFlushRequired,
|
||||
bool notifyKmd);
|
||||
static size_t getSizeMonitorFence(const RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
|
||||
static void dispatchCacheFlush(LinearStream &cmdBuffer, const RootDeviceEnvironment &rootDeviceEnvironment, uint64_t address);
|
||||
|
||||
@@ -30,11 +30,12 @@ inline void RenderDispatcher<GfxFamily>::dispatchMonitorFence(LinearStream &cmdB
|
||||
uint64_t immediateData,
|
||||
const RootDeviceEnvironment &rootDeviceEnvironment,
|
||||
bool partitionedWorkload,
|
||||
bool dcFlushRequired) {
|
||||
bool dcFlushRequired,
|
||||
bool notifyKmd) {
|
||||
PipeControlArgs args;
|
||||
args.dcFlushEnable = dcFlushRequired;
|
||||
args.workloadPartitionOffset = partitionedWorkload;
|
||||
args.notifyEnable = true;
|
||||
args.notifyEnable = notifyKmd;
|
||||
args.textureCacheInvalidationEnable = true;
|
||||
|
||||
MemorySynchronizationCommands<GfxFamily>::addBarrierWithPostSyncOperation(
|
||||
|
||||
@@ -90,6 +90,7 @@ DrmDirectSubmission<GfxFamily, Dispatcher>::DrmDirectSubmission(const DirectSubm
|
||||
}
|
||||
}
|
||||
}
|
||||
this->notifyKmdDuringMonitorFence = true;
|
||||
}
|
||||
|
||||
template <typename GfxFamily, typename Dispatcher>
|
||||
|
||||
@@ -24,7 +24,7 @@ class WddmDirectSubmission : public DirectSubmissionHw<GfxFamily, Dispatcher> {
|
||||
|
||||
~WddmDirectSubmission() override;
|
||||
|
||||
void flushMonitorFence() override;
|
||||
void flushMonitorFence(bool notifyKmd) override;
|
||||
void unblockPagingFenceSemaphore(uint64_t pagingFenceValue) override;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -54,7 +54,7 @@ WddmDirectSubmission<GfxFamily, Dispatcher>::~WddmDirectSubmission() {
|
||||
}
|
||||
|
||||
template <typename GfxFamily, typename Dispatcher>
|
||||
inline void WddmDirectSubmission<GfxFamily, Dispatcher>::flushMonitorFence() {
|
||||
inline void WddmDirectSubmission<GfxFamily, Dispatcher>::flushMonitorFence(bool notifyKmd) {
|
||||
auto needStart = !this->ringStart;
|
||||
|
||||
size_t requiredMinimalSize = this->getSizeSemaphoreSection(false) +
|
||||
@@ -70,7 +70,7 @@ inline void WddmDirectSubmission<GfxFamily, Dispatcher>::flushMonitorFence() {
|
||||
|
||||
TagData currentTagData = {};
|
||||
this->getTagAddressValue(currentTagData);
|
||||
Dispatcher::dispatchMonitorFence(this->ringCommandStream, currentTagData.tagAddress, currentTagData.tagValue, this->rootDeviceEnvironment, this->partitionedMode, this->dcFlushRequired);
|
||||
Dispatcher::dispatchMonitorFence(this->ringCommandStream, currentTagData.tagAddress, currentTagData.tagValue, this->rootDeviceEnvironment, this->partitionedMode, this->dcFlushRequired, notifyKmd);
|
||||
|
||||
this->dispatchSemaphoreSection(this->currentQueueWorkCount + 1);
|
||||
this->submitCommandBufferToGpu(needStart, startVA, requiredMinimalSize, true, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user