From patchwork Tue Jul 11 09:26:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 9834313 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 B1C8B60318 for ; Tue, 11 Jul 2017 09:27:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A27C527A98 for ; Tue, 11 Jul 2017 09:27:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96A29283C7; Tue, 11 Jul 2017 09:27:10 +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 1B5FC27A98 for ; Tue, 11 Jul 2017 09:27:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755647AbdGKJ1I (ORCPT ); Tue, 11 Jul 2017 05:27:08 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:34621 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755639AbdGKJ1D (ORCPT ); Tue, 11 Jul 2017 05:27:03 -0400 Received: by mail-lf0-f67.google.com with SMTP id g21so13530692lfk.1 for ; Tue, 11 Jul 2017 02:27:02 -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=IdI7AaDV32m6na2wXvSSddxvptM0kTI2m2kT1WdpT0c=; b=VpCg6f3UIoFllRrQpRZrvXT2ay4x8ryKBNHp7ZHH7CTIN4fMCenIJSvOsqhDbcqKV/ oahylmklfKMFmn44TFvFFkS+7DinfjULvYxf0Q82kGmeakAuQPpsruIuxuvykdyM3YXR 6NHUho4yv6hx1ZTe2a2NjsEWEkrrWfABXMm1Y= 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=IdI7AaDV32m6na2wXvSSddxvptM0kTI2m2kT1WdpT0c=; b=QvIkB2fpotUgKQN5ShWAzvwbqkVpEBtb+s3MFoPWPQ+EpL1wNk2L0IsKjyQQXw4AP2 IJP01HdKJNyq6kSgU9q6Z77JnavmXvKMtzJehUqLZ6OrPZhQSEzFiREXgy7XltVIn3EL XU6rYk/3jcbn2rrIXhg1Yxf66IDkiKzgxKp/XVZ53glcEAt+7z0+mM71jj9zQBdD59ny nXTmDnoOppjlujofCOdeYOHoWiEK3D/ITXAkm6JQvrAJHUzkD2ZfhVCilrgI7slzhQwj Uj1m3NB0VPcOkb+4MMeDy3nfW4E5qRT4Ak0DlDwQVg8xvHFD4cVKIrITShKbD6x5QXXR rQ9Q== X-Gm-Message-State: AIVw113OcI0NJNmnklQ23BE6GWu5NNLhohex1dzIIRE05pYwq9/+iN1w 5o8LR9aUmhdrAatV X-Received: by 10.80.152.194 with SMTP id j60mr1799516edb.98.1499765221403; Tue, 11 Jul 2017 02:27:01 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:5640:0:960b:2678:e223:c1c6]) by smtp.gmail.com with ESMTPSA id c11sm655504eda.0.2017.07.11.02.27.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jul 2017 02:27:00 -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 11:26:53 +0200 Message-Id: <20170711092653.28065-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. Cc: Bartlomiej Zolnierkiewicz Cc: linux-fbdev@vger.kernel.org Signed-off-by: Daniel Vetter --- 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 | 11 +---------- 4 files changed, 5 insertions(+), 16 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..4c021b6dc384 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,15 +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 * fbset currently hacks in FB_ACCELF_TEXT into var.accel_flags