2020-01-15 17:02:47 +01:00
|
|
|
/*
|
2022-04-07 13:03:01 +00:00
|
|
|
* Copyright (C) 2020-2022 Intel Corporation
|
2020-01-15 17:02:47 +01:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/direct_submission/direct_submission_hw.h"
|
2020-01-15 17:02:47 +01:00
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
|
2020-03-26 20:13:10 +01:00
|
|
|
template <typename GfxFamily, typename Dispatcher>
|
|
|
|
|
class DrmDirectSubmission : public DirectSubmissionHw<GfxFamily, Dispatcher> {
|
2020-01-15 17:02:47 +01:00
|
|
|
public:
|
2020-03-26 20:13:10 +01:00
|
|
|
using DirectSubmissionHw<GfxFamily, Dispatcher>::ringCommandStream;
|
|
|
|
|
using DirectSubmissionHw<GfxFamily, Dispatcher>::switchRingBuffersAllocations;
|
2020-01-15 17:02:47 +01:00
|
|
|
|
2022-04-20 13:55:31 +00:00
|
|
|
DrmDirectSubmission(const DirectSubmissionInputParams &inputParams);
|
2020-01-15 17:02:47 +01:00
|
|
|
|
2022-05-09 17:40:30 +00:00
|
|
|
~DrmDirectSubmission() override;
|
2020-07-17 11:28:59 +02:00
|
|
|
|
2022-11-22 13:53:59 +00:00
|
|
|
TaskCountType *getCompletionValuePointer() override;
|
2022-04-26 13:29:31 +00:00
|
|
|
|
2020-01-15 17:02:47 +01:00
|
|
|
protected:
|
2020-07-17 11:28:59 +02:00
|
|
|
bool allocateOsResources() override;
|
2020-01-15 17:02:47 +01:00
|
|
|
bool submit(uint64_t gpuAddress, size_t size) override;
|
|
|
|
|
|
|
|
|
|
bool handleResidency() override;
|
2021-04-14 14:40:23 +00:00
|
|
|
bool isNewResourceHandleNeeded();
|
|
|
|
|
void handleNewResourcesSubmission() override;
|
|
|
|
|
size_t getSizeNewResourceHandler() override;
|
2021-08-25 15:19:44 +00:00
|
|
|
void handleStopRingBuffer() override;
|
2020-07-17 11:28:59 +02:00
|
|
|
void handleSwitchRingBuffers() override;
|
2020-01-15 17:02:47 +01:00
|
|
|
uint64_t updateTagValue() override;
|
|
|
|
|
void getTagAddressValue(TagData &tagData) override;
|
2022-06-01 10:05:07 +00:00
|
|
|
bool isCompleted(uint32_t ringBufferIndex) override;
|
2022-07-05 10:25:16 +00:00
|
|
|
bool isCompletionFenceSupported();
|
2020-08-07 10:57:53 +02:00
|
|
|
|
2022-11-22 13:53:59 +00:00
|
|
|
MOCKABLE_VIRTUAL void wait(TaskCountType taskCountToWait);
|
2020-08-07 10:57:53 +02:00
|
|
|
|
2022-04-20 17:32:39 +00:00
|
|
|
TagData currentTagData{};
|
2022-11-22 13:53:59 +00:00
|
|
|
volatile TagAddressType *tagAddress;
|
|
|
|
|
TaskCountType completionFenceValue{};
|
2020-01-15 17:02:47 +01:00
|
|
|
};
|
|
|
|
|
} // namespace NEO
|