From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D169C433DF for ; Wed, 29 Jul 2020 21:37:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A12E2173E for ; Wed, 29 Jul 2020 21:37:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="b9Vaf3OT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727878AbgG2VhW (ORCPT ); Wed, 29 Jul 2020 17:37:22 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:54349 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727850AbgG2VhU (ORCPT ); Wed, 29 Jul 2020 17:37:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596058639; 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=sR2vU1PQmXTKpGd2MHtYS6eYOz749Xigg1bpVAIIrEA=; b=b9Vaf3OTwfuHb0hBAnsZ5L1gFrd/u/HcP4EID4oPTNK8MNYsiqsnectNAAM/bisM0wWFTs 0w3dFLqj/cg7aZu2Mnl856VyOJagnc92lQjlPDgDZJ1PSVufU0ud6RqEFIAa5zkJzjHCT4 WJFqgQZdtT47/gWaNF0pWbzv/o9UORI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-136-Gh_hUCNvOjaF_FgO_CwA5w-1; Wed, 29 Jul 2020 17:37:17 -0400 X-MC-Unique: Gh_hUCNvOjaF_FgO_CwA5w-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B8066800685; Wed, 29 Jul 2020 21:37:15 +0000 (UTC) Received: from Ruby.redhat.com (ovpn-119-146.rdu2.redhat.com [10.10.119.146]) by smtp.corp.redhat.com (Postfix) with ESMTP id EDD02619B5; Wed, 29 Jul 2020 21:37:14 +0000 (UTC) From: Lyude Paul To: nouveau@lists.freedesktop.org Cc: Ben Skeggs , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org (open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 5/9] drm/nouveau/kms/fbcon: Use pm_runtime_put_autosuspend() in suspend work Date: Wed, 29 Jul 2020 17:36:59 -0400 Message-Id: <20200729213703.119137-6-lyude@redhat.com> In-Reply-To: <20200729213703.119137-1-lyude@redhat.com> References: <20200729213703.119137-1-lyude@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While I don't know of any problems this has caused, it's definitely not a great idea for us to potentially block in nouveau_fbcon_set_suspend_work(). We don't really need to anyway, and want to simply trigger the autosuspend timer instead. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index b936bf1c14dec..2234f012ca0c3 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -468,7 +468,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.26.2