Files
compute-runtime/shared/source/direct_submission/linux/drm_direct_submission.h
Lukasz Jobczyk e70f441f52 fix: Idle gpu before invalidate aux table
Related-To: NEO-8067

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-07-05 13:51:27 +02:00

46 lines
1.3 KiB
C++

/*
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/direct_submission/direct_submission_hw.h"
namespace NEO {
template <typename GfxFamily, typename Dispatcher>
class DrmDirectSubmission : public DirectSubmissionHw<GfxFamily, Dispatcher> {
public:
using DirectSubmissionHw<GfxFamily, Dispatcher>::ringCommandStream;
using DirectSubmissionHw<GfxFamily, Dispatcher>::switchRingBuffersAllocations;
DrmDirectSubmission(const DirectSubmissionInputParams &inputParams);
~DrmDirectSubmission() override;
TaskCountType *getCompletionValuePointer() override;
protected:
bool allocateOsResources() override;
bool submit(uint64_t gpuAddress, size_t size) override;
bool handleResidency() override;
void handleStopRingBuffer() override;
void ensureRingCompletion() override;
void handleSwitchRingBuffers() override;
uint64_t updateTagValue() override;
void getTagAddressValue(TagData &tagData) override;
bool isCompleted(uint32_t ringBufferIndex) override;
bool isCompletionFenceSupported();
MOCKABLE_VIRTUAL void wait(TaskCountType taskCountToWait);
TagData currentTagData{};
volatile TagAddressType *tagAddress;
TaskCountType completionFenceValue{};
};
} // namespace NEO