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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84332C7EE23 for ; Wed, 7 Jun 2023 19:25:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230178AbjFGTZf (ORCPT ); Wed, 7 Jun 2023 15:25:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230143AbjFGTZe (ORCPT ); Wed, 7 Jun 2023 15:25:34 -0400 Received: from mailrelay3-1.pub.mailoutpod2-cph3.one.com (mailrelay3-1.pub.mailoutpod2-cph3.one.com [IPv6:2a02:2350:5:402::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B41911FDA for ; Wed, 7 Jun 2023 12:25:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=kSzGrhZeHHFA6vfrZ2LR8W+Xuz6bQ2NOc+2ymmMNnM0=; b=h76YaDkQ9KEY86SkBJIK7Zu4Enw0wNpHBcVhmUgBpVjydT2hAS48Fnof+OaILkoaBDq1/iv2MvciJ zFCHwPg6zxBLmjCVK1BOiWPQVAvcYJ1j2+T+aKRUj1xG8LbcxWtzm/CWEskimaYbT6ZDM5BH2jkIH7 lTx51IzydhS8dOzNDsY42jQSYhHtemMvMZiA2KUS3Bqg3P+WgHnX4Hk0pEbysfuGF4JkfCrO5TMz50 s7n8laMYfpl3dbdP2H3sV1/u76Zan9yUfQ1bJACzSxpks406V0+UvNp2GZnvf3RAlLlyxVyo5SBxO7 fbuBjGDL7jRpFlpn29TGdyQNE+2YITA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=kSzGrhZeHHFA6vfrZ2LR8W+Xuz6bQ2NOc+2ymmMNnM0=; b=vboEswhlVEDQlrEBHy9SKyPCu7hxQ/FQGvK2EVLt3AfPI8xQHLCiCGcuYD0YlmIxPuNcTUIsJMfSB 1ypYZxqAg== X-HalOne-ID: 0f4d33df-0569-11ee-8726-b90637070a9d Received: from ravnborg.org (2-105-2-98-cable.dk.customer.tdc.net [2.105.2.98]) by mailrelay3 (Halon) with ESMTPSA id 0f4d33df-0569-11ee-8726-b90637070a9d; Wed, 07 Jun 2023 19:25:29 +0000 (UTC) Date: Wed, 7 Jun 2023 21:25:28 +0200 From: Sam Ravnborg To: Thomas Zimmermann Cc: daniel@ffwll.ch, javierm@redhat.com, deller@gmx.de, geert+renesas@glider.be, lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, 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, "Rafael J. Wysocki" , Pavel Machek , linux-pm@vger.kernel.org Subject: Re: [PATCH 24/30] fbdev/core: Pass Linux device to pm_vt_switch_*() functions Message-ID: <20230607192528.GA670717@ravnborg.org> References: <20230605144812.15241-1-tzimmermann@suse.de> <20230605144812.15241-25-tzimmermann@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230605144812.15241-25-tzimmermann@suse.de> Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org On Mon, Jun 05, 2023 at 04:48:06PM +0200, Thomas Zimmermann wrote: > 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 329d16e49a90..f91ae7d4c94d 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.40.1