Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3054272rwe; Mon, 29 Aug 2022 05:12:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR5B+r1ACXoEvsgvlxeDsgpHez3Qwk3tFPmDxh1j254lSJsMbSHQFzseNS9sG1zSfS+Xcdfx X-Received: by 2002:a17:90b:1a88:b0:1fd:6a42:3eb9 with SMTP id ng8-20020a17090b1a8800b001fd6a423eb9mr16241762pjb.154.1661775168264; Mon, 29 Aug 2022 05:12:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661775168; cv=none; d=google.com; s=arc-20160816; b=qsNCggEwl9++i7vMCyZx8AWgkdJBDxfKOhM7zH/ERqHGXcPeKRRXvlcjrEVZCGR4h0 8cuzrm/B2YyaEbMcQSpRFbX4taY7gK4x+OZkhQ9wGqJ2YeHxy/yGnOw8/gfL5klu9N8v BMt7ajBhnms37S2iyG5ZV63Fv+maAqPTnbAiMADFNRPOeZahFLIhCbvelv44qJtw81b8 pcJYrrO+8X4CTF/bozOpdVG8X/5WKxwa95YINS2gYt3Tx0RQaBq8HdH1mn7yCYnh1nD4 w2UzroOBiwsdynWnOLEOBa9HTrEO+ssRlSsR5TT0e5lf6UJgsH+aYe/jsgc7ly/4QWht TUIw== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BMnDF0ijrv1qhKLTHRPB8+EeaMJs+I/dBUJgNBlW2hQ=; b=JeUkKdz9YCMys8nb55L4UILcox+2IgSAjk7U5nkbo4QoiUDHxgEE13t6shwVLdf4Cq hzDM+Qov4UloitAR00vcFAmlMSWpC82RMbDo3Jc5XbRXsJe4jjCttcuUj88THZd7T+mZ rPK+O0D/khx4/KxZOvQfhXvh6RdadnwBXw4YEIFF7g9SE/ibkY1c9DJJ0wLylLhV8NGT iIPskAoqrcY612+/laRz9j6+H2vxHLdfMNCe6+DQfLhHWP0Kezg9XVCHzVGw2ExQpiiM pEhEQXMPJfZP4cEG16SRb7NuofeGhBHM1DbcYIeuzWMlnrwcTqhG+dnH+21395/X1veD l2KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rCQowzh3; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g126-20020a636b84000000b0041c30d5db34si8181888pgc.640.2022.08.29.05.12.36; Mon, 29 Aug 2022 05:12:48 -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=@linuxfoundation.org header.s=korg header.b=rCQowzh3; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232589AbiH2Lck (ORCPT + 99 others); Mon, 29 Aug 2022 07:32:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232728AbiH2L3q (ORCPT ); Mon, 29 Aug 2022 07:29:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C36997393D; Mon, 29 Aug 2022 04:18:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 70981B80EFA; Mon, 29 Aug 2022 11:17:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2950C433D6; Mon, 29 Aug 2022 11:17:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661771869; bh=f+sxPNp24pAkBBPm+zWJ/V2IkOpA4s2q0og+aCyQKIw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rCQowzh3bYdUgiYF1+ONvwcCwW9vwkbD9IElU9UxIij/f+1uTJ40A9XKqeueiOuLT wFPxoxp8uwLcmZooDrn15fxuByLcfg0mL05ZGp4HWAE+DFPSEjF2kndGq7pVuvsgy7 8+c8qNZ1hbWoGZXE7oq5Vb51ksv6hxTMMUXGT3WA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Karol Herbst , Lyude Paul Subject: [PATCH 5.19 125/158] nouveau: explicitly wait on the fence in nouveau_bo_move_m2mf Date: Mon, 29 Aug 2022 12:59:35 +0200 Message-Id: <20220829105814.337312403@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220829105808.828227973@linuxfoundation.org> References: <20220829105808.828227973@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 From: Karol Herbst commit 6b04ce966a738ecdd9294c9593e48513c0dc90aa upstream. 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 Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20220819200928.401416-1-kherbst@redhat.com Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/nouveau/nouveau_bo.c | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -820,6 +820,15 @@ nouveau_bo_move_m2mf(struct ttm_buffer_o 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,