]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Fix driver reloading failure
authorXiangliang.Yu <Xiangliang.Yu@amd.com>
Thu, 21 Sep 2017 02:19:49 +0000 (10:19 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 19:14:19 +0000 (15:14 -0400)
commit0ae7fc3f3f73b0a7e164607f0fa34ff140ff9fb7
treecb6cd8b4bcb0e07d21161b607d9cfd9fad44844d
parent2e86bb590bb9b266d8b1f85074aeded117cf3b79
drm/amdgpu: Fix driver reloading failure

SRIOV doesn't implement PMC capability of PCIe, so it can't update
power state by reading PMC register.

Currently, amdgpu driver doesn't disable pci device when removing
driver, the enable_cnt of pci device will not be decrease to 0.
When reloading driver, pci_enable_device will do nothing as
enable_cnt is not zero. And power state will not be updated as PMC
is not support.
So current_state of pci device is not D0 state and pci_enable_msi
return fail.

Add pci_disable_device when remmoving driver to fix the issue.

Signed-off-by: Xiangliang.Yu <Xiangliang.Yu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c