Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1883237rwb; Fri, 19 Aug 2022 11:01:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR7um3ELLRv+Mc7BDkmpHzUERG/B3uujkWPz9pS3H2m6jB1tT8JqVWIeKz7n7VKap+EuZoek X-Received: by 2002:a17:90b:2685:b0:1fa:b21d:34ce with SMTP id pl5-20020a17090b268500b001fab21d34cemr9606980pjb.188.1660932111532; Fri, 19 Aug 2022 11:01:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660932111; cv=none; d=google.com; s=arc-20160816; b=O+FK79A41W/6hMppYphfIsQ/YKmVy0Mb0WxJ0qLApfXzLkS3jHz0UigK45MBcxnHUt kTN4hUj8ZCnIyORmkzNJT3sSRG8/6VHhhj5t965oYGcb7m2BMjAMKRHZLsAiUBR581ke MYz4r04ffiK40srtm6kSy7FVqlroTi5zMbL8z3v5h4ORrbwKh8oTK+rmhHMQuVaHaDq6 wXeERUgFXoxDLvRRwfDwz+wiZ/G0A+Fsv/SGd70RkzsXfbssow3BtVc27KlaoGCsZ+bQ aXYpp01mZ4w68ka04TKdSEk8hnDxzxrPHRlOVKa6ufletL++ulCDxEDY/Lj5JVj3GEzd OHgQ== 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=LinxqF322S4xg64J0ikiKzrGXOsURO6xeB1cslKNuz8=; b=Bp9PvpK+Zmi7Ji6zl6Rww0yaik9p8n5Mh1ggjxH8e+envEIjzXh21hi7p1rk1gQoZ2 HdXcS3TB1GyaxeKOvy4aVsu3wvmEyA1F1b1H3rte9ncGAaU5rsABQ/wbUXzHuxtGCU+k LRU3r0YSm/qNA4Wk3G1v+/6jdTdaSbWMbuuXi/k6ZAxoDPHDVRpD0g/ugpYHShXWXZJp o/pXbH1yAs51nQBYjpUliItt9/bvmZQHT7NMv8vd0cYUlhJfGoeMgzmYAUQk9UXdnTu8 4AmVvD1gnprxh7qzkPFFD9rwIhzp18t2FjhdYhYQm/Co1alOVMuIWJFLJhQy5f7xYKly ZaiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yOvr9bMc; 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 o17-20020a170902779100b001727d67b58dsi4342874pll.38.2022.08.19.11.01.40; Fri, 19 Aug 2022 11:01:51 -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=yOvr9bMc; 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 S1350288AbiHSPvU (ORCPT + 99 others); Fri, 19 Aug 2022 11:51:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350304AbiHSPuC (ORCPT ); Fri, 19 Aug 2022 11:50:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F4C810520F; Fri, 19 Aug 2022 08:47:55 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 96E30616E8; Fri, 19 Aug 2022 15:47:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A005BC433C1; Fri, 19 Aug 2022 15:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924074; bh=IOxgtDmPpVjP8587LHjBfY0P8ncSQRLCxaF/iEAO7LE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yOvr9bMcrBjlWjeaW5JcNt2mqP0rXUKFYHyaZjrRWESqfBfx92tDs8w4m92+JgbSk 2hBp0nX8Z0a/LibxOeHGulILAAY0otU71NBsQcNvRFWpsW+RAmXU0XnH6Oxl6j9TG/ ln2OH9yJ/4J1ip22bE8lw3xQFui/CS7Gi1qucMJ0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lyude Paul , David Airlie , Hans de Goede Subject: [PATCH 5.10 045/545] drm/nouveau: Dont pm_runtime_put_sync(), only pm_runtime_put_autosuspend() Date: Fri, 19 Aug 2022 17:36:55 +0200 Message-Id: <20220819153831.233833810@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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: Lyude Paul commit c96cfaf8fc02d4bb70727dfa7ce7841a3cff9be2 upstream. 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 Reviewed-by: David Airlie Fixes: 3a6536c51d5d ("drm/nouveau: Intercept ACPI_VIDEO_NOTIFY_PROBE") Cc: Hans de Goede Cc: # v4.10+ Link: https://patchwork.freedesktop.org/patch/msgid/20220714174234.949259-3-lyude@redhat.com Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/nouveau/nouveau_display.c | 2 +- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -521,7 +521,7 @@ nouveau_display_hpd_work(struct work_str 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 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -464,7 +464,7 @@ nouveau_fbcon_set_suspend_work(struct wo 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); } }