mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
drm/amdgpu: fix get_max_engine_clock_in_mhz
[ Upstream commit a9efcc1916 ]
Use proper powerplay function. This fixes OpenCL initialization
problems.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
dc743e9738
commit
0e2685fef9
@@ -265,6 +265,9 @@ uint32_t get_max_engine_clock_in_mhz(struct kgd_dev *kgd)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)kgd;
|
||||
|
||||
/* The sclk is in quantas of 10kHz */
|
||||
return adev->pm.dpm.dyn_state.max_clock_voltage_on_ac.sclk / 100;
|
||||
/* the sclk is in quantas of 10kHz */
|
||||
if (amdgpu_sriov_vf(adev))
|
||||
return adev->clock.default_sclk / 100;
|
||||
|
||||
return amdgpu_dpm_get_sclk(adev, false) / 100;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user