Skip to content

Commit cec481b

Browse files
author
Baraldi, Giovanni
authored
Fix 32bit wrap to att buffer size (#176)
Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com> Everything but PSDB passed. I'm force merging because 1) this is a minor change and 2) PSDBs seem broken now, they are stuck and pointing to the wrong location: http://rocm-ci.amd.com/job/compute-psdb-staging-profiler-emu/435/
1 parent 0bb1a61 commit cec481b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

gfxip/gfx10/gfx10_primitives.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ class gfx10_cntx_prim {
618618

619619
// Indicates the size of buffer to use per Shader Engine instance.
620620
// The size is specified in terms of 4KB blocks
621-
static uint32_t sqtt_buffer_size_value(uint32_t size_val, uint32_t base_hi) {
621+
static uint32_t sqtt_buffer_size_value(uint64_t size_val, uint32_t base_hi) {
622622
#if SQTT_PRIM_ENABLED
623623
uint32_t size{0};
624624
size = SET_REG_FIELD_BITS(SQ_THREAD_TRACE_BUF0_SIZE, SIZE, size_val >> TT_BUFF_ALIGN_SHIFT) |

gfxip/gfx11/gfx11_primitives.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ class gfx11_cntx_prim {
639639

640640
// Indicates the size of buffer to use per Shader Engine instance.
641641
// The size is specified in terms of 4KB blocks
642-
static uint32_t sqtt_buffer_size_value(uint32_t size_val, uint32_t base_hi) {
642+
static uint32_t sqtt_buffer_size_value(uint64_t size_val, uint32_t base_hi) {
643643
#if SQTT_PRIM_ENABLED
644644
uint32_t sq_thread_trace_buf0_size =
645645
SET_REG_FIELD_BITS(SQ_THREAD_TRACE_BUF0_SIZE, SIZE, size_val >> TT_BUFF_ALIGN_SHIFT) |

gfxip/gfx12/gfx12_primitives.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ class gfx12_cntx_prim {
560560

561561
// Indicates the size of buffer to use per Shader Engine instance.
562562
// The size is specified in terms of 4KB blocks
563-
static uint32_t sqtt_buffer0_size_value(uint32_t size_val) {
563+
static uint32_t sqtt_buffer0_size_value(uint64_t size_val) {
564564
uint32_t sq_thread_trace_buf0_size{0};
565565
sq_thread_trace_buf0_size =
566566
SET_REG_FIELD_BITS(SQ_THREAD_TRACE_BUF0_SIZE, SIZE, size_val >> TT_BUFF_ALIGN_SHIFT);

gfxip/gfx9/gfx9_primitives.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ class gfx9_cntx_prim {
683683

684684
// Indicates the size of buffer to use per Shader Engine instance.
685685
// The size is specified in terms of 4KB blocks
686-
static uint32_t sqtt_buffer_size_value(uint32_t size_val, uint32_t base_hi) {
686+
static uint32_t sqtt_buffer_size_value(uint64_t size_val, uint32_t base_hi) {
687687
uint32_t sq_thread_trace_size =
688688
SET_REG_FIELD_BITS(SQ_THREAD_TRACE_SIZE, SIZE, (size_val >> TT_BUFF_ALIGN_SHIFT));
689689
return sq_thread_trace_size;

0 commit comments

Comments
 (0)