Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5620858rwd; Mon, 12 Jun 2023 07:33:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ss+Qup502L4JVNqBcfeYOTyr1HflwTR2qSw7CjGdYxUuY0NvEzbDqIbWAXp7zFktOxeUB X-Received: by 2002:a17:902:c2c4:b0:1ae:55c8:6b60 with SMTP id c4-20020a170902c2c400b001ae55c86b60mr5421167pla.1.1686580396238; Mon, 12 Jun 2023 07:33:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686580396; cv=none; d=google.com; s=arc-20160816; b=SKjRLJrfzxgrFBaxE4FcnGShuWmg8rp/z9UEzoQm0uEHnCX7UsCJtDa+mGznH/IEWn LR7FIIlvoe+7ldC8zTY4aXKX4KR2kcxPx7TDHTHeK56+hMkwROdIFZ34QjQGQyVPEAOk Qzy/9gzuo1+18zNcrEuepy2lWWMhUxo3UD3O5ItIe/m3KiqQxataNSdrp7mlMfkjeFPc ASjASrLhGV8L2Tta8e2ZugCgB21+cM9uZ18I0XyYiHTWwtNShG4QnoVlP0r95lx8CEo/ tQmP68JTaVl5UoeNxy5Eryd9IfKHcYsisa4az7WbJyy+1XGT9HKWEjQiupnnkjtMxhcZ dCRQ== 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:dkim-signature; bh=0tu/JKMGLiCEE+vfj8wBgGdw9lM3UZPxyBeIhMkARs8=; b=W9LxP+pxcYjurjFozISjr9Tpa6nUP5N7ri9wuwW0VKhY+Cam0wnAwBLSn4w8kTM5dA 5fQrOq8Hz9qZrisdxv/S91TC63EiYqt3vGsk1ugpfip9HV8PbWsRYZW1xJtJCbzuo/+8 Tui+MMyLAOANquRZoVVcE4oFgQv4RqXNJacTK0QE4fUrfHgHCw/WEkiPog36yMYZqnSp ZV++HXKPYIlusprPsskz04O+YiV7z4Wv6xlYtEBBmP9hSqST0xYoTjT8yYPrTNsvD41S qhocAK90oggFLGN4VUN+gvpNbcR2xIb7oqK5YpO8hrI0Su4YyQhLP4qi49J/2Zmrmfvo nb9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=YW7dZ701; dkim=neutral (no key) header.i=@suse.de; 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=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e16-20020a17090301d000b001b3c9bcd6f0si1899154plh.53.2023.06.12.07.33.02; Mon, 12 Jun 2023 07:33:16 -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=@suse.de header.s=susede2_rsa header.b=YW7dZ701; dkim=neutral (no key) header.i=@suse.de; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238003AbjFLOQN (ORCPT + 99 others); Mon, 12 Jun 2023 10:16:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237573AbjFLOO0 (ORCPT ); Mon, 12 Jun 2023 10:14:26 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1CD41739; Mon, 12 Jun 2023 07:14:07 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 2711120303; Mon, 12 Jun 2023 14:14:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1686579246; h=from:from:reply-to: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=0tu/JKMGLiCEE+vfj8wBgGdw9lM3UZPxyBeIhMkARs8=; b=YW7dZ701TvOnqlMR8gFBysNuPUbYNTelX9vLjKSzornfYYZqF0nH4BOrftKaBX8W2D9qOs 5mVyk6TbL1FlvxhtHq7WEHfSW/x4FItGyUgHHaDAz0IFqQXtJAuw8umiJJrosUJ2byDdsN vR8D1ePBy4GbOwa2TG5pluvK+sSnIR0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1686579246; h=from:from:reply-to: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=0tu/JKMGLiCEE+vfj8wBgGdw9lM3UZPxyBeIhMkARs8=; b=Pts4tHT1iMgkfuxBHUYSUhjmjw1VJOQj7Qpj5Mr2WWwSa4WQ+of8NRUgYpCN0dKaI7HfoN 6DWUpN6gVZewJ1Bw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B88181357F; Mon, 12 Jun 2023 14:14:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id UCENLC0oh2RwGQAAMHmgww (envelope-from ); Mon, 12 Jun 2023 14:14:05 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, javierm@redhat.com, sam@ravnborg.org, deller@gmx.de, geert+renesas@glider.be, lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, dan.carpenter@linaro.org, michael.j.ruhl@intel.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-sh@vger.kernel.org, linux-omap@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Thomas Zimmermann , "Rafael J. Wysocki" , Pavel Machek , linux-pm@vger.kernel.org Subject: [PATCH v2 32/38] fbdev/core: Pass Linux device to pm_vt_switch_*() functions Date: Mon, 12 Jun 2023 16:08:10 +0200 Message-ID: <20230612141352.29939-33-tzimmermann@suse.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230612141352.29939-1-tzimmermann@suse.de> References: <20230612141352.29939-1-tzimmermann@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Pass the Linux device to pm_vt_switch_*() instead of the virtual fbdev device. Prepares fbdev for making struct fb_info.dev optional. The type of device that is passed to the PM functions does not matter much. It is only a token within the internal list of known devices. The PM functions do not refer to any of the device's properties or its type. Signed-off-by: Thomas Zimmermann Cc: "Rafael J. Wysocki" Cc: Pavel Machek Cc: linux-pm@vger.kernel.org Reviewed-by: Sam Ravnborg --- drivers/video/fbdev/core/fbmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 329d16e49a900..f91ae7d4c94d6 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -1478,9 +1478,9 @@ static int do_register_framebuffer(struct fb_info *fb_info) INIT_LIST_HEAD(&fb_info->modelist); if (fb_info->skip_vt_switch) - pm_vt_switch_required(fb_info->dev, false); + pm_vt_switch_required(fb_info->device, false); else - pm_vt_switch_required(fb_info->dev, true); + pm_vt_switch_required(fb_info->device, true); fb_var_to_videomode(&mode, &fb_info->var); fb_add_videomode(&mode, &fb_info->modelist); @@ -1520,7 +1520,7 @@ static void unlink_framebuffer(struct fb_info *fb_info) device_destroy(fb_class, MKDEV(FB_MAJOR, i)); - pm_vt_switch_unregister(fb_info->dev); + pm_vt_switch_unregister(fb_info->device); unbind_console(fb_info); -- 2.41.0