]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.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)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 14 Apr 2022 09:32:16 +0000 (11:32 +0200)
BugLink: https://bugs.launchpad.net/bugs/1967582
[ Upstream commit e8ae38720e1a685fd98cfa5ae118c9d07b45ca79 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

index 58e14d3040f030fc6379fe65e1dba4474d819d1c..870dd78d5a21adce3fb3aa063ee6b46777e11615 100644 (file)
@@ -1976,7 +1976,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;
        }