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: 9834923 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 7A209602BD for ; Tue, 11 Jul 2017 14:52:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6AD0F28511 for ; Tue, 11 Jul 2017 14:52:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F54628516; Tue, 11 Jul 2017 14:52:30 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 16D5C28511 for ; Tue, 11 Jul 2017 14:52:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ECD0E6E1CB; Tue, 11 Jul 2017 14:52:28 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2FA1A6E1CB for ; Tue, 11 Jul 2017 14:52:27 +0000 (UTC) Received: by mail-wr0-x242.google.com with SMTP id 77so401995wrb.3 for ; Tue, 11 Jul 2017 07:52:27 -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=KEHOSwG3qjIDL1HJiVkjmSxDIzKKTAufkxW2IPRrrov+5uRfsVpoqtApq+aCrXSSbp YAGeJtV4fNFnFkWIi1yxdmepBSnKa+jQTJjEipYdHGU0zDsvbPcCJdykqrs9HHmdcAyC 2bzOD/AKkcDAlPmR9SoCjCfKVgdmomopujHhK+J+FA+mjwncV0xHF1PPe6/cOtxqKXdz n8XJ5998bjQB6VVxbQfmsSeOYE/kN6w5CtpWc1QyZxydI4JTsJDuhm4BKpFB0dPLDGuW DzTc4EqP3bm+cc9aMJAxkCaK4e383zgRiT2FFNgbkpXbGLaJ42oqxqGcPmB1LjNZ1PAR IIYA== X-Gm-Message-State: AIVw112j6iMh77Kxg0IE77ws1Kz49obGI/ChZvk3qRBPGWcwfsMaL6yJ FP1UB/2VoLVEMYURCok= 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 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> Cc: Daniel Vetter , Daniel Vetter , Intel Graphics Development , linux-fbdev@vger.kernel.org, Bartlomiej Zolnierkiewicz X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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