Commit 6fb33209 authored by Kenneth Feng's avatar Kenneth Feng Committed by Alex Deucher

drm/amd/amdgpu: fix null pointer in runtime pm

fix the null pointer issue when runtime pm is triggered.
Signed-off-by: default avatarKenneth Feng <kenneth.feng@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 78deaf5f
...@@ -4866,7 +4866,7 @@ int amdgpu_device_baco_enter(struct drm_device *dev) ...@@ -4866,7 +4866,7 @@ int amdgpu_device_baco_enter(struct drm_device *dev)
if (!amdgpu_device_supports_baco(adev_to_drm(adev))) if (!amdgpu_device_supports_baco(adev_to_drm(adev)))
return -ENOTSUPP; return -ENOTSUPP;
if (ras && ras->supported) if (ras && ras->supported && adev->nbio.funcs->enable_doorbell_interrupt)
adev->nbio.funcs->enable_doorbell_interrupt(adev, false); adev->nbio.funcs->enable_doorbell_interrupt(adev, false);
return amdgpu_dpm_baco_enter(adev); return amdgpu_dpm_baco_enter(adev);
...@@ -4885,7 +4885,7 @@ int amdgpu_device_baco_exit(struct drm_device *dev) ...@@ -4885,7 +4885,7 @@ int amdgpu_device_baco_exit(struct drm_device *dev)
if (ret) if (ret)
return 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); adev->nbio.funcs->enable_doorbell_interrupt(adev, true);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment