TBX csr downloads allocations on queryStatus calls

Change-Id: I57fd98f4227b6d03430db6b96cfd21dd726919a3
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2020-05-13 11:25:29 +02:00
committed by sys_ocldev
parent f3cb94c491
commit ac426b5108
17 changed files with 200 additions and 134 deletions

View File

@@ -32,6 +32,7 @@ class TbxCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
uint32_t getMaskAndValueForPollForCompletion() const;
bool getpollNotEqualValueForPollForCompletion() const;
void flushSubmissionsAndDownloadAllocations();
MOCKABLE_VIRTUAL void downloadAllocation(GraphicsAllocation &gfxAllocation);
public:
using CommandStreamReceiverSimulatedCommonHw<GfxFamily>::initAdditionalMMIO;
@@ -44,7 +45,7 @@ class TbxCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
void waitForTaskCountWithKmdNotifyFallback(uint32_t taskCountToWait, FlushStamp flushStampToWait, bool useQuickKmdSleep, bool forcePowerSavingMode) override;
bool waitForCompletionWithTimeout(bool enableTimeout, int64_t timeoutMicroseconds, uint32_t taskCountToWait) override;
void downloadAllocation(GraphicsAllocation &gfxAllocation) override;
void downloadAllocations() override;
void processEviction() override;
void processResidency(const ResidencyContainer &allocationsForResidency, uint32_t handleId) override;

View File

@@ -519,6 +519,14 @@ void TbxCommandStreamReceiverHw<GfxFamily>::downloadAllocation(GraphicsAllocatio
}
}
template <typename GfxFamily>
void TbxCommandStreamReceiverHw<GfxFamily>::downloadAllocations() {
downloadAllocation(*this->getTagAllocation());
for (GraphicsAllocation *graphicsAllocation : this->allocationsForDownload) {
downloadAllocation(*graphicsAllocation);
}
}
template <typename GfxFamily>
uint32_t TbxCommandStreamReceiverHw<GfxFamily>::getMaskAndValueForPollForCompletion() const {
return 0x100;