Skip to content

Commit

Permalink
Merge pull request #127 from RadeonOpenCompute/rocm-4.5.x
Browse files Browse the repository at this point in the history
ROCm 4.5.2 updates
  • Loading branch information
skeelyamd authored Dec 10, 2021
2 parents fc99cf8 + f95a101 commit b3df226
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/inc/amd_blit_sdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class BlitSdma : public BlitSdmaBase {

void BuildGetGlobalTimestampCommand(char* cmd_addr, void* write_address);

void BuildTrapCommand(char* cmd_addr);
void BuildTrapCommand(char* cmd_addr, uint32_t event_id);

void BuildGCRCommand(char* cmd_addr, bool invalidate);

Expand Down
5 changes: 3 additions & 2 deletions src/core/runtime/amd_blit_sdma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ hsa_status_t BlitSdma<RingIndexTy, HwIndexMonotonic, SizeToCountOffset, useGCR>:
static_cast<uint32_t>(out_signal.signal_.event_id));
command_addr += fence_command_size_;

BuildTrapCommand(command_addr);
BuildTrapCommand(command_addr, out_signal.signal_.event_id);
}

ReleaseWriteAddress(curr_index, total_command_size);
Expand Down Expand Up @@ -911,13 +911,14 @@ void BlitSdma<RingIndexTy, HwIndexMonotonic, SizeToCountOffset,

template <typename RingIndexTy, bool HwIndexMonotonic, int SizeToCountOffset, bool useGCR>
void BlitSdma<RingIndexTy, HwIndexMonotonic, SizeToCountOffset, useGCR>::BuildTrapCommand(
char* cmd_addr) {
char* cmd_addr, uint32_t event_id) {
SDMA_PKT_TRAP* packet_addr =
reinterpret_cast<SDMA_PKT_TRAP*>(cmd_addr);

memset(packet_addr, 0, sizeof(SDMA_PKT_TRAP));

packet_addr->HEADER_UNION.op = SDMA_OP_TRAP;
packet_addr->INT_CONTEXT_UNION.int_ctx = event_id;
}

template <typename RingIndexTy, bool HwIndexMonotonic, int SizeToCountOffset, bool useGCR>
Expand Down

0 comments on commit b3df226

Please sign in to comment.