<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:11pt;color:#0078D7;margin:5pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Alex</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Victor Zhao <Victor.Zhao@amd.com><br>
<b>Sent:</b> Tuesday, April 27, 2021 5:58 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Zhao, Victor <Victor.Zhao@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu: fix r initial values</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Give initial values otherwise sriov will get suspend of<br>
IP block <dce_virtual> failed<br>
<br>
Signed-off-by: Victor Zhao <Victor.Zhao@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ++--<br>
 1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c<br>
index 0f17984fdea4..36fdffd103c0 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c<br>
@@ -1384,7 +1384,7 @@ int amdgpu_display_suspend_helper(struct amdgpu_device *adev)<br>
         struct drm_crtc *crtc;<br>
         struct drm_connector *connector;<br>
         struct drm_connector_list_iter iter;<br>
-       int r;<br>
+       int r = 0;<br>
 <br>
         /* turn off display hw */<br>
         drm_modeset_lock_all(dev);<br>
@@ -1431,7 +1431,7 @@ int amdgpu_display_resume_helper(struct amdgpu_device *adev)<br>
         struct drm_connector *connector;<br>
         struct drm_connector_list_iter iter;<br>
         struct drm_crtc *crtc;<br>
-       int r;<br>
+       int r = 0;<br>
 <br>
         /* pin cursors */<br>
         list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {<br>
-- <br>
2.25.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Calexander.deucher%40amd.com%7C9611bd0b8cb74a8ac81308d909631004%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637551143345597240%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=okT4wUuJysPl1Fm%2BtdHtw4VgXoLJUhir%2BTa6Uuqpg20%3D&amp;reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Calexander.deucher%40amd.com%7C9611bd0b8cb74a8ac81308d909631004%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637551143345597240%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=okT4wUuJysPl1Fm%2BtdHtw4VgXoLJUhir%2BTa6Uuqpg20%3D&amp;reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>