Re: [PATCH 09/19] drm/amdgpu: add additional boco checks to runtime suspend/resume

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

 



On Thu, Oct 10, 2019 at 08:45:26PM -0500, Alex Deucher wrote:
> +	if (amdgpu_device_supports_boco(drm_dev))
> +		drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
>  
> +	if (amdgpu_device_supports_boco(drm_dev)) {
> +		if (amdgpu_is_atpx_hybrid() ||
> +		    !amdgpu_has_atpx_dgpu_power_cntl())
> +			pci_set_power_state(pdev, PCI_D0);
> +		pci_restore_state(pdev);
> +		ret = pci_enable_device(pdev);
> +		if (ret)
> +			return ret;
> +		pci_set_master(pdev);
> +	}

Two consecutive if-clauses with same condition, can be folded into one.
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




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

  Powered by Linux