<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta name="x_Generator" content="Microsoft Word 15 (filtered medium)">
<style>
<!--
@font-face
{font-family:SimSun}
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:DengXian}
@font-face
{}
@font-face
{}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:DengXian}
a:x_link, span.x_MsoHyperlink
{color:blue;
text-decoration:underline}
a:x_visited, span.x_MsoHyperlinkFollowed
{color:#954F72;
text-decoration:underline}
.x_MsoChpDefault
{}
@page WordSection1
{margin:72.0pt 90.0pt 72.0pt 90.0pt}
div.x_WordSection1
{}
-->
</style>
<div lang="ZH-CN" link="blue" vlink="#954F72">
<div class="x_WordSection1">
<p class="x_MsoNormal"><span lang="EN-US">Why ? the page tables are resided in VRAM, no need to recovery if no VRAM lost</span><span lang="EN-US" style="font-size:12.0pt"></span></p>
<p class="x_MsoNormal"><span lang="EN-US"> </span></p>
<p class="x_MsoNormal"><span lang="EN-US">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">
Mail</a> for Windows 10</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt; font-family:SimSun"> </span></p>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="x_MsoNormal" style="border:none; padding:0cm"><b><span lang="EN-US">From:
</span></b><span lang="EN-US"><a href="mailto:ckoenig.leichtzumerken@gmail.com">Christian König</a><br>
<b>Sent: </b>2017</span>年<span lang="EN-US">10</span>月<span lang="EN-US">1</span>日<span lang="EN-US"> 17:36<br>
<b>To: </b><a href="mailto:Monk.Liu@amd.com">Liu, Monk</a>; <a href="mailto:amd-gfx@lists.freedesktop.org">
amd-gfx@lists.freedesktop.org</a><br>
<b>Subject: </b>Re: [PATCH 12/12] drm/amdgpu/sriov:no shadow buffer recovery</span></p>
</div>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt; font-family:SimSun"> </span></p>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Am 30.09.2017 um 08:03 schrieb Monk Liu:<br>
> 1, we have deadlock unresloved between shadow bo recovery<br>
> and ctx_do_release,<br>
><br>
> 2, for loose mode gpu reset we always assume VRAM not lost<br>
> so there is no need to do that from begining<br>
><br>
> Change-Id: I5259f9d943239bd1fa2e45eb446ef053299fbfb1<br>
> Signed-off-by: Monk Liu <Monk.Liu@amd.com><br>
<br>
NAK, even when VRAM ist lost we must restore the page tables or <br>
otherwise no process would be able to proceed.<br>
<br>
Regards,<br>
Christian.<br>
<br>
> ---<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 29 -----------------------------<br>
> 1 file changed, 29 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
> index c3f10b5..8ae7a2c 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
> @@ -2840,9 +2840,7 @@ int amdgpu_sriov_gpu_reset(struct amdgpu_device *adev, struct amdgpu_job *job)<br>
> {<br>
> int i, j, r = 0;<br>
> int resched;<br>
> - struct amdgpu_bo *bo, *tmp;<br>
> struct amdgpu_ring *ring;<br>
> - struct dma_fence *fence = NULL, *next = NULL;<br>
> <br>
> /* other thread is already into the gpu reset so just quit and come later */<br>
> if (!atomic_add_unless(&adev->in_sriov_reset, 1, 1))<br>
> @@ -2909,33 +2907,6 @@ int amdgpu_sriov_gpu_reset(struct amdgpu_device *adev, struct amdgpu_job *job)<br>
> /* release full control of GPU after ib test */<br>
> amdgpu_virt_release_full_gpu(adev, true);<br>
> <br>
> - DRM_INFO("recover vram bo from shadow\n");<br>
> -<br>
> - ring = adev->mman.buffer_funcs_ring;<br>
> - mutex_lock(&adev->shadow_list_lock);<br>
> - list_for_each_entry_safe(bo, tmp, &adev->shadow_list, shadow_list) {<br>
> - next = NULL;<br>
> - amdgpu_recover_vram_from_shadow(adev, ring, bo, &next);<br>
> - if (fence) {<br>
> - r = dma_fence_wait(fence, false);<br>
> - if (r) {<br>
> - WARN(r, "recovery from shadow isn't completed\n");<br>
> - break;<br>
> - }<br>
> - }<br>
> -<br>
> - dma_fence_put(fence);<br>
> - fence = next;<br>
> - }<br>
> - mutex_unlock(&adev->shadow_list_lock);<br>
> -<br>
> - if (fence) {<br>
> - r = dma_fence_wait(fence, false);<br>
> - if (r)<br>
> - WARN(r, "recovery from shadow isn't completed\n");<br>
> - }<br>
> - dma_fence_put(fence);<br>
> -<br>
> for (i = j; i < j + AMDGPU_MAX_RINGS; ++i) {<br>
> ring = adev->rings[i % AMDGPU_MAX_RINGS];<br>
> if (!ring || !ring->sched.thread)<br>
<br>
<br>
</div>
</span></font>
</body>
</html>