Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp822907imw; Thu, 14 Jul 2022 11:24:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sCw8NwgIhNHTNLkyYaRng5UCW0com20Wg2gH9wkNusMQ2CRvbdmpMSt2LRMikS1izy5ml9 X-Received: by 2002:a17:902:d48d:b0:16b:f0a8:446c with SMTP id c13-20020a170902d48d00b0016bf0a8446cmr9599497plg.50.1657823053220; Thu, 14 Jul 2022 11:24:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657823053; cv=none; d=google.com; s=arc-20160816; b=oUORhRytuYgDO3/XOK4wuNfwQSeA5F6IR1HcobvonrB3r1PQ91xoGq+W1ABCJFZMiw qGONLPvAhaWaQHNESplDs3yb2Kicyhr1zCLwkw4lHqak5IMEbejPCpFPXB2+iUHnD7Ov t73jLlweJjQ3cDEsNy5Uml/p1eYTPdWLJ8/p5QIcPGX+PL1B1bLyrfr7u1n2kRC5OPb2 m5p0/e1kX35sb1wh/Cb4NR5uD7zqsr6nGyeqpmZepj//7N2u+pgrj85UbInn6CdCRS3M lm2CGlanQw2jNK20B0A1sZiTBV5j4EaYY8d8HpWLIBmwGcsHL2bqgGHm6Jc7PEqoJwU0 3iiA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=R9AEOUmtX+lVZi2/EB6jnvVw/5MhFema8XEZWIvnJww=; b=TrpMuktJcWk59/B1OaRb6QkeRvGs0a+uGhCsgtI2/0FdfYMMQ8EldQ7S4/guyoOm9x Tx9BZ0l5xhcOxe6e8TU/9913WwKDIaPtzLD7wFzznnx3Vyq2SvREjYGb7Qqh55OdAyEt Z77QlSQslg4zlJtzBVgyjAyUN0CAk3M+nHhrBkoznfyQMEnf0YbrXDvP/8Yj0Talmmsc jYIbr7VEJFVOF78TUe+ohuFwPkrxBkBUtpM0ilufj3Vh9VF+CS8UtMkx/xdwc6LufNVi 4sbIAx2gmEBF03JAN+JAfQR/408NXzUcD1SvHdlibPESlD1jSaTwlnyTrQD2DR8Dx9le S/pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FEEV43K9; 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 m12-20020a65564c000000b00408b735eff4si2812365pgs.467.2022.07.14.11.23.58; Thu, 14 Jul 2022 11:24:13 -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=FEEV43K9; 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 S240083AbiGNRnB (ORCPT + 99 others); Thu, 14 Jul 2022 13:43:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239886AbiGNRm6 (ORCPT ); Thu, 14 Jul 2022 13:42:58 -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 ESMTP id 3509C52FE9 for ; Thu, 14 Jul 2022 10:42:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657820577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R9AEOUmtX+lVZi2/EB6jnvVw/5MhFema8XEZWIvnJww=; b=FEEV43K9AmPUFA1ua8PFZsPTAN1/usaIkJ+3O6Wxo2YtaNxW3ffSb/Ap/Le/tqXzjdqfvD hCyff0eP/qa08ZHNRiyRVDkhEzqzFFLjufT/yzQzi7iUKvPqvK7vShyPtXwpFGFAgceVXM apBmxtp6DO9OC2xr5K5cjd/7UKGouqk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-379-BccJ-5lMNxCZ0y_RxTr4yQ-1; Thu, 14 Jul 2022 13:42:54 -0400 X-MC-Unique: BccJ-5lMNxCZ0y_RxTr4yQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7C85418E5383; Thu, 14 Jul 2022 17:42:53 +0000 (UTC) Received: from emerald.redhat.com (unknown [10.22.10.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2E5DB400EAB2; Thu, 14 Jul 2022 17:42:53 +0000 (UTC) From: Lyude Paul To: nouveau@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, Ben Skeggs , Karol Herbst , David Airlie , Daniel Vetter , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 2/2] drm/nouveau: Don't pm_runtime_put_sync(), only pm_runtime_put_autosuspend() Date: Thu, 14 Jul 2022 13:42:34 -0400 Message-Id: <20220714174234.949259-3-lyude@redhat.com> In-Reply-To: <20220714174234.949259-1-lyude@redhat.com> References: <20220714174234.949259-1-lyude@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Spam-Status: No, score=-3.4 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 While trying to fix another issue, it occurred to me that I don't actually think there is any situation where we want pm_runtime_put() in nouveau to be synchronous. In fact, this kind of just seems like it would cause issues where we may unexpectedly block a thread we don't expect to be blocked. So, let's only use pm_runtime_put_autosuspend(). Changes since v1: * Use pm_runtime_put_autosuspend(), not pm_runtime_put() Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nouveau_display.c | 2 +- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index 9f5a45f24e5be..a2f5df568ca54 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -515,7 +515,7 @@ nouveau_display_hpd_work(struct work_struct *work) pm_runtime_mark_last_busy(drm->dev->dev); noop: - pm_runtime_put_sync(drm->dev->dev); + pm_runtime_put_autosuspend(dev->dev); } #ifdef CONFIG_ACPI diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index 5226323e55d34..3c7e0c9d6baf1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -467,7 +467,7 @@ nouveau_fbcon_set_suspend_work(struct work_struct *work) if (state == FBINFO_STATE_RUNNING) { nouveau_fbcon_hotplug_resume(drm->fbcon); pm_runtime_mark_last_busy(drm->dev->dev); - pm_runtime_put_sync(drm->dev->dev); + pm_runtime_put_autosuspend(drm->dev->dev); } } -- 2.35.3