drm/amdgpu: support dpm level modification under virtualization v3
authorYintian Tao <yttao@amd.com>
Tue, 9 Apr 2019 12:33:20 +0000 (20:33 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Apr 2019 18:53:27 +0000 (13:53 -0500)
commitbb5a2bdf36a8df79e1437b443299b7fe1ea3abfc
tree74af2ad9ead13464b323b6c22d95453af597dd87
parentb0960c3592a39f1cc6fcab1793158f3850f72c77
drm/amdgpu: support dpm level modification under virtualization v3

Under vega10 virtualuzation, smu ip block will not be added.
Therefore, we need add pp clk query and force dpm level function
at amdgpu_virt_ops to support the feature.

v2: add get_pp_clk existence check and use kzalloc to allocate buf

v3: return -ENOMEM for allocation failure and correct the coding style

Signed-off-by: Yintian Tao <yttao@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h