]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
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:35:00 +0000 (18:35 -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 5c3f24069f2a6d685624c4dbadbcbcd218f5f2b9..4655702a5e007bd5086e11eca8f7876542f32e38 100644 (file)
@@ -1904,7 +1904,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;
        }