diff options
author | Chunming Zhou <david1.zhou@amd.com> | 2015-08-18 11:12:15 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-21 00:01:32 +0300 |
commit | 4fe6311734986220e40afe4bf72d62383c1e8d6c (patch) | |
tree | dabec41150a7175dbffb8073d06e9d4610a51c34 /drivers/gpu | |
parent | bb977d3711ed1de1601b463e7fd5a43d82a2b077 (diff) | |
download | linux-4fe6311734986220e40afe4bf72d62383c1e8d6c.tar.xz |
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index c8de4b6194e8..7b4823deef33 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -891,13 +891,14 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) return r; } + r = amdgpu_cs_parser_prepare_job(parser); + if (r) + goto out; + if (amdgpu_enable_scheduler && parser->num_ibs) { struct amdgpu_job *job; struct amdgpu_ring * ring = 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); if (!job) 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); return 0; } - r = amdgpu_cs_parser_prepare_job(parser); - if (r) - goto out; cs->out.handle = parser->ibs[parser->num_ibs - 1].sequence; out: |