Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4765806ybi; Tue, 28 May 2019 02:05:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6v7TF8amBPZOPAS3FgIw8D4IBPmIQnG3qHYfvGwIfdhkiGY6O8Dy6UUuetGKrkIqwe4zw X-Received: by 2002:a63:f54c:: with SMTP id e12mr35622876pgk.62.1559034334185; Tue, 28 May 2019 02:05:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559034334; cv=none; d=google.com; s=arc-20160816; b=k4VcTWT8FdLGSsBKZVXnAKEKvfRHtolqyUfDAisdGnOGTVPt7T9yFcPheR5tERdx9f FVTcdtCcF79BWsL1Ty/HlV1EhMKoCibprIUxL1zHXywQMzvnHReaIbyOScDw51lb5K0j LMhXyW4iyF86nLJtcAmUttPcmM4v22n0a8zuFFZbeFBD8bipQOsK8ljl6stZxv19ruZQ /9GQOsA7BJMBQGURLzdxrQ9DbKJZ59p0LFhxXmeC8BM/dUInTEQfsuotuuO7gbhc2pWO XB7UAuFCxAzBuxVY9CMzPkrArH9zjXwwAGMGnuiCZfpV1B5zQJRKE6WwYYJztbu0uPoc eybQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ooi4hbNCFWLvdn7gPI0VJoLcd+qEK7EqaAEtyPgNrvM=; b=Kf75PDGaBJPhYzV5fqYFufnjy5fiPsBvWdzwH+KimmTMqHSNXsaNMKb1Hp9NR6E7IB HMqO4couwrg4koI3Gg8T8B39PY0vS/GvHasnDZIXoxnIj16DPVnfi7Szxj7ag+QCDgMq 6Jp5mY1NuI5ULKxOLh2ThMi85xcmbKbCsw5DMWeCyLneeCsJdqoEH9MI0cuR9Y6EZFDV Av0EUY6/XwlZvxJTw8MgYFV+zqkSZewAcbqk7oSZV9HQHjUj09rZQE4yV0eedIdSSo10 UNE1oU0IkIeF3YkfYm62/C+n+BS3rrlR9+DfnHaKVqmS8OVbFmeKSB5cvUoJN5q5MgPq bM7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=S8RfuEcj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n65si2733586pji.53.2019.05.28.02.05.18; Tue, 28 May 2019 02:05:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=S8RfuEcj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727193AbfE1JDr (ORCPT + 99 others); Tue, 28 May 2019 05:03:47 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:33601 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727165AbfE1JDn (ORCPT ); Tue, 28 May 2019 05:03:43 -0400 Received: by mail-ed1-f65.google.com with SMTP id n17so30689008edb.0 for ; Tue, 28 May 2019 02:03:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ooi4hbNCFWLvdn7gPI0VJoLcd+qEK7EqaAEtyPgNrvM=; b=S8RfuEcjpgpmoyZCzNoHK8dLIiuaW5CIB+VxCtfy6GnMIvrlpna7ceB7yiYxlqeHrx jBndnR2Hh/seM8PvHDCU54zhrIhNO//uE0eeo4boFXOzPL0By8avIVPg8TTg4Wj8XJK1 ro2g9jS6/je89BQPID7iNTY1Jt2ifOIDPf2Zs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ooi4hbNCFWLvdn7gPI0VJoLcd+qEK7EqaAEtyPgNrvM=; b=BpaX6KdXDA7VC+beuDxH5X/TYDJsyKOC9nbQ5H8FcEKiaij6+IbehTlqXMzaodGzR7 p1Mx62xBfeWy0MKrCpwu2GlRRUyr+5hEkS76G7sTqmQtK5izl8O19VLF9HSZSCvJt4ET 9qLJmPtFekr1WV6ZrihHjCYwOLaypOnWgbdieqe3m9uyEQASpfHLIbNrXkheEujmo8TS 5jbNYrZ1vwMscHh+t9qbZm7Z4bOG91+izHHZM0NOa4N6fs+STsI1WIGeOGg08h0CtWg9 ianMTWq3pB6MpsdVzCUYnUWyARfI58BM72TNxqVzlAG2/q5g0ks6NSJcKKv/roQ1O3Xf 696w== X-Gm-Message-State: APjAAAW2xL9FDwWO2rsCloYj2Qxr6HySvSlJoXfgSSSofU8LUDGvWdYi NKPRXudmsN/ixjcFWWzoTBYGStIogYE= X-Received: by 2002:a17:906:9145:: with SMTP id y5mr57481511ejw.206.1559034221591; Tue, 28 May 2019 02:03:41 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id x49sm4072656edm.25.2019.05.28.02.03.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 May 2019 02:03:40 -0700 (PDT) From: Daniel Vetter To: LKML Cc: DRI Development , Intel Graphics Development , linux-fbdev@vger.kernel.org, Daniel Thompson , Bartlomiej Zolnierkiewicz , Daniel Vetter , Daniel Vetter , Sam Ravnborg , Maarten Lankhorst , Hans de Goede , Greg Kroah-Hartman , Prarit Bhargava , Kees Cook , Konstantin Khorenko , Yisheng Xie , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , Peter Rosin , Mikulas Patocka Subject: [PATCH 21/33] fbdev: directly call fbcon_suspended/resumed Date: Tue, 28 May 2019 11:02:52 +0200 Message-Id: <20190528090304.9388-22-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190528090304.9388-1-daniel.vetter@ffwll.ch> References: <20190528090304.9388-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With the sh_mobile notifier removed we can just directly call the fbcon code here. v2: Remove now unused local variable. v3: fixup !CONFIG_FRAMEBUFFER_CONSOLE, noticed by kbuild Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Cc: Hans de Goede Cc: Greg Kroah-Hartman Cc: Prarit Bhargava Cc: Kees Cook Cc: Konstantin Khorenko Cc: Yisheng Xie Cc: "Michał Mirosław" Cc: Peter Rosin Cc: Mikulas Patocka Cc: linux-fbdev@vger.kernel.org --- drivers/video/fbdev/core/fbcon.c | 10 ++-------- drivers/video/fbdev/core/fbmem.c | 7 ++----- include/linux/fb.h | 8 -------- include/linux/fbcon.h | 4 ++++ 4 files changed, 8 insertions(+), 21 deletions(-) diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index 142686953b71..e3267d71395c 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -2919,7 +2919,7 @@ static int fbcon_set_origin(struct vc_data *vc) return 0; } -static void fbcon_suspended(struct fb_info *info) +void fbcon_suspended(struct fb_info *info) { struct vc_data *vc = NULL; struct fbcon_ops *ops = info->fbcon_par; @@ -2932,7 +2932,7 @@ static void fbcon_suspended(struct fb_info *info) fbcon_cursor(vc, CM_ERASE); } -static void fbcon_resumed(struct fb_info *info) +void fbcon_resumed(struct fb_info *info) { struct vc_data *vc; struct fbcon_ops *ops = info->fbcon_par; @@ -3330,12 +3330,6 @@ static int fbcon_event_notify(struct notifier_block *self, int idx, ret = 0; switch(action) { - case FB_EVENT_SUSPEND: - fbcon_suspended(info); - break; - case FB_EVENT_RESUME: - fbcon_resumed(info); - break; case FB_EVENT_MODE_CHANGE: fbcon_modechanged(info); break; diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index bee45e9405b8..73269dedcd45 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -1917,17 +1917,14 @@ EXPORT_SYMBOL(unregister_framebuffer); */ void fb_set_suspend(struct fb_info *info, int state) { - struct fb_event event; - WARN_CONSOLE_UNLOCKED(); - event.info = info; if (state) { - fb_notifier_call_chain(FB_EVENT_SUSPEND, &event); + fbcon_suspended(info); info->state = FBINFO_STATE_SUSPENDED; } else { info->state = FBINFO_STATE_RUNNING; - fb_notifier_call_chain(FB_EVENT_RESUME, &event); + fbcon_resumed(info); } } EXPORT_SYMBOL(fb_set_suspend); diff --git a/include/linux/fb.h b/include/linux/fb.h index b90cf7d56bd8..794b386415b7 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -126,14 +126,6 @@ struct fb_cursor_user { /* The resolution of the passed in fb_info about to change */ #define FB_EVENT_MODE_CHANGE 0x01 -/* The display on this fb_info is being suspended, no access to the - * framebuffer is allowed any more after that call returns - */ -#define FB_EVENT_SUSPEND 0x02 -/* The display on this fb_info was resumed, you can restore the display - * if you own it - */ -#define FB_EVENT_RESUME 0x03 /* An entry from the modelist was removed */ #define FB_EVENT_MODE_DELETE 0x04 diff --git a/include/linux/fbcon.h b/include/linux/fbcon.h index 38d44fdb6d14..790c42ec7b5d 100644 --- a/include/linux/fbcon.h +++ b/include/linux/fbcon.h @@ -7,12 +7,16 @@ void __exit fb_console_exit(void); int fbcon_fb_registered(struct fb_info *info); void fbcon_fb_unregistered(struct fb_info *info); void fbcon_fb_unbind(struct fb_info *info); +void fbcon_suspended(struct fb_info *info); +void fbcon_resumed(struct fb_info *info); #else static inline void fb_console_init(void) {} static inline void fb_console_exit(void) {} static inline int fbcon_fb_registered(struct fb_info *info) { return 0; } static inline void fbcon_fb_unregistered(struct fb_info *info) {} static inline void fbcon_fb_unbind(struct fb_info *info) {} +static inline void fbcon_suspended(struct fb_info *info) {} +static inline void fbcon_resumed(struct fb_info *info) {} #endif #endif /* _LINUX_FBCON_H */ -- 2.20.1