[PATCH] drm/amdgpu/umsch: add suspend and resume callback

Gopalakrishnan, Veerabadhran (Veera) Veerabadhran.Gopalakrishnan at amd.com
Fri Oct 13 17:34:35 UTC 2023


[Public]

Reviewed-by: Veerabadhran Gopalakrishnan Veerabadhran.Gopalakrishnan at amd.com<mailto:Veerabadhran.Gopalakrishnan at amd.com>

-Veera

From: Deucher, Alexander <Alexander.Deucher at amd.com>
Sent: Friday, October 13, 2023 7:04 PM
To: Yu, Lang <Lang.Yu at amd.com>; amd-gfx at lists.freedesktop.org
Cc: Gopalakrishnan, Veerabadhran (Veera) <Veerabadhran.Gopalakrishnan at amd.com>
Subject: Re: [PATCH] drm/amdgpu/umsch: add suspend and resume callback


[Public]

Acked-by: Alex Deucher <alexander.deucher at amd.com<mailto:alexander.deucher at amd.com>>
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org<mailto:amd-gfx-bounces at lists.freedesktop.org>> on behalf of Lang Yu <Lang.Yu at amd.com<mailto:Lang.Yu at amd.com>>
Sent: Friday, October 13, 2023 1:58 AM
To: amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org> <amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>>
Cc: Gopalakrishnan, Veerabadhran (Veera) <Veerabadhran.Gopalakrishnan at amd.com<mailto:Veerabadhran.Gopalakrishnan at amd.com>>; Yu, Lang <Lang.Yu at amd.com<mailto:Lang.Yu at amd.com>>
Subject: [PATCH] drm/amdgpu/umsch: add suspend and resume callback

Add missing IP callbacks.

Signed-off-by: Lang Yu <Lang.Yu at amd.com<mailto:Lang.Yu at amd.com>>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
index 4bd076e9e367..f5fdde5181f7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
@@ -844,6 +844,20 @@ static int umsch_mm_hw_fini(void *handle)
         return 0;
 }

+static int umsch_mm_suspend(void *handle)
+{
+       struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+
+       return umsch_mm_hw_fini(adev);
+}
+
+static int umsch_mm_resume(void *handle)
+{
+       struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+
+       return umsch_mm_hw_init(adev);
+}
+
 static const struct amd_ip_funcs umsch_mm_v4_0_ip_funcs = {
         .name = "umsch_mm_v4_0",
         .early_init = umsch_mm_early_init,
@@ -852,6 +866,8 @@ static const struct amd_ip_funcs umsch_mm_v4_0_ip_funcs = {
         .sw_fini = umsch_mm_sw_fini,
         .hw_init = umsch_mm_hw_init,
         .hw_fini = umsch_mm_hw_fini,
+       .suspend = umsch_mm_suspend,
+       .resume = umsch_mm_resume,
 };

 const struct amdgpu_ip_block_version umsch_mm_v4_0_ip_block = {
--
2.25.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20231013/ce0d2425/attachment-0001.htm>


More information about the amd-gfx mailing list