Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3775077rwb; Tue, 20 Sep 2022 04:42:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ArEyA+18rk+lh2C4wvlwzFiLzOfJwuOSKLWEew3kIwB/X6JCFgSX/1uvFPsRZl4J0i5k8 X-Received: by 2002:a17:907:9494:b0:780:fd30:e757 with SMTP id dm20-20020a170907949400b00780fd30e757mr10957442ejc.166.1663674176156; Tue, 20 Sep 2022 04:42:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663674176; cv=none; d=google.com; s=arc-20160816; b=Vx70ZtXhPBGooimE0vZD6hsb8Zx2H6daic0Mn8Q5N+nq9rtRjN30FdwaZg+NvJ4Q2b /OmAHPHOt5L38CGETj/vCzEpJFQ1Eb2WdNMwr7GReUSeTvz4KrdITu49TOqMF/bJZc0h UDq3dLjNc88tAGiEZrd9gPvBzZ0K3ZuV3v0cHrkYcQKSeZivX6+X4NwtBqISmCQf88iB C6b1iIAQpy4kzI0ze1OG5fILsSCFK1OSBGRCl6uI7ZdSGjlxU5X0dCOhQl8Rz9ADWCyd 83APBzwk2e6KG6Jh7009hQQW96ET0huYH8nQ0YXp+hPAHw93rof3m207JQCXrxGZi0OA HSWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=PsCfV3jb8Y6CJkx3bnF/8eo0TaIrp2G1MgoQNK12Cok=; b=VDhGTThFs/w1D3hpcUgJI1TU+LS5XXnIgl1+ekWRq2Vz8uvLX3Z4YDAo108ynmCRQA iEl6iUloJJPP882EV2ARlNStvTF6U2XE5qzX9cu8MKsGoRaXAvhYKHcqx9WLWBVzNeJ1 A3i5iLWhMgFZ5ckiCzmg16b7w6qczK1tXBoU8/NrD6E84+WGO7RCP1jmEVP2oq07GZzq 92A7oEaODFahx+RhJCVHvqHzqMUAjQNIeGPVbBmIscUnm4kszHO9yAjNo9SQdGkVUZIZ 0Ttwu5MSQT4A159IY0C0VH8pcZNo/jgSew+7CP3PB1aqmb3uUBucCoszkAzGxbEZbNAM Zdgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=M3rUlbFM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd4-20020a170906ce2400b00781b52cd62bsi1015868ejb.462.2022.09.20.04.42.31; Tue, 20 Sep 2022 04:42:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=M3rUlbFM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230274AbiITLgt (ORCPT + 99 others); Tue, 20 Sep 2022 07:36:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230216AbiITLgr (ORCPT ); Tue, 20 Sep 2022 07:36:47 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDFAC6EF0C for ; Tue, 20 Sep 2022 04:36:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663673804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PsCfV3jb8Y6CJkx3bnF/8eo0TaIrp2G1MgoQNK12Cok=; b=M3rUlbFM61qUUSSF8jvKnStvxlPo8GPXaBEyzKarlg/+gVoXcUEOkMtKeliRQ0jmKzzxbP QL88kH5+90rSbvB3uUIZbdlecKIugnx7QGv3ZnIhCwRzbsq1C2cLcAuZqtV5G14IQcCqYQ qONOKVeQSlHUic78bCf58Gl0pQnSXYo= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-370-qGoznZu0O-ClvLKlpaaaNA-1; Tue, 20 Sep 2022 07:36:43 -0400 X-MC-Unique: qGoznZu0O-ClvLKlpaaaNA-1 Received: by mail-qk1-f200.google.com with SMTP id bi3-20020a05620a318300b006cf2d389cdaso1679217qkb.8 for ; Tue, 20 Sep 2022 04:36:43 -0700 (PDT) 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; bh=PsCfV3jb8Y6CJkx3bnF/8eo0TaIrp2G1MgoQNK12Cok=; b=25nLTI38ayeKD0aw6CIYdUTnuQrR89pJT40PfBON3ud6fZSelQXdBTX1DMKEoSnE+J rE7s9nR/UJ/BEE3eDQsgckSa2GcBa16wuHDdGJW1aMZmInVnShcLQVZOAR2OvtzFAEK8 MAP4fjT+hdqSoURMcVDbjVvle6piqae9jjxrpWBa2bXuSnwqRX5+7oGfQ2ryr4+GUwY/ rGoAzIfsa2r5elxikf/0+DbvLWXLlSV2rsaycd9bBp4md9feR65k98prlywzlJqoNSsH za7F4dVc1kObbZTnIHtnwK6oGnDvl5HnBSijBq70epS6BzJSgtTSOzgM8BXusFBu0NsN tF8g== X-Gm-Message-State: ACrzQf2EraLDOahMnKnYdmyxkiOWkdxumDir+TGTxazR+kk2g+k8N8IY hVcw+SXcgBiv4m2MUNtTTPXpIY1G8JKP97EFZuzgwnmdxM9GvJ02mZ7gEjmni40jaZuyxJ44S6Z +FKfAEWnayQh2kkieSnPOn8PsvjmU1iM4/Cfi+8r3 X-Received: by 2002:a05:622a:1793:b0:35b:af87:4f22 with SMTP id s19-20020a05622a179300b0035baf874f22mr18699729qtk.673.1663673803213; Tue, 20 Sep 2022 04:36:43 -0700 (PDT) X-Received: by 2002:a05:622a:1793:b0:35b:af87:4f22 with SMTP id s19-20020a05622a179300b0035baf874f22mr18699716qtk.673.1663673802999; Tue, 20 Sep 2022 04:36:42 -0700 (PDT) MIME-Version: 1.0 References: <20220819200928.401416-1-kherbst@redhat.com> In-Reply-To: From: Karol Herbst Date: Tue, 20 Sep 2022 13:36:32 +0200 Message-ID: Subject: Re: [PATCH] nouveau: explicitly wait on the fence in nouveau_bo_move_m2mf To: Salvatore Bonaccorso Cc: linux-kernel@vger.kernel.org, Ben Skeggs , Lyude Paul , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, stable@vger.kernel.org, Computer Enthusiastic Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 20, 2022 at 12:42 PM Salvatore Bonaccorso wrote: > > Hi, > > On Fri, Aug 19, 2022 at 10:09:28PM +0200, Karol Herbst wrote: > > 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 > > > > > > While this is marked for 5.15+ only, a user in Debian was seeing the > suspend issue as well on 5.10.y and did confirm the commit fixes the > issue as well in the 5.10.y series: > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=989705#69 > > Karol, Lyude, should that as well be picked for 5.10.y? > mhh from the original report 5.10 was fine, but maybe something got backported and it broke it? I'll try to do some testing on my machine and see what I can figure out, but it could also be a debian only issue at this point. > Regards, > Salvatore >