OSDN Git Service

drm/amdgpu: move cs dependencies front a bit
authorChunming Zhou <david1.zhou@amd.com>
Tue, 11 Sep 2018 09:22:40 +0000 (17:22 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 12 Sep 2018 21:28:41 +0000 (16:28 -0500)
cs dependencies handling doesn't need in vm resv

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

index c5cc648..1081fd0 100644 (file)
@@ -1285,6 +1285,12 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
        if (r)
                goto out;
 
+       r = amdgpu_cs_dependencies(adev, &parser);
+       if (r) {
+               DRM_ERROR("Failed in the dependencies handling %d!\n", r);
+               goto out;
+       }
+
        r = amdgpu_cs_parser_bos(&parser, data);
        if (r) {
                if (r == -ENOMEM)
@@ -1296,12 +1302,6 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
 
        reserved_buffers = true;
 
-       r = amdgpu_cs_dependencies(adev, &parser);
-       if (r) {
-               DRM_ERROR("Failed in the dependencies handling %d!\n", r);
-               goto out;
-       }
-
        for (i = 0; i < parser.job->num_ibs; i++)
                trace_amdgpu_cs(&parser, i);