2019-02-07 13:21:58 +01:00
|
|
|
/*
|
2022-07-06 17:44:49 +00:00
|
|
|
* Copyright (C) 2019-2022 Intel Corporation
|
2019-02-07 13:21:58 +01:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "third_party/aub_stream/headers/aub_manager.h"
|
|
|
|
#include "third_party/aub_stream/headers/hardware_context.h"
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2019-02-12 11:31:19 +01:00
|
|
|
class OsContext;
|
2019-02-07 13:21:58 +01:00
|
|
|
|
|
|
|
class HardwareContextController {
|
|
|
|
public:
|
|
|
|
HardwareContextController() = delete;
|
2019-03-19 12:52:45 +01:00
|
|
|
HardwareContextController(aub_stream::AubManager &aubManager, OsContext &osContext, uint32_t flags);
|
2019-02-07 13:21:58 +01:00
|
|
|
|
|
|
|
void initialize();
|
|
|
|
void pollForCompletion();
|
|
|
|
void expectMemory(uint64_t gfxAddress, const void *srcAddress, size_t length, uint32_t compareOperation);
|
2019-10-17 11:32:55 +02:00
|
|
|
void submit(uint64_t batchBufferGpuAddress, const void *batchBuffer, size_t batchBufferSize, uint32_t memoryBank, uint64_t entryBits, bool overrideRingHead);
|
2021-02-16 10:20:34 +00:00
|
|
|
void writeMemory(aub_stream::AllocationParams &allocationParams);
|
2021-02-22 12:02:08 +00:00
|
|
|
void writeMMIO(uint32_t offset, uint32_t value);
|
2019-02-07 13:21:58 +01:00
|
|
|
|
|
|
|
void dumpBufferBIN(uint64_t gfxAddress, size_t size);
|
2019-04-05 00:33:09 +02:00
|
|
|
void dumpSurface(const aub_stream::SurfaceInfo &surfaceInfo);
|
2019-02-07 13:21:58 +01:00
|
|
|
void readMemory(uint64_t gfxAddress, void *memory, size_t size, uint32_t memoryBanks, size_t pageSize);
|
|
|
|
|
|
|
|
std::vector<std::unique_ptr<aub_stream::HardwareContext>> hardwareContexts;
|
|
|
|
};
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|