Refactor tag update for stop ring buffer

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2021-08-25 15:19:44 +00:00
committed by Compute-Runtime-Automation
parent 42524b6bef
commit 8d60fb2a07
6 changed files with 23 additions and 7 deletions

View File

@@ -29,6 +29,7 @@ class DrmDirectSubmission : public DirectSubmissionHw<GfxFamily, Dispatcher> {
bool isNewResourceHandleNeeded();
void handleNewResourcesSubmission() override;
size_t getSizeNewResourceHandler() override;
void handleStopRingBuffer() override;
void handleSwitchRingBuffers() override;
uint64_t updateTagValue() override;
void getTagAddressValue(TagData &tagData) override;

View File

@@ -34,13 +34,8 @@ DrmDirectSubmission<GfxFamily, Dispatcher>::DrmDirectSubmission(Device &device,
template <typename GfxFamily, typename Dispatcher>
inline DrmDirectSubmission<GfxFamily, Dispatcher>::~DrmDirectSubmission() {
if (this->ringStart) {
this->stopRingBuffer();
if (this->disableMonitorFence) {
this->currentTagData.tagValue++;
}
this->wait(static_cast<uint32_t>(this->currentTagData.tagValue));
}
this->stopRingBuffer();
this->wait(static_cast<uint32_t>(this->currentTagData.tagValue));
this->deallocateResources();
}
@@ -130,6 +125,13 @@ size_t DrmDirectSubmission<GfxFamily, Dispatcher>::getSizeNewResourceHandler() {
return size;
}
template <typename GfxFamily, typename Dispatcher>
void DrmDirectSubmission<GfxFamily, Dispatcher>::handleStopRingBuffer() {
if (this->disableMonitorFence) {
this->currentTagData.tagValue++;
}
}
template <typename GfxFamily, typename Dispatcher>
void DrmDirectSubmission<GfxFamily, Dispatcher>::handleSwitchRingBuffers() {
if (this->disableMonitorFence) {