drm/amdgpu: fix r initial values
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix r initial values
Give initial values otherwise sriov will get suspend of IP block <dce_virtual> failed
--- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +2 -2
@@ -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) {
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deucher, Alexander
maintainer[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 <[email protected]> on behalf of Victor Zhao <[email protected]>
Sent: Tuesday, April 27, 2021 5:58 AM
To: [email protected] <[email protected]>
Cc: Zhao, Victor <[email protected]>
Subject: [PATCH] drm/amdgpu: fix r initial values
Give initial values otherwise sriov will get suspend of IP block <dce_virtual> failed
--- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +2 -2
@@ -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
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Calexander.deucher%40amd.com%7C9611bd0b8cb74a8ac81308d909631004%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637551143345597240%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=okT4wUuJysPl1Fm%2BtdHtw4VgXoLJUhir%2BTa6Uuqpg20%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx