diff options
author | Chunming Zhou <david1.zhou@amd.com> | 2015-07-21 16:52:10 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-17 16:50:37 -0400 |
commit | d5fc5e82a3127b8839c4a4457f3b950a009737a7 (patch) | |
tree | 4fa16b5508f599e63da7e41a331252fd6f623237 /drivers/gpu/drm/amd/amdgpu/amdgpu.h | |
parent | 23ca0e4e478836dcb93a54aa68cb48fbc66fb0ed (diff) | |
download | lwn-d5fc5e82a3127b8839c4a4457f3b950a009737a7.tar.gz lwn-d5fc5e82a3127b8839c4a4457f3b950a009737a7.zip |
drm/amdgpu: dispatch job for vm
use kernel context to submit command for vm
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Acked-by: Christian K?nig <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 47e4809c6e71..1b8d05ff88e7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -1221,6 +1221,19 @@ struct amdgpu_cs_chunk { void __user *user_ptr; }; +union amdgpu_sched_job_param { + struct { + struct amdgpu_vm *vm; + uint64_t start; + uint64_t last; + struct amdgpu_fence **fence; + + } vm_mapping; + struct { + struct amdgpu_bo *bo; + } vm; +}; + struct amdgpu_cs_parser { struct amdgpu_device *adev; struct drm_file *filp; @@ -1245,6 +1258,7 @@ struct amdgpu_cs_parser { struct mutex job_lock; struct work_struct job_work; int (*prepare_job)(struct amdgpu_cs_parser *sched_job); + union amdgpu_sched_job_param job_param; int (*run_job)(struct amdgpu_cs_parser *sched_job); int (*free_job)(struct amdgpu_cs_parser *sched_job); }; @@ -2255,6 +2269,12 @@ void amdgpu_pci_config_reset(struct amdgpu_device *adev); bool amdgpu_card_posted(struct amdgpu_device *adev); void amdgpu_update_display_priority(struct amdgpu_device *adev); bool amdgpu_boot_test_post_card(struct amdgpu_device *adev); +struct amdgpu_cs_parser *amdgpu_cs_parser_create(struct amdgpu_device *adev, + struct drm_file *filp, + struct amdgpu_ctx *ctx, + struct amdgpu_ib *ibs, + uint32_t num_ibs); + int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data); int amdgpu_cs_get_ring(struct amdgpu_device *adev, u32 ip_type, u32 ip_instance, u32 ring, |