mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
Fixed crash in direct submission dtor
Crash on an attempt to read from tag address when ring is not started Related-to: NEO-5869 Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
68aea5bf62
commit
88121a6f24
@@ -61,7 +61,7 @@ class DirectSubmissionHw {
|
||||
|
||||
bool initialize(bool submitOnInit);
|
||||
|
||||
bool stopRingBuffer();
|
||||
MOCKABLE_VIRTUAL bool stopRingBuffer();
|
||||
|
||||
bool startRingBuffer();
|
||||
|
||||
@@ -73,7 +73,7 @@ class DirectSubmissionHw {
|
||||
static constexpr size_t prefetchSize = 8 * MemoryConstants::cacheLineSize;
|
||||
static constexpr size_t prefetchNoops = prefetchSize / sizeof(uint32_t);
|
||||
bool allocateResources();
|
||||
void deallocateResources();
|
||||
MOCKABLE_VIRTUAL void deallocateResources();
|
||||
MOCKABLE_VIRTUAL bool makeResourcesResident(DirectSubmissionAllocations &allocations);
|
||||
virtual bool allocateOsResources() = 0;
|
||||
virtual bool submit(uint64_t gpuAddress, size_t size) = 0;
|
||||
|
||||
@@ -34,7 +34,7 @@ class DrmDirectSubmission : public DirectSubmissionHw<GfxFamily, Dispatcher> {
|
||||
uint64_t updateTagValue() override;
|
||||
void getTagAddressValue(TagData &tagData) override;
|
||||
|
||||
void wait(uint32_t taskCountToWait);
|
||||
MOCKABLE_VIRTUAL void wait(uint32_t taskCountToWait);
|
||||
|
||||
TagData currentTagData;
|
||||
volatile uint32_t *tagAddress;
|
||||
|
||||
@@ -50,8 +50,10 @@ DrmDirectSubmission<GfxFamily, Dispatcher>::DrmDirectSubmission(Device &device,
|
||||
|
||||
template <typename GfxFamily, typename Dispatcher>
|
||||
inline DrmDirectSubmission<GfxFamily, Dispatcher>::~DrmDirectSubmission() {
|
||||
this->stopRingBuffer();
|
||||
this->wait(static_cast<uint32_t>(this->currentTagData.tagValue));
|
||||
if (this->ringStart) {
|
||||
this->stopRingBuffer();
|
||||
this->wait(static_cast<uint32_t>(this->currentTagData.tagValue));
|
||||
}
|
||||
this->deallocateResources();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user