<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div>Big NAK to this! This warning is not related in any way to the hw state.</div>
<div><br>
</div>
<div>It's simply illegal to free up memory during suspend.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Christian.</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>Von:</b> Xiao, Jack <Jack.Xiao@amd.com><br>
<b>Gesendet:</b> Donnerstag, 2. Februar 2023 10:54<br>
<b>An:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com><br>
<b>Cc:</b> Xiao, Jack <Jack.Xiao@amd.com><br>
<b>Betreff:</b> [PATCH] drm/amdgpu: only WARN freeing buffers when DMA is unavailable</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Reduce waringings, only warn when DMA is unavailable.<br>
<br>
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++-<br>
1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c<br>
index 2d237f3d3a2e..e3e3764ea697 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c<br>
@@ -422,7 +422,8 @@ void amdgpu_bo_free_kernel(struct amdgpu_bo **bo, u64 *gpu_addr,<br>
if (*bo == NULL)<br>
return;<br>
<br>
- WARN_ON(amdgpu_ttm_adev((*bo)->tbo.bdev)->in_suspend);<br>
+ WARN_ON(amdgpu_ttm_adev((*bo)->tbo.bdev)->in_suspend &&<br>
+ !amdgpu_ttm_adev((*bo)->tbo.bdev)->ip_blocks[AMD_IP_BLOCK_TYPE_SDMA].status.hw);<br>
<br>
if (likely(amdgpu_bo_reserve(*bo, true) == 0)) {<br>
if (cpu_addr)<br>
-- <br>
2.37.3<br>
<br>
</div>
</span></font></div>
</body>
</html>