drm/amdgpu: fix logic inversion in check
authorjsg <jsg@openbsd.org>
Thu, 24 Feb 2022 12:47:29 +0000 (12:47 +0000)
committerjsg <jsg@openbsd.org>
Thu, 24 Feb 2022 12:47:29 +0000 (12:47 +0000)
From Christian Koenig
0fec53c5dca8a218e20b1d3964db23391a689dff in linux 5.15.y/5.15.25
e8ae38720e1a685fd98cfa5ae118c9d07b45ca79 in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c

index e011615..dad8610 100644 (file)
@@ -1949,7 +1949,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;
        }