mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
drm/amd/amdgpu: fix null pointer in runtime pm
commit 7acc79eb5f upstream.
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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
01144c0fda
commit
a68122a129
@@ -4593,7 +4593,7 @@ int amdgpu_device_baco_enter(struct drm_device *dev)
|
|||||||
if (!amdgpu_device_supports_baco(adev->ddev))
|
if (!amdgpu_device_supports_baco(adev->ddev))
|
||||||
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);
|
||||||
@@ -4612,7 +4612,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;
|
||||||
|
|||||||
Reference in New Issue
Block a user