]> Git Repo - J-linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
Merge tag 'ovl-update-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs
[J-linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_vm.c
index dc76d2b3ce52fdcb9ba1623c6ab9499dbde9da2c..59cac347baa38ebe0fa7dd908753a9219963a41a 100644 (file)
@@ -54,7 +54,7 @@
  * (uncached system pages).
  * Each VM has an ID associated with it and there is a page table
  * associated with each VMID.  When executing a command buffer,
- * the kernel tells the the ring what VMID to use for that command
+ * the kernel tells the ring what VMID to use for that command
  * buffer.  VMIDs are allocated dynamically as commands are submitted.
  * The userspace drivers maintain their own address space and the kernel
  * sets up their pages tables accordingly when they submit their
@@ -2168,6 +2168,14 @@ int amdgpu_vm_make_compute(struct amdgpu_device *adev, struct amdgpu_vm *vm)
        } else {
                vm->update_funcs = &amdgpu_vm_sdma_funcs;
        }
+       /*
+        * Make sure root PD gets mapped. As vm_update_mode could be changed
+        * when turning a GFX VM into a compute VM.
+        */
+       r = vm->update_funcs->map_table(to_amdgpu_bo_vm(vm->root.bo));
+       if (r)
+               goto unreserve_bo;
+
        dma_fence_put(vm->last_update);
        vm->last_update = NULL;
        vm->is_compute_context = true;
This page took 0.031753 seconds and 4 git commands to generate.