Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2811313rwb; Mon, 15 Aug 2022 11:49:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Zq2w1PSE8QTyATVrXJBnHHtE7G0CVXNYmYzZYcbzszRMAGXtRcbt00ghiV2haAU0On7Na X-Received: by 2002:a05:6402:1703:b0:43c:c03a:db3d with SMTP id y3-20020a056402170300b0043cc03adb3dmr15582287edu.384.1660589366969; Mon, 15 Aug 2022 11:49:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660589366; cv=none; d=google.com; s=arc-20160816; b=ZMAFiztdhoXQx1u3yNOqjx2NXcFXU21TDPJKAhrSrLkStlz/eD4oKa1U3T1AGVTzbI 2kuwnLOwZQ/z0NdYbM9GIzOQnum6CuL6dDgHUPP8Jkl8haS+zq4z6aiaEHqHE6Rx6+ue xYxBjBso1R0iCO+zjtcExhGIeBkHlT45a16OivUd1U269IUoiIoh8NRTZS37D2GOl48z dILGk138acmjvEeKRrSSwuex77f52uufooPTKODi6xvy+yBUbQC+5TgJl3hR/1O3nqu6 PLFkjbiqnF2W1acXxVf6H5sevLiHZP9jeS39qRE5QuIkd0NbKVcXOkXQnTYng74+nARx mIzQ== 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=7tVSu9iXlNk5WAdJSUtHWYKyK8wvVssVvBcKEyZV1n4=; b=0OlAHJZ38cPcRZpvaqdltsEcx90E5vLEgmxH4UvOP8RCnNMeSEjfg0EBj1NnGHv7Oc vpTXUiaTUVMvgYPwQ/IlbDO5gQkgHj/NdLtJ1nPGLyWDDZZAA3W/DJTR6FKPSfXOdQeK 8VaHVNc9zUnejz2dkAOAIT5QFy1BzYFmCklYPTyBSBfhTLbvvfIUSL/z9VgeWssLUL2z vq9/nvG/x6cSjhlw/qOvB//uKINJnrDIHAAq+pejHKx3aL6zLxfAVpAxLr11LOn/nO1o rh7gU8bmFh6wNEmMSgQbERcdt+14/3quqZ8OARS7Usw9m3J4EDKI4oKBFt5ex/utbnWM 8nQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vJeQIOGz; 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 d6-20020a50f686000000b0043e0edaf406si8904573edn.365.2022.08.15.11.49.01; Mon, 15 Aug 2022 11:49:26 -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=vJeQIOGz; 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 S240357AbiHOSTt (ORCPT + 99 others); Mon, 15 Aug 2022 14:19:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239678AbiHOSSr (ORCPT ); Mon, 15 Aug 2022 14:18:47 -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 657B02A40C; Mon, 15 Aug 2022 11:16:14 -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 01C06B81063; Mon, 15 Aug 2022 18:16:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56A02C433C1; Mon, 15 Aug 2022 18:16:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587371; bh=EgecuUMgl7Y7fKygetIR9RQpkX9ejRqs7beDFWaldQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vJeQIOGzg1JTOwq/QJv09qyK+rm1yownDdt/9HgDgel8VnoSK+Oxi1CYk7EXnocUY MFKLad4KeaG+Y3pp8mssAzlD7MGgpOgxWTmMFiEFGaCNas3fhxGCcVFMYNAbC9tcZf E417pp1sFVFBaHucRe/x+D25guhZUaBYADFtTUF0= 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.15 065/779] drm/nouveau: Dont pm_runtime_put_sync(), only pm_runtime_put_autosuspend() Date: Mon, 15 Aug 2022 19:55:09 +0200 Message-Id: <20220815180340.049109167@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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 @@ -518,7 +518,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 @@ -466,7 +466,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); } }