summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2019-03-18 12:27:35 +0100
committerAlex Deucher <alexander.deucher@amd.com>2019-03-21 13:59:00 -0500
commitd1e29462a06ac3d11645b7d939b00bcf51b10cc3 (patch)
treedb7a51fda0810479f3cc3f905bd3f0fa5144a741 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
parent072b7a0bd2f6be51381001b65134715f36518d78 (diff)
downloadlinux-d1e29462a06ac3d11645b7d939b00bcf51b10cc3.tar.bz2
drm/amdgpu: move and rename amdgpu_pte_update_params
Move the update parameter into the VM header and rename them. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
index 8348804c46cd..6df4d9e382ac 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
@@ -172,6 +172,51 @@ struct amdgpu_task_info {
pid_t tgid;
};
+/**
+ * struct amdgpu_vm_update_params
+ *
+ * Encapsulate some VM table update parameters to reduce
+ * the number of function parameters
+ *
+ */
+struct amdgpu_vm_update_params {
+
+ /**
+ * @adev: amdgpu device we do this update for
+ */
+ struct amdgpu_device *adev;
+
+ /**
+ * @vm: optional amdgpu_vm we do this update for
+ */
+ struct amdgpu_vm *vm;
+
+ /**
+ * @pages_addr:
+ *
+ * DMA addresses to use for mapping
+ */
+ dma_addr_t *pages_addr;
+
+ /**
+ * @src: address where to copy page table entries from
+ */
+ uint64_t src;
+
+ /**
+ * @ib: indirect buffer to fill with commands
+ */
+ struct amdgpu_ib *ib;
+
+ /**
+ * @func: Function which actually does the update
+ */
+ void (*func)(struct amdgpu_vm_update_params *params,
+ struct amdgpu_bo *bo, uint64_t pe,
+ uint64_t addr, unsigned count, uint32_t incr,
+ uint64_t flags);
+};
+
struct amdgpu_vm {
/* tree of virtual addresses mapped */
struct rb_root_cached va;