<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:Arial;font-size:10pt;color:#008000;margin:15pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Acked-by: Alex Deucher <alexander.deucher@amd.com><br>
</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 Lang Yu <Lang.Yu@amd.com><br>
<b>Sent:</b> Friday, October 13, 2023 1:58 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Gopalakrishnan, Veerabadhran (Veera) <Veerabadhran.Gopalakrishnan@amd.com>; Yu, Lang <Lang.Yu@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu/umsch: add suspend and resume callback</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Add missing IP callbacks.<br>
<br>
Signed-off-by: Lang Yu <Lang.Yu@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 16 ++++++++++++++++<br>
1 file changed, 16 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c<br>
index 4bd076e9e367..f5fdde5181f7 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c<br>
@@ -844,6 +844,20 @@ static int umsch_mm_hw_fini(void *handle)<br>
return 0;<br>
}<br>
<br>
+static int umsch_mm_suspend(void *handle)<br>
+{<br>
+ struct amdgpu_device *adev = (struct amdgpu_device *)handle;<br>
+<br>
+ return umsch_mm_hw_fini(adev);<br>
+}<br>
+<br>
+static int umsch_mm_resume(void *handle)<br>
+{<br>
+ struct amdgpu_device *adev = (struct amdgpu_device *)handle;<br>
+<br>
+ return umsch_mm_hw_init(adev);<br>
+}<br>
+<br>
static const struct amd_ip_funcs umsch_mm_v4_0_ip_funcs = {<br>
.name = "umsch_mm_v4_0",<br>
.early_init = umsch_mm_early_init,<br>
@@ -852,6 +866,8 @@ static const struct amd_ip_funcs umsch_mm_v4_0_ip_funcs = {<br>
.sw_fini = umsch_mm_sw_fini,<br>
.hw_init = umsch_mm_hw_init,<br>
.hw_fini = umsch_mm_hw_fini,<br>
+ .suspend = umsch_mm_suspend,<br>
+ .resume = umsch_mm_resume,<br>
};<br>
<br>
const struct amdgpu_ip_block_version umsch_mm_v4_0_ip_block = {<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>