[AMD Official Use Only - Internal Distribution Only]
Good catch. I think we should probably just return 0 at the end to keep the semantics of the original code before this was broken out into a separate helper function.
Alex
From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> on behalf of Victor Zhao <Victor.Zhao@xxxxxxx>
Sent: Tuesday, April 27, 2021 5:58 AM To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx <amd-gfx@xxxxxxxxxxxxxxxxxxxxx> Cc: Zhao, Victor <Victor.Zhao@xxxxxxx> Subject: [PATCH] drm/amdgpu: fix r initial values Give initial values otherwise sriov will get suspend of
IP block <dce_virtual> failed Signed-off-by: Victor Zhao <Victor.Zhao@xxxxxxx> --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c index 0f17984fdea4..36fdffd103c0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c @@ -1384,7 +1384,7 @@ int amdgpu_display_suspend_helper(struct amdgpu_device *adev) struct drm_crtc *crtc; struct drm_connector *connector; struct drm_connector_list_iter iter; - int r; + int r = 0; /* turn off display hw */ drm_modeset_lock_all(dev); @@ -1431,7 +1431,7 @@ int amdgpu_display_resume_helper(struct amdgpu_device *adev) struct drm_connector *connector; struct drm_connector_list_iter iter; struct drm_crtc *crtc; - int r; + int r = 0; /* pin cursors */ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { -- 2.25.1 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://nam11.safelinks.protection.outlook.com/?url=""> |
_______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx