<div dir="auto">Hi Monk, a comment below.<div><br><div class="gmail_extra"><br><div class="gmail_quote">Den 9 jan. 2017 9:07 fm skrev "Monk Liu" <<a href="mailto:Monk.Liu@amd.com" target="_blank">Monk.Liu@amd.com</a>>:<br type="attribution"><blockquote class="m_2820111108539082759quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Change-Id: I110af93c4f17ab18d1be199c6ebe9<wbr>ee965483a66<br>
Signed-off-by: Monk Liu <<a href="mailto:Monk.Liu@amd.com" target="_blank">Monk.Liu@amd.com</a>><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/am<wbr>dgpu_device.c | 7 +++++++<br>
 1 file changed, 7 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/a<wbr>mdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/a<wbr>mdgpu_device.c<br>
index f82919d..5253aa2 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/a<wbr>mdgpu_device.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/a<wbr>mdgpu_device.c<br>
@@ -1384,6 +1384,10 @@ static int amdgpu_init(struct amdgpu_device *adev)<br>
                                return r;<br>
                        }<br>
                        adev->ip_blocks[i].status.hw = true;<br>
+<br>
+                       /* right after GMC hw init, we create CSA */<br>
+                       if (amdgpu_sriov_vf(adev))<br>
+                               adev->virt.allocate_csa(adev)<wbr>;<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">The <span style="font-family:sans-serif;font-size:13.696px">amdgpu_allocate_static_csa function returns a value, presumably an error on failure. Shouldn't the return value be checked here and errors handled?</span></div><div dir="auto"><span style="font-family:sans-serif;font-size:13.696px"><br></span></div><div dir="auto"><font face="sans-serif"><span style="font-size:13.696px">Best regards,</span></font></div><div dir="auto"><font face="sans-serif"><span style="font-size:13.696px">Nils</span></font></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="m_2820111108539082759quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                }<br>
        }<br>
<br>
@@ -1517,6 +1521,9 @@ static int amdgpu_fini(struct amdgpu_device *adev)<br>
                adev->ip_blocks[i].status.late<wbr>_initialized = false;<br>
        }<br>
<br>
+       if (amdgpu_sriov_vf(adev))<br>
+               adev->virt.deallocate_csa(ade<wbr>v);<br>
+<br>
        return 0;<br>
 }<br>
<font color="#888888"><br>
--<br>
2.7.4<br>
<br>
______________________________<wbr>_________________<br>
amd-gfx mailing list<br>
<a href="mailto:amd-gfx@lists.freedesktop.org" target="_blank">amd-gfx@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/amd-gfx</a><br>
</font></blockquote></div><br></div></div></div>