diff options
author | Kenneth Feng <kenneth.feng@amd.com> | 2020-11-17 16:10:59 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-11-24 20:27:01 +0300 |
commit | 7acc79eb5f78d3d1aa5dd21fc0a0329f1b7f2be5 (patch) | |
tree | 0364efbbbb5517b59494da1cb2541c42be0ecaed /drivers/gpu | |
parent | 6600f9d52213b5c3455481b5c9e61cf5e305c0e6 (diff) | |
download | linux-7acc79eb5f78d3d1aa5dd21fc0a0329f1b7f2be5.tar.xz |
drm/amd/amdgpu: fix null pointer in runtime pm
fix the null pointer issue when runtime pm is triggered.
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index e3783f5a459d..026789b466db 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -4852,7 +4852,7 @@ int amdgpu_device_baco_enter(struct drm_device *dev) if (!amdgpu_device_supports_baco(adev_to_drm(adev))) return -ENOTSUPP; - if (ras && ras->supported) + if (ras && ras->supported && adev->nbio.funcs->enable_doorbell_interrupt) adev->nbio.funcs->enable_doorbell_interrupt(adev, false); return amdgpu_dpm_baco_enter(adev); @@ -4871,7 +4871,7 @@ int amdgpu_device_baco_exit(struct drm_device *dev) if (ret) return ret; - if (ras && ras->supported) + if (ras && ras->supported && adev->nbio.funcs->enable_doorbell_interrupt) adev->nbio.funcs->enable_doorbell_interrupt(adev, true); return 0; |