mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
drm/amdgpu: prepare job should be common code path
Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Christian K?nig <christian.koenig@amd.com>
This commit is contained in:
parent
bb977d3711
commit
4fe6311734
1 changed files with 4 additions and 6 deletions
|
@ -891,13 +891,14 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
r = amdgpu_cs_parser_prepare_job(parser);
|
||||||
|
if (r)
|
||||||
|
goto out;
|
||||||
|
|
||||||
if (amdgpu_enable_scheduler && parser->num_ibs) {
|
if (amdgpu_enable_scheduler && parser->num_ibs) {
|
||||||
struct amdgpu_job *job;
|
struct amdgpu_job *job;
|
||||||
struct amdgpu_ring * ring =
|
struct amdgpu_ring * ring =
|
||||||
amdgpu_cs_parser_get_ring(adev, parser);
|
amdgpu_cs_parser_get_ring(adev, parser);
|
||||||
r = amdgpu_cs_parser_prepare_job(parser);
|
|
||||||
if (r)
|
|
||||||
goto out;
|
|
||||||
job = kzalloc(sizeof(struct amdgpu_job), GFP_KERNEL);
|
job = kzalloc(sizeof(struct amdgpu_job), GFP_KERNEL);
|
||||||
if (!job)
|
if (!job)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -939,9 +940,6 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
|
||||||
up_read(&adev->exclusive_lock);
|
up_read(&adev->exclusive_lock);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
r = amdgpu_cs_parser_prepare_job(parser);
|
|
||||||
if (r)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
cs->out.handle = parser->ibs[parser->num_ibs - 1].sequence;
|
cs->out.handle = parser->ibs[parser->num_ibs - 1].sequence;
|
||||||
out:
|
out:
|
||||||
|
|
Loading…
Reference in a new issue