drm/amdgpu: fix logic inversion in check
authorChristian König <christian.koenig@amd.com>
Fri, 28 Jan 2022 12:21:10 +0000 (13:21 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Feb 2022 23:26:32 +0000 (18:26 -0500)
We probably never trigger this, but the logic inside the check is
inverted.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

index 74d8b72..4b2920a 100644 (file)
@@ -1941,7 +1941,7 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset,
        unsigned i;
        int r;
 
-       if (direct_submit && !ring->sched.ready) {
+       if (!direct_submit && !ring->sched.ready) {
                DRM_ERROR("Trying to move memory with ring turned off.\n");
                return -EINVAL;
        }