Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2820755rwa; Mon, 22 Aug 2022 14:39:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR5b0JEYyQjuRx+shjNFYIeQn91wkT3yk2IHgT1YMWbo075T32HXG0BoyfFIW2vYI8Ad244g X-Received: by 2002:a17:907:2d2b:b0:731:2179:5ba with SMTP id gs43-20020a1709072d2b00b00731217905bamr14749536ejc.207.1661204369201; Mon, 22 Aug 2022 14:39:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661204369; cv=none; d=google.com; s=arc-20160816; b=XqeNrSkPuyO3ObDSix1eIDyULa/pHj1z/CjdNdi8lxtPuEzwzWglIm/XgnzMtzDpMq T7PG8SLwUNq40bFJp+vbrC8vEC7m16MMmVzLzFR8Xd5PoloRsF4F0UitoK1la9iQuMt6 b9J+mtW1cS3o3gtx38MrlqpLDM/1iVTrlymGshk2tJ3StQTvcQ06p/P8jR/XhA56rFbL yS4rE5jX9kyMvDcapU7SzcJRJ6LvV8Yg0opxc1f660QboHrD9+M7HlAaRCil1JfKF7Xx SDEpF8riv3c42cNU+jw4yR609MngqclwBGZZtPGwtvvrEW0fGD/yQClGMiW07Wts+Rzr VcNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=W99ikbboaJjO+6FHQ4eYoJSNppDNkQvI/eXvuOgjNJE=; b=iRPPJnnkSTBgc/yW3M+vD2d5NG1nD1gHvt81Ebtf7Hzv9tHCu2epNgJ5YgkNFk6Pyl M0wHaE2wYKRSHg8LeMgi75ytbqGIPijpgCRR7PaNuOVFeZiBg6zsuXgdQkSK5W6Qkd/Y ViYQastTMV2BLuOp9PF1TaPQ23QuBwIMMhCZpoqerkDQ6/BSHJKRaT5xDVuTrRCxuOGc vyUfup2xE8VvCxPWtjvb5A+GM1+Y58DBtnqMT+OLZ4hp0tXOUtmti1bQx/NnPqqE+mgg U2Y3WJAKLYnKzQVsiHoZb7ikzD4u6EFk1UOCZP71Gj2ucmUkZg/ZLB7YpjlBRuO/v7bg NugA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="gal/QNw0"; 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 kd5-20020a17090798c500b0073d753fe303si4488012ejc.611.2022.08.22.14.39.03; Mon, 22 Aug 2022 14:39:29 -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="gal/QNw0"; 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 S236522AbiHVVPu (ORCPT + 99 others); Mon, 22 Aug 2022 17:15:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238048AbiHVVPl (ORCPT ); Mon, 22 Aug 2022 17:15:41 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82DBD13F17 for ; Mon, 22 Aug 2022 14:15:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661202938; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W99ikbboaJjO+6FHQ4eYoJSNppDNkQvI/eXvuOgjNJE=; b=gal/QNw0mfk889K9/IPoF6ACcfSDCXooDoJUFjj6CeR0PRBtmn3XYagUTo9XsQ2wym/1Ao wgdMrqKMU/YYO67YV189lUTpjNKrCRp+lsiQb+Gnf/NeJ74Z6BlX0iV/YgKMqOdPoHldPj UsmzGTU07ydvZONt6Gt0l0LiyiHhvFM= 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-297-G-xI4O7hOEeZEA5_E2AePw-1; Mon, 22 Aug 2022 17:15:37 -0400 X-MC-Unique: G-xI4O7hOEeZEA5_E2AePw-1 Received: by mail-qk1-f200.google.com with SMTP id u15-20020a05620a0c4f00b006b8b3f41303so10538763qki.8 for ; Mon, 22 Aug 2022 14:15:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:organization :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc; bh=W99ikbboaJjO+6FHQ4eYoJSNppDNkQvI/eXvuOgjNJE=; b=oVIa917od413yf1ZGH1yN+K3mapTEdg43CjK5azO0SDg67c+DuzH1VTd7zwuvIXV3B /jfvS06Cp5cnh92kTqoSd9Am/QnkaBQ7x6jp9KLAMR5LI5n5C+LYrEYyVSCWMMDaiaDz TvhwAHp6C0HGdaVzj7HoKrmHYEXWg0HnU2sCTPuzYIZigC3+6LjbYTdAwWNkBwFVzBhi c9GIS0dYHx64eq10Rz+QzOFJ80eG9w4G4GvhHzV9iOC1pZV2WTK86s5cAtXro6FrX1hC 92EeVr4ovgQTg+vbB7I6TRqcRRTmQig6H3eHPCsWv+0OYHWHP7k00PcAOgQ9o646i0Dr 6gMg== X-Gm-Message-State: ACgBeo15kN3qw+ZHPz0Rn1j5RzW5Odpp/L+2wL4CreKXlZRYptBYxTt4 FA8Xd1OpSDbb1pxuZN9A9zb4FYxR2Lmjvk2r1fyPVSnC0bHdBBrSP2HeDEXBuG2LoxcHSCBFvl6 P86epPrBzAuRF2Hyt88lPEkHO X-Received: by 2002:a05:622a:392:b0:343:738e:6f6b with SMTP id j18-20020a05622a039200b00343738e6f6bmr17200982qtx.174.1661202936871; Mon, 22 Aug 2022 14:15:36 -0700 (PDT) X-Received: by 2002:a05:622a:392:b0:343:738e:6f6b with SMTP id j18-20020a05622a039200b00343738e6f6bmr17200952qtx.174.1661202936595; Mon, 22 Aug 2022 14:15:36 -0700 (PDT) Received: from [192.168.8.139] (pool-100-0-245-4.bstnma.fios.verizon.net. [100.0.245.4]) by smtp.gmail.com with ESMTPSA id w25-20020a05620a0e9900b006b5bf5d45casm11352206qkm.27.2022.08.22.14.15.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Aug 2022 14:15:35 -0700 (PDT) Message-ID: <26a6f44c4b2a24d01b23d692416bf3f73103410d.camel@redhat.com> Subject: Re: [PATCH] nouveau: explicitly wait on the fence in nouveau_bo_move_m2mf From: Lyude Paul To: Karol Herbst , linux-kernel@vger.kernel.org Cc: Ben Skeggs , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, stable@vger.kernel.org Date: Mon, 22 Aug 2022 17:15:34 -0400 In-Reply-To: <20220819200928.401416-1-kherbst@redhat.com> References: <20220819200928.401416-1-kherbst@redhat.com> Organization: Red Hat Inc. Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Reviewed-by: Lyude Paul On Fri, 2022-08-19 at 22:09 +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, -- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat