[PATCH] drm/amdgpu: Disable DPM in virtualization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 15.11.2016 um 11:11 schrieb Trigger Huang:
> This patch is used for virtualization support. In virtualization,
> only SMU manager is needed, DPM should be disabled. This is a
> use case for commit 2f9346b6f984
> ("drm/amdgpu/powerplay: pp module only enable smu when dpm disabled.")
>
> Signed-off-by: Trigger Huang <trigger.huang at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/vi.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
> index 9528072..d1c0abc 100755
> --- a/drivers/gpu/drm/amd/amdgpu/vi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vi.c
> @@ -1147,6 +1147,11 @@ static int vi_common_early_init(void *handle)
>   	if (adev->asic_funcs->detect_hw_virtualization)
>   		amdgpu_asic_detect_hw_virtualization(adev);
>   
> +	if (amdgpu_sriov_vf(adev)) {
> +		/* For virtualization, we need to disable DPM */
> +		amdgpu_dpm = 0;
> +	}
> +

Don't mess with module parameters here, rather make that a dependency 
for when amdgpu_dpm is evaluated for VI.

Christian.

>   	if (amdgpu_smc_load_fw && smc_enabled)
>   		adev->firmware.smu_load = true;
>   




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux