From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F982C4332F for ; Sat, 19 Nov 2022 05:20:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231475AbiKSFUd (ORCPT ); Sat, 19 Nov 2022 00:20:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231842AbiKSFU1 (ORCPT ); Sat, 19 Nov 2022 00:20:27 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E34788E097; Fri, 18 Nov 2022 21:20:25 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id me22so1084324ejb.8; Fri, 18 Nov 2022 21:20:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7Y4bxw1JD63M5XllY6npHcIrHCuFCtkIt2jLzNAtGRU=; b=exLzb3poQrwX0fkXQzG5mAxcKfcogKJp9nov8VgFXIyCExcSGg76o3gfk3lxW4TGq/ 5xNTWZqM33mWjFXrUkLSC6soMu7mSI8TX+/lMiKkDzXvt+BcnmFgvp6+6HUzQTJzMQJl R/LpBJNoKtKYYDvKcuSYG4Np++PnyHl7ixI3U3G7Ksm9Ep4dvMeY2WURxEsaA5JQgICU MOTfGU8w21ifwZUnzi73y76Wa8x5WHQJIbsFq+NMyaCcAGoptPLXnjLzenS8UDCS2pVA KSNMHLP8IRfTL5bgWTaCNPl64ZUuRl+X9vKzXjd1YEc1E/L3UPEJXw5l+O/19kFQhGG9 Hyyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7Y4bxw1JD63M5XllY6npHcIrHCuFCtkIt2jLzNAtGRU=; b=ExwWaWkV2TtEIXQQDUD+HIF8Cc1LuKUUhw9I6FI4sRTHLaNpytnxbV2QzAvjuwhtwl HjGfMPtSEADXQw3wed8FdCJpNJpuKyY9uxrGFHhLnX8EF0gcIelRzsqvFaqHANXiBeIb 2btdAjpX/0CYEKyNNdCE9jUxKcIYmHrtwWIQioS+obhmrzYpPzla+Q8AlSs4GAuO5Lce QyPRg9f2pg4BM6N6TLsOBW42Dfv8ZpJbtn+5APrpJv0/i09RCgf7iv/GqGpdiTyhzGC9 qtiKcC6LR8ncIo3dqGTx2/tik9C6TzKLrwoifcPaNIptY6lvawNXg8ILFwuarTXcCFIp WALg== X-Gm-Message-State: ANoB5pk66W0VKJ+gVo90CRmmCbk5zsJ/1tFISuKKd+3ktR/i/qaTe9AQ 0YxwONDg6svprG0RU/U9MUpNstmPyQ70jPiRvOWLsMPWRLK8JMg47QI= X-Google-Smtp-Source: AA0mqf6QeRRX0IlcllwtANP/CEQ4uvjC6o1p5svY601MJVeWZ30wxil0NldfeqRcJRaIQZIb3Z49UrIGJN0yANUpc7w= X-Received: by 2002:a17:906:560e:b0:7a2:335e:90e2 with SMTP id f14-20020a170906560e00b007a2335e90e2mr8281399ejq.712.1668835224347; Fri, 18 Nov 2022 21:20:24 -0800 (PST) MIME-Version: 1.0 References: <20220819200928.401416-1-kherbst@redhat.com> In-Reply-To: <20220819200928.401416-1-kherbst@redhat.com> From: Computer Enthusiastic Date: Sat, 19 Nov 2022 06:20:10 +0100 Message-ID: Subject: Re: [Nouveau] [PATCH] nouveau: explicitly wait on the fence in nouveau_bo_move_m2mf To: Karol Herbst , stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Ben Skeggs Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Il giorno ven 19 ago 2022 alle ore 22:09 Karol Herbst ha scritto: > > It is a bit unlcear to us why that's helping, but it does and unbreaks > suspend/resume on a lot of GPUs without any known drawbacks. > > Cc: stable@vger.kernel.org # v5.15+ > Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/156 > Signed-off-by: Karol Herbst > --- > drivers/gpu/drm/nouveau/nouveau_bo.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c > index 35bb0bb3fe61..126b3c6e12f9 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_bo.c > +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c > @@ -822,6 +822,15 @@ nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int evict, > if (ret == 0) { > ret = nouveau_fence_new(chan, false, &fence); > if (ret == 0) { > + /* TODO: figure out a better solution here > + * > + * wait on the fence here explicitly as going through > + * ttm_bo_move_accel_cleanup somehow doesn't seem to do it. > + * > + * Without this the operation can timeout and we'll fallback to a > + * software copy, which might take several minutes to finish. > + */ > + nouveau_fence_wait(fence, false, false); > ret = ttm_bo_move_accel_cleanup(bo, > &fence->base, > evict, false, > -- > 2.37.1 > Could it be possible to make land the aforementioned patch to the 5.10.x kernel version ? It is currently for >= 5.15.x kernel version only. Thanks. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6156BC4332F for ; Sat, 19 Nov 2022 05:20:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E31CF10E260; Sat, 19 Nov 2022 05:20:31 +0000 (UTC) Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 352B810E25E; Sat, 19 Nov 2022 05:20:26 +0000 (UTC) Received: by mail-ej1-x62b.google.com with SMTP id bj12so17581802ejb.13; Fri, 18 Nov 2022 21:20:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7Y4bxw1JD63M5XllY6npHcIrHCuFCtkIt2jLzNAtGRU=; b=exLzb3poQrwX0fkXQzG5mAxcKfcogKJp9nov8VgFXIyCExcSGg76o3gfk3lxW4TGq/ 5xNTWZqM33mWjFXrUkLSC6soMu7mSI8TX+/lMiKkDzXvt+BcnmFgvp6+6HUzQTJzMQJl R/LpBJNoKtKYYDvKcuSYG4Np++PnyHl7ixI3U3G7Ksm9Ep4dvMeY2WURxEsaA5JQgICU MOTfGU8w21ifwZUnzi73y76Wa8x5WHQJIbsFq+NMyaCcAGoptPLXnjLzenS8UDCS2pVA KSNMHLP8IRfTL5bgWTaCNPl64ZUuRl+X9vKzXjd1YEc1E/L3UPEJXw5l+O/19kFQhGG9 Hyyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7Y4bxw1JD63M5XllY6npHcIrHCuFCtkIt2jLzNAtGRU=; b=xFPo3Y42U3Er3ZZXndHuXS3s1Q/C2F/Ak4+6r16/WvqwAWx+c60H9Vh7cAqtKMPsNv friiln6d150K0SqKTJ0tHrH8YoX31VNzf9IJqlBQ+oKyIiBlX5G1crQYi/gI73SQ4UEf HsVZY34P92T0o9H4nCxLl58Zf0KvqPSaiqFAFVLPUOTihc3JatK5+L0irOGm0E5CC17s AcH4LB++UdIgrgwEWvrnx7ierkQaVO8DTrvrcxIPIy+LtbWpmcQI7B91xh+8wuOsNYCu Pl41e5YSHAHRZfRojSPxAxEGMf5hDHCsijQrjOHZ61At4sDYS7/vQcwQkCwxeDbjJ7yV 6zVw== X-Gm-Message-State: ANoB5pkC07jUTfMHp4c8TOKiyJS/5E5Yquebu8iuc74aTEZHiGfojbA/ +kmW3ODAhoXHdAoKRfFgCl1wacoV3zNv8/gGmto= X-Google-Smtp-Source: AA0mqf6QeRRX0IlcllwtANP/CEQ4uvjC6o1p5svY601MJVeWZ30wxil0NldfeqRcJRaIQZIb3Z49UrIGJN0yANUpc7w= X-Received: by 2002:a17:906:560e:b0:7a2:335e:90e2 with SMTP id f14-20020a170906560e00b007a2335e90e2mr8281399ejq.712.1668835224347; Fri, 18 Nov 2022 21:20:24 -0800 (PST) MIME-Version: 1.0 References: <20220819200928.401416-1-kherbst@redhat.com> In-Reply-To: <20220819200928.401416-1-kherbst@redhat.com> From: Computer Enthusiastic Date: Sat, 19 Nov 2022 06:20:10 +0100 Message-ID: To: Karol Herbst , stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Subject: Re: [Nouveau] [PATCH] nouveau: explicitly wait on the fence in nouveau_bo_move_m2mf X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Ben Skeggs Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" Hello, Il giorno ven 19 ago 2022 alle ore 22:09 Karol Herbst ha scritto: > > It is a bit unlcear to us why that's helping, but it does and unbreaks > suspend/resume on a lot of GPUs without any known drawbacks. > > Cc: stable@vger.kernel.org # v5.15+ > Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/156 > Signed-off-by: Karol Herbst > --- > drivers/gpu/drm/nouveau/nouveau_bo.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c > index 35bb0bb3fe61..126b3c6e12f9 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_bo.c > +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c > @@ -822,6 +822,15 @@ nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int evict, > if (ret == 0) { > ret = nouveau_fence_new(chan, false, &fence); > if (ret == 0) { > + /* TODO: figure out a better solution here > + * > + * wait on the fence here explicitly as going through > + * ttm_bo_move_accel_cleanup somehow doesn't seem to do it. > + * > + * Without this the operation can timeout and we'll fallback to a > + * software copy, which might take several minutes to finish. > + */ > + nouveau_fence_wait(fence, false, false); > ret = ttm_bo_move_accel_cleanup(bo, > &fence->base, > evict, false, > -- > 2.37.1 > Could it be possible to make land the aforementioned patch to the 5.10.x kernel version ? It is currently for >= 5.15.x kernel version only. Thanks.