2020-01-16 00:02:47 +08:00
|
|
|
/*
|
2021-04-14 22:40:23 +08:00
|
|
|
* Copyright (C) 2020-2021 Intel Corporation
|
2020-01-16 00:02:47 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/direct_submission/direct_submission_hw.h"
|
2020-01-16 00:02:47 +08:00
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
2020-03-27 03:13:10 +08:00
|
|
|
template <typename GfxFamily, typename Dispatcher>
|
|
|
|
class DrmDirectSubmission : public DirectSubmissionHw<GfxFamily, Dispatcher> {
|
2020-01-16 00:02:47 +08:00
|
|
|
public:
|
2020-03-27 03:13:10 +08:00
|
|
|
using DirectSubmissionHw<GfxFamily, Dispatcher>::ringCommandStream;
|
|
|
|
using DirectSubmissionHw<GfxFamily, Dispatcher>::switchRingBuffersAllocations;
|
2020-01-16 00:02:47 +08:00
|
|
|
|
|
|
|
DrmDirectSubmission(Device &device,
|
|
|
|
OsContext &osContext);
|
|
|
|
|
2020-07-17 17:28:59 +08:00
|
|
|
~DrmDirectSubmission();
|
|
|
|
|
2020-01-16 00:02:47 +08:00
|
|
|
protected:
|
2020-07-17 17:28:59 +08:00
|
|
|
bool allocateOsResources() override;
|
2020-01-16 00:02:47 +08:00
|
|
|
bool submit(uint64_t gpuAddress, size_t size) override;
|
|
|
|
|
|
|
|
bool handleResidency() override;
|
2021-04-14 22:40:23 +08:00
|
|
|
bool isNewResourceHandleNeeded();
|
|
|
|
void handleNewResourcesSubmission() override;
|
|
|
|
size_t getSizeNewResourceHandler() override;
|
2021-08-25 23:19:44 +08:00
|
|
|
void handleStopRingBuffer() override;
|
2020-07-17 17:28:59 +08:00
|
|
|
void handleSwitchRingBuffers() override;
|
2020-01-16 00:02:47 +08:00
|
|
|
uint64_t updateTagValue() override;
|
|
|
|
void getTagAddressValue(TagData &tagData) override;
|
2020-08-07 16:57:53 +08:00
|
|
|
|
|
|
|
void wait(uint32_t taskCountToWait);
|
|
|
|
|
|
|
|
TagData currentTagData;
|
|
|
|
volatile uint32_t *tagAddress;
|
2020-01-16 00:02:47 +08:00
|
|
|
};
|
|
|
|
} // namespace NEO
|