[PATCH 3/3] drm/amdkfd: Remove unnecessary pm_init() for non HWS mode

Deucher, Alexander Alexander.Deucher at amd.com
Mon Sep 23 12:44:17 UTC 2019


Series is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Zhao, Yong <Yong.Zhao at amd.com>
Sent: Monday, September 23, 2019 12:30 AM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Zhao, Yong <Yong.Zhao at amd.com>
Subject: [PATCH 3/3] drm/amdkfd: Remove unnecessary pm_init() for non HWS mode

The packet manager is not needed for non HWS mode except Hawaii, so only
initialize it for Hawaii under non HWS mode. This will simplify debugging
under non HWS mode for all new asics, because it eliminates one variable
out of the equation in non HWS mode

Change-Id: Ie2b61b546299a50366b9ab97900f4bb13de33d5b
Signed-off-by: Yong Zhao <Yong.Zhao at amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index c47b88987c87..c826634938d2 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -902,12 +902,18 @@ static void uninitialize(struct device_queue_manager *dqm)
 static int start_nocpsch(struct device_queue_manager *dqm)
 {
         init_interrupts(dqm);
-       return pm_init(&dqm->packets, dqm);
+
+       if (dqm->dev->device_info->asic_family == CHIP_HAWAII)
+               return pm_init(&dqm->packets, dqm);
+
+       return 0;
 }

 static int stop_nocpsch(struct device_queue_manager *dqm)
 {
-       pm_uninit(&dqm->packets);
+       if (dqm->dev->device_info->asic_family == CHIP_HAWAII)
+               pm_uninit(&dqm->packets);
+
         return 0;
 }

--
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20190923/746c226d/attachment.html>


More information about the amd-gfx mailing list