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