[PATCH 09/19] drm/amdgpu: add additional boco checks to runtime suspend/resume
Lukas Wunner
lukas at wunner.de
Sat Oct 12 11:55:31 UTC 2019
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.
More information about the amd-gfx
mailing list