<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div>Yeah that's an unfortunate mismatch.</div>
<div>Leave it then. We can always clean it up later if theres a strong preference to do so.</div>
<div><br>
</div>
<div>Jon</div>
<br>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Huang, JinHuiEric <JinHuiEric.Huang@amd.com><br>
<b>Sent:</b> Friday, July 7, 2023 8:25 PM<br>
<b>To:</b> Kim, Jonathan <Jonathan.Kim@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Subject:</b> Re: [PATCH 1/4] drm/amdkfd: add kfd2kgd debugger callbacks for GC v9.4.3</font>
<div> </div>
</div>
<div>Thanks for your review. The prefix name change will be contradictory that new functions prefix name is different with existing functions prefix name. Are you sure it doesn't matter?<br>
<br>
Regards,<br>
Eric<br>
<br>
<div class="x_moz-cite-prefix">On 2023-07-07 19:52, Kim, Jonathan wrote:<br>
</div>
<blockquote type="cite">
<div>I would change the static prefix names from kgd_gfx_ to kgd_gc_ to match file name and specify it as the target GC version.</div>
<div><br>
</div>
<div>With that fixed and assuming grace period instance fix ups will follow after, this patch and series is:</div>
<div><br>
</div>
<div>Reviewed-by: Jonathan Kim <a class="x_moz-txt-link-rfc2396E" href="mailto:jonathan.kim@amd.com">
<jonathan.kim@amd.com></a></div>
<br>
<br>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Huang, JinHuiEric
<a class="x_moz-txt-link-rfc2396E" href="mailto:JinHuiEric.Huang@amd.com"><JinHuiEric.Huang@amd.com></a><br>
<b>Sent:</b> Friday, July 7, 2023 1:46 PM<br>
<b>To:</b> <a class="x_moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">
amd-gfx@lists.freedesktop.org</a> <a class="x_moz-txt-link-rfc2396E" href="mailto:amd-gfx@lists.freedesktop.org">
<amd-gfx@lists.freedesktop.org></a><br>
<b>Cc:</b> Kim, Jonathan <a class="x_moz-txt-link-rfc2396E" href="mailto:Jonathan.Kim@amd.com">
<Jonathan.Kim@amd.com></a>; Kim, Jonathan <a class="x_moz-txt-link-rfc2396E" href="mailto:Jonathan.Kim@amd.com">
<Jonathan.Kim@amd.com></a>; Huang, JinHuiEric <a class="x_moz-txt-link-rfc2396E" href="mailto:JinHuiEric.Huang@amd.com">
<JinHuiEric.Huang@amd.com></a><br>
<b>Subject:</b> [PATCH 1/4] drm/amdkfd: add kfd2kgd debugger callbacks for GC v9.4.3</font>
<div> </div>
</div>
<div class="x_BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="x_PlainText">From: Jonathan Kim <a class="x_moz-txt-link-rfc2396E" href="mailto:jonathan.kim@amd.com">
<jonathan.kim@amd.com></a><br>
<br>
Implement the similarities as GC v9.4.2, and the difference<br>
for GC v9.4.3 HW spec, i.e. xcc instance.<br>
<br>
Signed-off-by: Jonathan Kim <a class="x_moz-txt-link-rfc2396E" href="mailto:jonathan.kim@amd.com">
<jonathan.kim@amd.com></a><br>
Signed-off-by: Eric Huang <a class="x_moz-txt-link-rfc2396E" href="mailto:jinhuieric.huang@amd.com">
<jinhuieric.huang@amd.com></a><br>
---<br>
.../drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c | 8 +-<br>
.../drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.h | 27 +++<br>
.../drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c | 166 +++++++++++++++++-<br>
.../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c | 3 +-<br>
.../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.h | 6 +-<br>
.../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c | 3 +-<br>
.../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 3 +-<br>
.../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.h | 3 +-<br>
drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 3 +-<br>
.../gpu/drm/amd/include/kgd_kfd_interface.h | 3 +-<br>
10 files changed, 213 insertions(+), 12 deletions(-)<br>
create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.h<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c<br>
index 60f9e027fb66..a06a99c5d311 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c<br>
@@ -23,6 +23,7 @@<br>
#include "amdgpu_amdkfd.h"<br>
#include "amdgpu_amdkfd_arcturus.h"<br>
#include "amdgpu_amdkfd_gfx_v9.h"<br>
+#include "amdgpu_amdkfd_aldebaran.h"<br>
#include "gc/gc_9_4_2_offset.h"<br>
#include "gc/gc_9_4_2_sh_mask.h"<br>
#include <uapi/linux/kfd_ioctl.h><br>
@@ -36,7 +37,7 @@<br>
* initialize the debug mode registers after it has disabled GFX off during the<br>
* debug session.<br>
*/<br>
-static uint32_t kgd_aldebaran_enable_debug_trap(struct amdgpu_device *adev,<br>
+uint32_t kgd_aldebaran_enable_debug_trap(struct amdgpu_device *adev,<br>
bool restore_dbg_registers,<br>
uint32_t vmid)<br>
{<br>
@@ -107,7 +108,7 @@ static uint32_t kgd_aldebaran_set_wave_launch_trap_override(struct amdgpu_device<br>
return data;<br>
}<br>
<br>
-static uint32_t kgd_aldebaran_set_wave_launch_mode(struct amdgpu_device *adev,<br>
+uint32_t kgd_aldebaran_set_wave_launch_mode(struct amdgpu_device *adev,<br>
uint8_t wave_launch_mode,<br>
uint32_t vmid)<br>
{<br>
@@ -125,7 +126,8 @@ static uint32_t kgd_gfx_aldebaran_set_address_watch(<br>
uint32_t watch_address_mask,<br>
uint32_t watch_id,<br>
uint32_t watch_mode,<br>
- uint32_t debug_vmid)<br>
+ uint32_t debug_vmid,<br>
+ uint32_t inst )<br>
{<br>
uint32_t watch_address_high;<br>
uint32_t watch_address_low;<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.h<br>
new file mode 100644<br>
index 000000000000..a7bdaf8d82dd<br>
--- /dev/null<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.h<br>
@@ -0,0 +1,27 @@<br>
+/*<br>
+ * Copyright 2023 Advanced Micro Devices, Inc.<br>
+ *<br>
+ * Permission is hereby granted, free of charge, to any person obtaining a<br>
+ * copy of this software and associated documentation files (the "Software"),<br>
+ * to deal in the Software without restriction, including without limitation<br>
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,<br>
+ * and/or sell copies of the Software, and to permit persons to whom the<br>
+ * Software is furnished to do so, subject to the following conditions:<br>
+ *<br>
+ * The above copyright notice and this permission notice shall be included in<br>
+ * all copies or substantial portions of the Software.<br>
+ *<br>
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br>
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br>
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL<br>
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR<br>
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,<br>
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR<br>
+ * OTHER DEALINGS IN THE SOFTWARE.<br>
+ */<br>
+uint32_t kgd_aldebaran_enable_debug_trap(struct amdgpu_device *adev,<br>
+ bool restore_dbg_registers,<br>
+ uint32_t vmid);<br>
+uint32_t kgd_aldebaran_set_wave_launch_mode(struct amdgpu_device *adev,<br>
+ uint8_t wave_launch_mode,<br>
+ uint32_t vmid);<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c<br>
index 5b4b7f8b92a5..543405a28b19 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c<br>
@@ -22,6 +22,7 @@<br>
#include "amdgpu.h"<br>
#include "amdgpu_amdkfd.h"<br>
#include "amdgpu_amdkfd_gfx_v9.h"<br>
+#include "amdgpu_amdkfd_aldebaran.h"<br>
#include "gc/gc_9_4_3_offset.h"<br>
#include "gc/gc_9_4_3_sh_mask.h"<br>
#include "athub/athub_1_8_0_offset.h"<br>
@@ -32,6 +33,7 @@<br>
#include "soc15.h"<br>
#include "sdma/sdma_4_4_2_offset.h"<br>
#include "sdma/sdma_4_4_2_sh_mask.h"<br>
+#include <uapi/linux/kfd_ioctl.h><br>
<br>
static inline struct v9_sdma_mqd *get_sdma_mqd(void *mqd)<br>
{<br>
@@ -361,6 +363,156 @@ static int kgd_gfx_v9_4_3_hqd_load(struct amdgpu_device *adev, void *mqd,<br>
return 0;<br>
}<br>
<br>
+/* returns TRAP_EN, EXCP_EN and EXCP_REPLACE. */<br>
+static uint32_t kgd_gfx_v9_4_3_disable_debug_trap(struct amdgpu_device *adev,<br>
+ bool keep_trap_enabled,<br>
+ uint32_t vmid)<br>
+{<br>
+ uint32_t data = 0;<br>
+<br>
+ data = REG_SET_FIELD(data, SPI_GDBG_PER_VMID_CNTL, TRAP_EN, 1);<br>
+ data = REG_SET_FIELD(data, SPI_GDBG_PER_VMID_CNTL, EXCP_EN, 0);<br>
+ data = REG_SET_FIELD(data, SPI_GDBG_PER_VMID_CNTL, EXCP_REPLACE, 0);<br>
+<br>
+ return data;<br>
+}<br>
+<br>
+static int kgd_gfx_v9_4_3_validate_trap_override_request(<br>
+ struct amdgpu_device *adev,<br>
+ uint32_t trap_override,<br>
+ uint32_t *trap_mask_supported)<br>
+{<br>
+ *trap_mask_supported &= KFD_DBG_TRAP_MASK_FP_INVALID |<br>
+ KFD_DBG_TRAP_MASK_FP_INPUT_DENORMAL |<br>
+ KFD_DBG_TRAP_MASK_FP_DIVIDE_BY_ZERO |<br>
+ KFD_DBG_TRAP_MASK_FP_OVERFLOW |<br>
+ KFD_DBG_TRAP_MASK_FP_UNDERFLOW |<br>
+ KFD_DBG_TRAP_MASK_FP_INEXACT |<br>
+ KFD_DBG_TRAP_MASK_INT_DIVIDE_BY_ZERO |<br>
+ KFD_DBG_TRAP_MASK_DBG_ADDRESS_WATCH |<br>
+ KFD_DBG_TRAP_MASK_DBG_MEMORY_VIOLATION |<br>
+ KFD_DBG_TRAP_MASK_TRAP_ON_WAVE_START |<br>
+ KFD_DBG_TRAP_MASK_TRAP_ON_WAVE_END;<br>
+<br>
+ if (trap_override != KFD_DBG_TRAP_OVERRIDE_OR &&<br>
+ trap_override != KFD_DBG_TRAP_OVERRIDE_REPLACE)<br>
+ return -EPERM;<br>
+<br>
+ return 0;<br>
+}<br>
+<br>
+static uint32_t trap_mask_map_sw_to_hw(uint32_t mask)<br>
+{<br>
+ uint32_t trap_on_start = (mask & KFD_DBG_TRAP_MASK_TRAP_ON_WAVE_START) ? 1 : 0;<br>
+ uint32_t trap_on_end = (mask & KFD_DBG_TRAP_MASK_TRAP_ON_WAVE_END) ? 1 : 0;<br>
+ uint32_t excp_en = mask & (KFD_DBG_TRAP_MASK_FP_INVALID |<br>
+ KFD_DBG_TRAP_MASK_FP_INPUT_DENORMAL |<br>
+ KFD_DBG_TRAP_MASK_FP_DIVIDE_BY_ZERO |<br>
+ KFD_DBG_TRAP_MASK_FP_OVERFLOW |<br>
+ KFD_DBG_TRAP_MASK_FP_UNDERFLOW |<br>
+ KFD_DBG_TRAP_MASK_FP_INEXACT |<br>
+ KFD_DBG_TRAP_MASK_INT_DIVIDE_BY_ZERO |<br>
+ KFD_DBG_TRAP_MASK_DBG_ADDRESS_WATCH |<br>
+ KFD_DBG_TRAP_MASK_DBG_MEMORY_VIOLATION);<br>
+ uint32_t ret;<br>
+<br>
+ ret = REG_SET_FIELD(0, SPI_GDBG_PER_VMID_CNTL, EXCP_EN, excp_en);<br>
+ ret = REG_SET_FIELD(ret, SPI_GDBG_PER_VMID_CNTL, TRAP_ON_START, trap_on_start);<br>
+ ret = REG_SET_FIELD(ret, SPI_GDBG_PER_VMID_CNTL, TRAP_ON_END, trap_on_end);<br>
+<br>
+ return ret;<br>
+}<br>
+<br>
+static uint32_t trap_mask_map_hw_to_sw(uint32_t mask)<br>
+{<br>
+ uint32_t ret = REG_GET_FIELD(mask, SPI_GDBG_PER_VMID_CNTL, EXCP_EN);<br>
+<br>
+ if (REG_GET_FIELD(mask, SPI_GDBG_PER_VMID_CNTL, TRAP_ON_START))<br>
+ ret |= KFD_DBG_TRAP_MASK_TRAP_ON_WAVE_START;<br>
+<br>
+ if (REG_GET_FIELD(mask, SPI_GDBG_PER_VMID_CNTL, TRAP_ON_END))<br>
+ ret |= KFD_DBG_TRAP_MASK_TRAP_ON_WAVE_END;<br>
+<br>
+ return ret;<br>
+}<br>
+<br>
+/* returns TRAP_EN, EXCP_EN and EXCP_REPLACE. */<br>
+static uint32_t kgd_gfx_v9_4_3_set_wave_launch_trap_override(<br>
+ struct amdgpu_device *adev,<br>
+ uint32_t vmid,<br>
+ uint32_t trap_override,<br>
+ uint32_t trap_mask_bits,<br>
+ uint32_t trap_mask_request,<br>
+ uint32_t *trap_mask_prev,<br>
+ uint32_t kfd_dbg_trap_cntl_prev)<br>
+<br>
+{<br>
+ uint32_t data = 0;<br>
+<br>
+ *trap_mask_prev = trap_mask_map_hw_to_sw(kfd_dbg_trap_cntl_prev);<br>
+<br>
+ data = (trap_mask_bits & trap_mask_request) |<br>
+ (*trap_mask_prev & ~trap_mask_request);<br>
+ data = trap_mask_map_sw_to_hw(data);<br>
+<br>
+ data = REG_SET_FIELD(data, SPI_GDBG_PER_VMID_CNTL, TRAP_EN, 1);<br>
+ data = REG_SET_FIELD(data, SPI_GDBG_PER_VMID_CNTL, EXCP_REPLACE, trap_override);<br>
+<br>
+ return data;<br>
+}<br>
+<br>
+#define TCP_WATCH_STRIDE (regTCP_WATCH1_ADDR_H - regTCP_WATCH0_ADDR_H)<br>
+static uint32_t kgd_gfx_v9_4_3_set_address_watch(<br>
+ struct amdgpu_device *adev,<br>
+ uint64_t watch_address,<br>
+ uint32_t watch_address_mask,<br>
+ uint32_t watch_id,<br>
+ uint32_t watch_mode,<br>
+ uint32_t debug_vmid,<br>
+ uint32_t inst)<br>
+{<br>
+ uint32_t watch_address_high;<br>
+ uint32_t watch_address_low;<br>
+ uint32_t watch_address_cntl;<br>
+<br>
+ watch_address_cntl = 0;<br>
+ watch_address_low = lower_32_bits(watch_address);<br>
+ watch_address_high = upper_32_bits(watch_address) & 0xffff;<br>
+<br>
+ watch_address_cntl = REG_SET_FIELD(watch_address_cntl,<br>
+ TCP_WATCH0_CNTL,<br>
+ MODE,<br>
+ watch_mode);<br>
+<br>
+ watch_address_cntl = REG_SET_FIELD(watch_address_cntl,<br>
+ TCP_WATCH0_CNTL,<br>
+ MASK,<br>
+ watch_address_mask >> 7);<br>
+<br>
+ watch_address_cntl = REG_SET_FIELD(watch_address_cntl,<br>
+ TCP_WATCH0_CNTL,<br>
+ VALID,<br>
+ 1);<br>
+<br>
+ WREG32_RLC((SOC15_REG_OFFSET(GC, GET_INST(GC, inst),<br>
+ regTCP_WATCH0_ADDR_H) +<br>
+ (watch_id * TCP_WATCH_STRIDE)),<br>
+ watch_address_high);<br>
+<br>
+ WREG32_RLC((SOC15_REG_OFFSET(GC, GET_INST(GC, inst),<br>
+ regTCP_WATCH0_ADDR_L) +<br>
+ (watch_id * TCP_WATCH_STRIDE)),<br>
+ watch_address_low);<br>
+<br>
+ return watch_address_cntl;<br>
+}<br>
+<br>
+static uint32_t kgd_gfx_v9_4_3_clear_address_watch(struct amdgpu_device *adev,<br>
+ uint32_t watch_id)<br>
+{<br>
+ return 0;<br>
+}<br>
+<br>
const struct kfd2kgd_calls gc_9_4_3_kfd2kgd = {<br>
.program_sh_mem_settings = kgd_gfx_v9_program_sh_mem_settings,<br>
.set_pasid_vmid_mapping = kgd_gfx_v9_4_3_set_pasid_vmid_mapping,<br>
@@ -380,5 +532,17 @@ const struct kfd2kgd_calls gc_9_4_3_kfd2kgd = {<br>
.set_vm_context_page_table_base =<br>
kgd_gfx_v9_set_vm_context_page_table_base,<br>
.program_trap_handler_settings =<br>
- kgd_gfx_v9_program_trap_handler_settings<br>
+ kgd_gfx_v9_program_trap_handler_settings,<br>
+ .build_grace_period_packet_info =<br>
+ kgd_gfx_v9_build_grace_period_packet_info,<br>
+ .get_iq_wait_times = kgd_gfx_v9_get_iq_wait_times,<br>
+ .enable_debug_trap = kgd_aldebaran_enable_debug_trap,<br>
+ .disable_debug_trap = kgd_gfx_v9_4_3_disable_debug_trap,<br>
+ .validate_trap_override_request =<br>
+ kgd_gfx_v9_4_3_validate_trap_override_request,<br>
+ .set_wave_launch_trap_override =<br>
+ kgd_gfx_v9_4_3_set_wave_launch_trap_override,<br>
+ .set_wave_launch_mode = kgd_aldebaran_set_wave_launch_mode,<br>
+ .set_address_watch = kgd_gfx_v9_4_3_set_address_watch,<br>
+ .clear_address_watch = kgd_gfx_v9_4_3_clear_address_watch<br>
};<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c<br>
index 8ad7a7779e14..fd42b524a161 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c<br>
@@ -886,7 +886,8 @@ uint32_t kgd_gfx_v10_set_address_watch(struct amdgpu_device *adev,<br>
uint32_t watch_address_mask,<br>
uint32_t watch_id,<br>
uint32_t watch_mode,<br>
- uint32_t debug_vmid)<br>
+ uint32_t debug_vmid,<br>
+ uint32_t inst)<br>
{<br>
uint32_t watch_address_high;<br>
uint32_t watch_address_low;<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.h<br>
index e6b70196071a..306ea176032d 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.h<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.h<br>
@@ -44,10 +44,12 @@ uint32_t kgd_gfx_v10_set_address_watch(struct amdgpu_device *adev,<br>
uint32_t watch_address_mask,<br>
uint32_t watch_id,<br>
uint32_t watch_mode,<br>
- uint32_t debug_vmid);<br>
+ uint32_t debug_vmid,<br>
+ uint32_t inst);<br>
uint32_t kgd_gfx_v10_clear_address_watch(struct amdgpu_device *adev,<br>
uint32_t watch_id);<br>
-void kgd_gfx_v10_get_iq_wait_times(struct amdgpu_device *adev, uint32_t *wait_times);<br>
+void kgd_gfx_v10_get_iq_wait_times(struct amdgpu_device *adev,<br>
+ uint32_t *wait_times);<br>
void kgd_gfx_v10_build_grace_period_packet_info(struct amdgpu_device *adev,<br>
uint32_t wait_times,<br>
uint32_t grace_period,<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c<br>
index 91c3574ebed3..77ca5cbfb601 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c<br>
@@ -743,7 +743,8 @@ static uint32_t kgd_gfx_v11_set_address_watch(struct amdgpu_device *adev,<br>
uint32_t watch_address_mask,<br>
uint32_t watch_id,<br>
uint32_t watch_mode,<br>
- uint32_t debug_vmid)<br>
+ uint32_t debug_vmid,<br>
+ uint32_t inst)<br>
{<br>
uint32_t watch_address_high;<br>
uint32_t watch_address_low;<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c<br>
index 51d93fb13ea3..bb496e818d52 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c<br>
@@ -822,7 +822,8 @@ uint32_t kgd_gfx_v9_set_address_watch(struct amdgpu_device *adev,<br>
uint32_t watch_address_mask,<br>
uint32_t watch_id,<br>
uint32_t watch_mode,<br>
- uint32_t debug_vmid)<br>
+ uint32_t debug_vmid,<br>
+ uint32_t inst)<br>
{<br>
uint32_t watch_address_high;<br>
uint32_t watch_address_low;<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.h<br>
index 5f54bff0db49..4e8aa0432e8b 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.h<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.h<br>
@@ -89,7 +89,8 @@ uint32_t kgd_gfx_v9_set_address_watch(struct amdgpu_device *adev,<br>
uint32_t watch_address_mask,<br>
uint32_t watch_id,<br>
uint32_t watch_mode,<br>
- uint32_t debug_vmid);<br>
+ uint32_t debug_vmid,<br>
+ uint32_t inst);<br>
uint32_t kgd_gfx_v9_clear_address_watch(struct amdgpu_device *adev,<br>
uint32_t watch_id);<br>
void kgd_gfx_v9_get_iq_wait_times(struct amdgpu_device *adev, uint32_t *wait_times);<br>
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_debug.c b/drivers/gpu/drm/amd/amdkfd/kfd_debug.c<br>
index fff3ccc04fa9..24083db44724 100644<br>
--- a/drivers/gpu/drm/amd/amdkfd/kfd_debug.c<br>
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_debug.c<br>
@@ -466,7 +466,8 @@ int kfd_dbg_trap_set_dev_address_watch(struct kfd_process_device *pdd,<br>
watch_address_mask,<br>
*watch_id,<br>
watch_mode,<br>
- pdd->dev->vm_info.last_vmid_kfd);<br>
+ pdd->dev->vm_info.last_vmid_kfd,<br>
+ 0);<br>
amdgpu_gfx_off_ctrl(pdd->dev->adev, true);<br>
<br>
if (!pdd->dev->kfd->shared_resources.enable_mes)<br>
diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h<br>
index d0df3381539f..30d91d2ffe4c 100644<br>
--- a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h<br>
+++ b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h<br>
@@ -315,7 +315,8 @@ struct kfd2kgd_calls {<br>
uint32_t watch_address_mask,<br>
uint32_t watch_id,<br>
uint32_t watch_mode,<br>
- uint32_t debug_vmid);<br>
+ uint32_t debug_vmid,<br>
+ uint32_t inst);<br>
uint32_t (*clear_address_watch)(struct amdgpu_device *adev,<br>
uint32_t watch_id);<br>
void (*get_iq_wait_times)(struct amdgpu_device *adev,<br>
-- <br>
2.34.1<br>
<br>
</div>
</span></font></div>
</blockquote>
<br>
</div>
</body>
</html>