Sequence queue error callbacks with queue destroy.

HSA v1.2 update.

Change-Id: I13975e71b2c1ea5b7738236f5d02df84312ad00c
This commit is contained in:
Sean Keely
2018-02-28 05:56:39 -06:00
parent c93584e725
commit 6df9ba97ce
4 changed files with 90 additions and 90 deletions
+7 -2
View File
@@ -204,12 +204,13 @@ class AqlQueue : public core::Queue, private core::LocalSignal, public core::Doo
void CloseRingBufferFD(const char* ring_buf_shm_path, int fd) const;
int CreateRingBufferFD(const char* ring_buf_shm_path, uint32_t ring_buf_phys_size_bytes) const;
static bool DynamicScratchHandler(hsa_signal_value_t error_code, void* arg);
/// @brief Define the Scratch Buffer Descriptor and related parameters
/// that enable kernel access scratch memory
void InitScratchSRD();
/// @brief Handler for hardware queue events.
static bool DynamicScratchHandler(hsa_signal_value_t error_code, void* arg);
// AQL packet ring buffer
void* ring_buf_;
@@ -246,6 +247,10 @@ class AqlQueue : public core::Queue, private core::LocalSignal, public core::Doo
uint32_t pm4_ib_size_b_;
KernelMutex pm4_ib_mutex_;
// Error handler control variable.
std::atomic<uint32_t> dynamicScratchState;
enum { ERROR_HANDLER_DONE = 1, ERROR_HANDLER_TERMINATE = 2 };
// Shared event used for queue errors
static HsaEvent* queue_event_;
+1 -1
View File
@@ -77,7 +77,7 @@ class GpuAgentInt : public core::Agent {
: core::Agent(node_id, core::Agent::DeviceType::kAmdGpuDevice) {}
// @brief Ensure blits are ready (performance hint).
virtual void PreloadBlits(){};
virtual void PreloadBlits() {}
// @brief Initialization hook invoked after tools library has loaded,
// to allow tools interception of interface functions.