* [PATCH] drm/amdgpu: fix r initial values
@ 2021-04-27 9:58 Victor Zhao
2021-04-27 14:57 ` Deucher, Alexander
0 siblings, 1 reply; 4+ messages in thread
From: Victor Zhao @ 2021-04-27 9:58 UTC (permalink / raw)
To: amd-gfx; +Cc: Victor Zhao
Give initial values otherwise sriov will get suspend of
IP block <dce_virtual> failed
Signed-off-by: Victor Zhao <Victor.Zhao@amd.com>
---
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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amdgpu: fix r initial values
2021-04-27 9:58 [PATCH] drm/amdgpu: fix r initial values Victor Zhao
@ 2021-04-27 14:57 ` Deucher, Alexander
0 siblings, 0 replies; 4+ messages in thread
From: Deucher, Alexander @ 2021-04-27 14:57 UTC (permalink / raw)
To: Zhao, Victor, amd-gfx
[-- Attachment #1.1: Type: text/plain, Size: 2289 bytes --]
[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@lists.freedesktop.org> on behalf of Victor Zhao <Victor.Zhao@amd.com>
Sent: Tuesday, April 27, 2021 5:58 AM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Zhao, Victor <Victor.Zhao@amd.com>
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@amd.com>
---
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@lists.freedesktop.org
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
[-- Attachment #1.2: Type: text/html, Size: 4664 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amdgpu: fix r initial values
2021-04-28 4:40 Victor Zhao
@ 2021-04-28 13:19 ` Deucher, Alexander
0 siblings, 0 replies; 4+ messages in thread
From: Deucher, Alexander @ 2021-04-28 13:19 UTC (permalink / raw)
To: Zhao, Victor, amd-gfx
[-- Attachment #1.1: Type: text/plain, Size: 1869 bytes --]
[AMD Public Use]
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Victor Zhao <Victor.Zhao@amd.com>
Sent: Wednesday, April 28, 2021 12:40 AM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Zhao, Victor <Victor.Zhao@amd.com>
Subject: [PATCH] drm/amdgpu: fix r initial values
Sriov gets suspend of IP block <dce_virtual> failed as return
value was not initialized.
v2: return 0 directly to align original code semantic before this
was broken out into a separate helper function instead of setting
initial values
Signed-off-by: Victor Zhao <Victor.Zhao@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index 0f17984fdea4..e0234d6762b9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -1422,7 +1422,7 @@ int amdgpu_display_suspend_helper(struct amdgpu_device *adev)
}
}
}
- return r;
+ return 0;
}
int amdgpu_display_resume_helper(struct amdgpu_device *adev)
--
2.25.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Calexander.deucher%40amd.com%7C7925d9ce21714b35330b08d909ffcd6f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637551816535414647%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=sSBSp4Gdor1FBEldOCBMYd7ZZkYOUFLCh%2BJVrMus5zU%3D&reserved=0
[-- Attachment #1.2: Type: text/html, Size: 3667 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] drm/amdgpu: fix r initial values
@ 2021-04-28 4:40 Victor Zhao
2021-04-28 13:19 ` Deucher, Alexander
0 siblings, 1 reply; 4+ messages in thread
From: Victor Zhao @ 2021-04-28 4:40 UTC (permalink / raw)
To: amd-gfx; +Cc: Victor Zhao
Sriov gets suspend of IP block <dce_virtual> failed as return
value was not initialized.
v2: return 0 directly to align original code semantic before this
was broken out into a separate helper function instead of setting
initial values
Signed-off-by: Victor Zhao <Victor.Zhao@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index 0f17984fdea4..e0234d6762b9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -1422,7 +1422,7 @@ int amdgpu_display_suspend_helper(struct amdgpu_device *adev)
}
}
}
- return r;
+ return 0;
}
int amdgpu_display_resume_helper(struct amdgpu_device *adev)
--
2.25.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-28 13:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-27 9:58 [PATCH] drm/amdgpu: fix r initial values Victor Zhao
2021-04-27 14:57 ` Deucher, Alexander
2021-04-28 4:40 Victor Zhao
2021-04-28 13:19 ` Deucher, Alexander
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.