<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">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
</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 Yang, Philip <Philip.Yang@amd.com><br>
<b>Sent:</b> Friday, October 19, 2018 3:13:56 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Yang, Philip<br>
<b>Subject:</b> [PATCH] drm/amdgpu: fix sdma v4 ring is disabled accidently</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">For sdma v4, there is bug caused by<br>
commit d4e869b6b5d6 ("drm/amdgpu: add ring test for page queue")'<br>
<br>
local variable ring is reused and changed, so amdgpu_ttm_set_buffer_funcs_status(adev, true)<br>
is skipped accidently. As a result, amdgpu_fill_buffer() will fail, kernel message:<br>
<br>
[drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off.<br>
[ 25.260444] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off.<br>
[ 25.260627] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off.<br>
[ 25.290119] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off.<br>
[ 25.290370] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off.<br>
[ 25.319971] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off.<br>
[ 25.320486] amdgpu 0000:19:00.0: [mmhub] VMC page fault (src_id:0 ring:154 vmid:8 pasid:32768, for process pid 0 thread pid 0)<br>
[ 25.320533] amdgpu 0000:19:00.0: in page starting at address 0x0000000000000000 from 18<br>
[ 25.320563] amdgpu 0000:19:00.0: VM_L2_PROTECTION_FAULT_STATUS:0x00800134<br>
<br>
Change-Id: Idacdf8e60557edb0a4a499aa4051b75d87ce4091<br>
Signed-off-by: Philip Yang <Philip.Yang@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 7 ++++---<br>
1 file changed, 4 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c<br>
index ede149a..cd368ac 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c<br>
@@ -1151,10 +1151,11 @@ static int sdma_v4_0_start(struct amdgpu_device *adev)<br>
}<br>
<br>
if (adev->sdma.has_page_queue) {<br>
- ring = &adev->sdma.instance[i].page;<br>
- r = amdgpu_ring_test_ring(ring);<br>
+ struct amdgpu_ring *page = &adev->sdma.instance[i].page;<br>
+<br>
+ r = amdgpu_ring_test_ring(page);<br>
if (r) {<br>
- ring->ready = false;<br>
+ page->ready = false;<br>
return r;<br>
}<br>
}<br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>