mirror of https://gitee.com/openkylin/linux.git
drm/amdgpu: register gpu instance before fan boost feature enablment
Otherwise, the feature enablement will be skipped due to wrong count.
Fixes: beff74bc6e
("drm/amdgpu: fix a race in GPU reset with IB test (v2)")
Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
2c874ad9d6
commit
b0adca4d50
|
@ -3029,6 +3029,13 @@ int amdgpu_device_init(struct amdgpu_device *adev,
|
||||||
DRM_INFO("amdgpu: acceleration disabled, skipping benchmarks\n");
|
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
|
/* enable clockgating, etc. after ib tests, etc. since some blocks require
|
||||||
* explicit gating rather than handling it automatically.
|
* explicit gating rather than handling it automatically.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -190,7 +190,6 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)
|
||||||
pm_runtime_put_autosuspend(dev->dev);
|
pm_runtime_put_autosuspend(dev->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
amdgpu_register_gpu_instance(adev);
|
|
||||||
out:
|
out:
|
||||||
if (r) {
|
if (r) {
|
||||||
/* balance pm_runtime_get_sync in amdgpu_driver_unload_kms */
|
/* balance pm_runtime_get_sync in amdgpu_driver_unload_kms */
|
||||||
|
|
Loading…
Reference in New Issue