]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: improve error handling in pcie_bw
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 19 May 2020 20:54:55 +0000 (16:54 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 21 May 2020 22:00:00 +0000 (18:00 -0400)
commit471f275c88c172ba1879ab3e4f15306d558814ee
tree9b799c5c0fdccee3b62ae5d8de5a57e96e5daba0
parentd8f948d52de6e536a8e6aef4bdc798c2e15a2d84
drm/amdgpu: improve error handling in pcie_bw

1. Initialize the counters to 0 in case the callback
   fails to initialize them.
2. The counters don't exist on APUs so return an error
   for them.
3. Return an error if the callback doesn't exist.

Reviewed-by: Yong Zhao <Yong.Zhao@amd.com>
Reviewed-By: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c