<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Calibri;font-size:10pt;color:#008000;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Series is:</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com></div>
<div id="appendonsend"></div>
<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> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Jesse.zhang@amd.com <jesse.zhang@amd.com><br>
<b>Sent:</b> Monday, December 9, 2024 10:53 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Zhu, Jiadong <Jiadong.Zhu@amd.com>; Liang, Prike <Prike.Liang@amd.com>; Huang, Tim <Tim.Huang@amd.com>; Zhang, Jesse(Jie) <Jesse.Zhang@amd.com><br>
<b>Subject:</b> [PATCH 5/5] drm/amdgpu/sdma7: Add queue reset sysfs for sdmav7</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">sdmv7 queue reset already supports by mmio, add its sys file.<br>
<br>
Signed-off-by: Jesse Zhang <jesse.zhang@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 8 +++++++-<br>
1 file changed, 7 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c<br>
index 627e0173b64d..8e69b84e0165 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c<br>
@@ -1368,6 +1368,9 @@ static int sdma_v7_0_sw_init(struct amdgpu_ip_block *ip_block)<br>
return r;<br>
}<br>
<br>
+ adev->sdma.supported_reset =<br>
+ amdgpu_get_soft_full_reset_mask(&adev->sdma.instance[0].ring);<br>
+ adev->sdma.supported_reset |= AMDGPU_RESET_TYPE_PER_QUEUE;<br>
/* Allocate memory for SDMA IP Dump buffer */<br>
ptr = kcalloc(adev->sdma.num_instances * reg_count, sizeof(uint32_t), GFP_KERNEL);<br>
if (ptr)<br>
@@ -1378,7 +1381,9 @@ static int sdma_v7_0_sw_init(struct amdgpu_ip_block *ip_block)<br>
#ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ<br>
adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;<br>
#endif<br>
-<br>
+ r = amdgpu_sdma_sysfs_reset_mask_init(adev);<br>
+ if (r)<br>
+ return r;<br>
<br>
return r;<br>
}<br>
@@ -1391,6 +1396,7 @@ static int sdma_v7_0_sw_fini(struct amdgpu_ip_block *ip_block)<br>
for (i = 0; i < adev->sdma.num_instances; i++)<br>
amdgpu_ring_fini(&adev->sdma.instance[i].ring);<br>
<br>
+ amdgpu_sdma_sysfs_reset_mask_fini(adev);<br>
amdgpu_sdma_destroy_inst_ctx(adev, true);<br>
<br>
if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT)<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>