From patchwork Tue Jul 11 14:52:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 9834919 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CE873602BD for ; Tue, 11 Jul 2017 14:52:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C05632015F for ; Tue, 11 Jul 2017 14:52:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B522628516; Tue, 11 Jul 2017 14:52:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0BE82015F for ; Tue, 11 Jul 2017 14:52:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755800AbdGKOw1 (ORCPT ); Tue, 11 Jul 2017 10:52:27 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:34415 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755310AbdGKOw1 (ORCPT ); Tue, 11 Jul 2017 10:52:27 -0400 Received: by mail-wr0-f196.google.com with SMTP id k67so416495wrc.1 for ; Tue, 11 Jul 2017 07:52:26 -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; bh=6EdvC9QmV70slt+IrA1jBS4PS7Mge2bZXRzxrlxyvrY=; b=Esag4svjvB8DdecGqv8jIKl3S4gedQj1wePRAb241UEAoWW3gxnXFwlXgR6qxOBA1q r8wOOQ+tCDCq8UbDosaE0sRvZDSt3aZSHYVVQxD4/ZaQ0TA4eNBPWdO3A8sz0X3B79gb Ku4yZ/zBpr4dFgDRYjiS/f6EfrVBsSHsO9LyA= 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; bh=6EdvC9QmV70slt+IrA1jBS4PS7Mge2bZXRzxrlxyvrY=; b=Rr1L7hxA566sE2rgyKseWUPgBJDLR6yQSGyCO4GMEMF41GcglZgcphMWqO0pvgWvKa AptUbqA3lJZtstnHzuZKIX4PiXtd3gkuY8CCm9gry2UBTM/MM1WPmGWTSt2suJUihaR8 G4PpUOZUu+drfkQ7Z3jkvuYNo0xahRb3mBtg2uAg8f6D8gAAEjK92YLyA9ekryJrC2On eQs1sJMPziUXiTs41+s6AipzGb9nf5iknxFDrXdPl0oYb71Z79Gb5OITmtPAU4o6kgtE FzRc8EBcwiNw3h56sxid7PeTU3yhCBd3M991Izm2OhMwltFk6A723MJ/1S32WB8G+xsE 7zzg== X-Gm-Message-State: AIVw111C9bCogoUi4nJKbpldP6r1UZPlyFHtKTOY5ygGdqdk2FsxmyBq yo1a99iE0f2Z2kjf X-Received: by 10.80.190.205 with SMTP id e13mr2933245edk.12.1499784745564; Tue, 11 Jul 2017 07:52:25 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:5640:0:960b:2678:e223:c1c6]) by smtp.gmail.com with ESMTPSA id e37sm994837edb.65.2017.07.11.07.52.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jul 2017 07:52:24 -0700 (PDT) From: Daniel Vetter To: DRI Development Cc: Intel Graphics Development , Daniel Vetter , Bartlomiej Zolnierkiewicz , linux-fbdev@vger.kernel.org, Daniel Vetter Subject: [PATCH] fbdev: Nuke FBINFO_MODULE Date: Tue, 11 Jul 2017 16:52:19 +0200 Message-Id: <20170711145219.22410-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170706125735.28299-3-daniel.vetter@ffwll.ch> References: <20170706125735.28299-3-daniel.vetter@ffwll.ch> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Instead check info->ops->owner, which amounts to the same. Spotted because I want to remove the pile of broken and cargo-culted fb_info->flags assignments in drm drivers. v2: Fixup matrox (reported by kbuild). Also nuke FBINFO_FLAG_* defines that I've failed to spot. v3: Don't nuke FBINFO_FLAG_DEFAULT, that's used all over the place. Cc: Bartlomiej Zolnierkiewicz Cc: linux-fbdev@vger.kernel.org Signed-off-by: Daniel Vetter Acked-by: Bartlomiej Zolnierkiewicz Reviewed-by: Sean Paul --- drivers/video/fbdev/core/fbcon.c | 2 +- drivers/video/fbdev/core/fbmem.c | 4 ++-- drivers/video/fbdev/matrox/matroxfb_base.c | 4 +--- include/linux/fb.h | 10 +--------- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index 86b3bcbd01a8..431a1533a2fe 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -564,7 +564,7 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info, unsigned short *save = NULL, *r, *q; int logo_height; - if (info->flags & FBINFO_MODULE) { + if (info->fbops->owner) { logo_shown = FBCON_LOGO_DONTSHOW; return; } diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 283d57cf8526..2636f192e8c9 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -463,7 +463,7 @@ static int fb_show_logo_line(struct fb_info *info, int rotate, /* Return if the frame buffer is not mapped or suspended */ if (logo == NULL || info->state != FBINFO_STATE_RUNNING || - info->flags & FBINFO_MODULE) + info->fbops->owner) return 0; image.depth = 8; @@ -601,7 +601,7 @@ int fb_prepare_logo(struct fb_info *info, int rotate) memset(&fb_logo, 0, sizeof(struct logo_data)); if (info->flags & FBINFO_MISC_TILEBLITTING || - info->flags & FBINFO_MODULE) + info->fbops->owner) return 0; if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) { diff --git a/drivers/video/fbdev/matrox/matroxfb_base.c b/drivers/video/fbdev/matrox/matroxfb_base.c index 11eb094396ae..15b412b4b783 100644 --- a/drivers/video/fbdev/matrox/matroxfb_base.c +++ b/drivers/video/fbdev/matrox/matroxfb_base.c @@ -1794,9 +1794,7 @@ static int initMatrox2(struct matrox_fb_info *minfo, struct board *b) minfo->fbops = matroxfb_ops; minfo->fbcon.fbops = &minfo->fbops; minfo->fbcon.pseudo_palette = minfo->cmap; - /* after __init time we are like module... no logo */ - minfo->fbcon.flags = hotplug ? FBINFO_FLAG_MODULE : FBINFO_FLAG_DEFAULT; - minfo->fbcon.flags |= FBINFO_PARTIAL_PAN_OK | /* Prefer panning for scroll under MC viewer/edit */ + minfo->fbcon.flags = FBINFO_PARTIAL_PAN_OK | /* Prefer panning for scroll under MC viewer/edit */ FBINFO_HWACCEL_COPYAREA | /* We have hw-assisted bmove */ FBINFO_HWACCEL_FILLRECT | /* And fillrect */ FBINFO_HWACCEL_IMAGEBLIT | /* And imageblit */ diff --git a/include/linux/fb.h b/include/linux/fb.h index a964d076b4dc..f4386b0ccf40 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -400,7 +400,7 @@ struct fb_tile_ops { #endif /* CONFIG_FB_TILEBLITTING */ /* FBINFO_* = fb_info.flags bit flags */ -#define FBINFO_MODULE 0x0001 /* Low-level driver is a module */ +#define FBINFO_DEFAULT 0 #define FBINFO_HWACCEL_DISABLED 0x0002 /* When FBINFO_HWACCEL_DISABLED is set: * Hardware acceleration is turned off. Software implementations @@ -533,14 +533,6 @@ static inline struct apertures_struct *alloc_apertures(unsigned int max_num) { return a; } -#ifdef MODULE -#define FBINFO_DEFAULT FBINFO_MODULE -#else -#define FBINFO_DEFAULT 0 -#endif - -// This will go away -#define FBINFO_FLAG_MODULE FBINFO_MODULE #define FBINFO_FLAG_DEFAULT FBINFO_DEFAULT /* This will go away