Am 10.04.2017 um 09:11 schrieb Zhang, Jerry (Junwei):
On 04/10/2017 03:02 PM, Christian König wrote:
Mhm, did you run into an actual issue or was that just from reading the code?

Just reading the code. (maybe adding the prefix [RFC] is better)

Yeah, that is usually a good idea, but I'm forgetting it all the time as well.


Usually it is called near the amdgpu_bo_fence(), but I didn't find it in amdgpu_vm_update_level()(now for multi-level PT)

Ok, in this case that shouldn't be an issue.

Christian.


Jerry


The caller should have reserved a shared slot before calling
amdgpu_vm_update_directories() and I just double checked that and we seem to do
this everywhere.

Regards,
Christian.

Am 10.04.2017 um 08:54 schrieb Junwei Zhang:
Signed-off-by: Junwei Zhang <jerry.zh...@amd.com>
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 157ae50..55af909 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -913,6 +913,9 @@ static int amdgpu_vm_update_level(struct amdgpu_device
*adev,
          if (shadow)
              amdgpu_sync_resv(adev, &job->sync, shadow->tbo.resv,
                       AMDGPU_FENCE_OWNER_VM);
+        r = reservation_object_reserve_shared(parent->bo->tbo.resv);
+        if (r)
+            goto error_free;
          WARN_ON(params.ib->length_dw > ndw);
          r = amdgpu_job_submit(job, ring, &vm->entity,


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to