AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 4/4] drm/amdgpu: Call amdgpu_ucode_fini_bo in amd_powerplay.c
Date: Mon, 12 Mar 2018 20:34:10 +0800	[thread overview]
Message-ID: <1520858050-7338-4-git-send-email-Rex.Zhu@amd.com> (raw)
In-Reply-To: <1520858050-7338-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>

make it symmetric with the init bo in amd_powerplay.c

refine the "commit b22558bb4ff8fc9fe925222f90297d7a03a5fb20"

Change-Id: I0bca00fa2a376cf6539b046eefff2ca3d30c3cae
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c    | 3 ---
 drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 7 ++++++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index d60ecc5..9aa726e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1485,9 +1485,6 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev)
 	}
 
 	for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
-		if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_SMC &&
-			adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)
-			amdgpu_ucode_fini_bo(adev);
 		if (!adev->ip_blocks[i].status.hw)
 			continue;
 
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index a5bc52c..ed480db 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -201,7 +201,12 @@ static int pp_late_init(void *handle)
 
 static void pp_late_fini(void *handle)
 {
-	amd_powerplay_destroy(handle);
+	struct amdgpu_device *adev = handle;
+
+	if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)
+		amdgpu_ucode_fini_bo(adev);
+
+	amd_powerplay_destroy(adev);
 }
 
 
-- 
1.9.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-03-12 12:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-12 12:34 [PATCH 1/4] drm/amd/pp: Move helper functions to smu_help.c Rex Zhu
     [not found] ` <1520858050-7338-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-03-12 12:34   ` [PATCH 2/4] drm/amdgpu: Plus NULL function pointer check Rex Zhu
     [not found]     ` <1520858050-7338-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-03-12 12:54       ` Christian König
     [not found]         ` <71e3bf37-5289-422b-7b04-de2d4e60ce9c-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-03-12 14:13           ` Zhu, Rex
2018-03-12 12:34   ` [PATCH 3/4] drm/amdgpu: Remove wrapper layer of amdgpu_powerplay Rex Zhu
     [not found]     ` <1520858050-7338-3-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-03-13 16:02       ` Alex Deucher
2018-03-12 12:34   ` Rex Zhu [this message]
     [not found]     ` <1520858050-7338-4-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-03-13 15:55       ` [PATCH 4/4] drm/amdgpu: Call amdgpu_ucode_fini_bo in amd_powerplay.c Alex Deucher
2018-03-13 15:56   ` [PATCH 1/4] drm/amd/pp: Move helper functions to smu_help.c Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1520858050-7338-4-git-send-email-Rex.Zhu@amd.com \
    --to=rex.zhu-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox