]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/ttm: Don't print error message if eviction was interrupted
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Tue, 7 Mar 2023 14:46:19 +0000 (15:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Aug 2023 08:23:53 +0000 (10:23 +0200)
[ Upstream commit 8ab3b0663e279ab550bc2c0b5d602960e8b94e02 ]

Avoid printing an error message if eviction was interrupted by,
for example, the user pressing CTRL-C. That may happen if eviction
is waiting for something, like for example a free batch-buffer.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230307144621.10748-6-thomas.hellstrom@linux.intel.com
Stable-dep-of: e8188c461ee0 ("drm/ttm: Don't leak a resource on eviction error")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/ttm/ttm_bo.c

index f2c4e9037d6e0f2bbee458d9d1b83f142d81076e..85f7f5cd4589a0c1618eb7781326c097212bb19d 100644 (file)
@@ -504,7 +504,8 @@ bounce:
        if (ret == -EMULTIHOP) {
                ret = ttm_bo_bounce_temp_buffer(bo, &evict_mem, ctx, &hop);
                if (ret) {
-                       pr_err("Buffer eviction failed\n");
+                       if (ret != -ERESTARTSYS && ret != -EINTR)
+                               pr_err("Buffer eviction failed\n");
                        ttm_resource_free(bo, &evict_mem);
                        goto out;
                }