<p dir="ltr">Does this fix the issue I was seeing since the new memory manager went into thr 4.9-wip branch?</p>
<br><div class="gmail_quote"><div dir="ltr">On Fri, 16 Sep 2016, 10:48 am Christian König, <<a href="mailto:deathsimple@vodafone.de">deathsimple@vodafone.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Christian König <<a href="mailto:christian.koenig@amd.com" target="_blank">christian.koenig@amd.com</a>><br>
<br>
We need to access those with the system domain.<br>
<br>
Fixes fallout from only allocating GTT space on demand.<br>
<br>
Signed-off-by: Christian König <<a href="mailto:christian.koenig@amd.com" target="_blank">christian.koenig@amd.com</a>><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 17 +++++++++++++++++<br>
1 file changed, 17 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c<br>
index a6a48ed..8928a2a 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c<br>
@@ -552,6 +552,10 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,<br>
if (r)<br>
goto error;<br>
<br>
+ r = amdgpu_ttm_bind(&bo->tbo, &bo->tbo.mem);<br>
+ if (r)<br>
+ goto error;<br>
+<br>
addr = amdgpu_bo_gpu_offset(bo);<br>
entries = amdgpu_bo_size(bo) / 8;<br>
<br>
@@ -625,6 +629,11 @@ static int amdgpu_vm_update_pd_or_shadow(struct amdgpu_device *adev,<br>
<br>
if (!pd)<br>
return 0;<br>
+<br>
+ r = amdgpu_ttm_bind(&pd->tbo, &pd->tbo.mem);<br>
+ if (r)<br>
+ return r;<br>
+<br>
pd_addr = amdgpu_bo_gpu_offset(pd);<br>
ring = container_of(vm->entity.sched, struct amdgpu_ring, sched);<br>
<br>
@@ -650,6 +659,14 @@ static int amdgpu_vm_update_pd_or_shadow(struct amdgpu_device *adev,<br>
if (bo == NULL)<br>
continue;<br>
<br>
+ if (bo->shadow) {<br>
+ struct amdgpu_bo *shadow = bo->shadow;<br>
+<br>
+ r = amdgpu_ttm_bind(&shadow->tbo, &shadow->tbo.mem);<br>
+ if (r)<br>
+ return r;<br>
+ }<br>
+<br>
pt = amdgpu_bo_gpu_offset(bo);<br>
if (!shadow) {<br>
if (vm->page_tables[pt_idx].addr == pt)<br>
--<br>
2.5.0<br>
<br>
_______________________________________________<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/mailman/listinfo/amd-gfx</a><br>
</blockquote></div>