From 3b6146e7db4af5b48e04135f88eb72902d664a28 Mon Sep 17 00:00:00 2001 From: Xinmudotmoe Date: Wed, 13 Mar 2024 15:14:58 +0800 Subject: [PATCH] Update doorbell->size to support large default PAGE_SIZE kernels Change-Id: I6fbe10ae3309f2f935d6782366cedb56dc1438c3 Signed-off-by: Xinmudotmoe Signed-off-by: Kent Russell [ROCm/ROCR-Runtime commit: 0c06bec272533ca67e93c0aaf5b8af3b86b946e6] --- projects/rocr-runtime/src/queues.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/rocr-runtime/src/queues.c b/projects/rocr-runtime/src/queues.c index e6e096350d..29bffce03f 100644 --- a/projects/rocr-runtime/src/queues.c +++ b/projects/rocr-runtime/src/queues.c @@ -135,6 +135,10 @@ static void get_doorbell_map_info(uint32_t node_id, doorbell->use_gpuvm = (is_dgpu && gfxv != GFX_VERSION_TONGA); doorbell->size = DOORBELLS_PAGE_SIZE(DOORBELL_SIZE(gfxv)); + if (doorbell->size < (uint32_t) PAGE_SIZE) { + doorbell->size = PAGE_SIZE; + } + return; }