Skip to contentSkip to conversation

drm/amdgpu: register gpu instance before fan boost feature enablment

PATCH In review Quan, Evan 2 participants 2 messages Nov 5, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Quan, Evan

author
#0 lore raw

PATCH 1/1 drm/amdgpu: register gpu instance before fan boost feature enablment

Otherwise, the feature enablement will be skipped due to wrong count. Caused by "drm/amdgpu: fix a race in GPU reset with IB test (v2)".

Change-Id Id576090d7ce7645a5c98ac160e0af730a51526b0
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c    | 1 -
 2 files changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -0
index 2d72d206cead..02ccadbfd89f 100644
@@ -3087,6 +3087,13 @@ int amdgpu_device_init(struct amdgpu_device *adev,
 			DRM_INFO("amdgpu: acceleration disabled, skipping benchmarks\n");
 	}
 
+	/*
+	 * Register gpu instance before amdgpu_device_enable_mgpu_fan_boost.
+	 * Otherwise the mgpu fan boost feature will be skipped due to the
+	 * gpu instance is counted less.
+	 */
+	amdgpu_register_gpu_instance(adev);
+
 	/* enable clockgating, etc. after ib tests, etc. since some blocks require
 	 * explicit gating rather than handling it automatically.
 	 */
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0 -1
index 688bb4abccf5..cbd4a5709470 100644
@@ -204,7 +204,6 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)
 		pm_runtime_put_autosuspend(dev->dev);
 	}
 
-	amdgpu_register_gpu_instance(adev);
 out:
 	if (r) {
 		/* balance pm_runtime_get_sync in amdgpu_driver_unload_kms */
Signature · 6 lines
2.23.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

Reviewed-by
#2 lore raw

________________________________
From: Quan, Evan <[email protected]>
Sent: Tuesday, November 5, 2019 5:18 AM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH] drm/amdgpu: register gpu instance before fan boost feature enablment

Otherwise, the feature enablement will be skipped due to wrong count. Caused by "drm/amdgpu: fix a race in GPU reset with IB test (v2)".

Change-Id Id576090d7ce7645a5c98ac160e0af730a51526b0
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c    | 1 -
 2 files changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -0
index 2d72d206cead..02ccadbfd89f 100644
@@ -3087,6 +3087,13 @@ int amdgpu_device_init(struct amdgpu_device *adev,
                         DRM_INFO("amdgpu: acceleration disabled, skipping benchmarks\n");
         }
 
+       /*
+        * Register gpu instance before amdgpu_device_enable_mgpu_fan_boost.
+        * Otherwise the mgpu fan boost feature will be skipped due to the
+        * gpu instance is counted less.
+        */
+       amdgpu_register_gpu_instance(adev);
+
         /* enable clockgating, etc. after ib tests, etc. since some blocks require
          * explicit gating rather than handling it automatically.
          */
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0 -1
index 688bb4abccf5..cbd4a5709470 100644
@@ -204,7 +204,6 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)
                 pm_runtime_put_autosuspend(dev->dev);
         }
 
-       amdgpu_register_gpu_instance(adev);
 out:
         if (r) {
                 /* balance pm_runtime_get_sync in amdgpu_driver_unload_kms */

--
2.23.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx