From patchwork Thu Jul 6 12:57:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 9828271 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 9E5CB60361 for ; Thu, 6 Jul 2017 13:03:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F26128621 for ; Thu, 6 Jul 2017 13:03:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 82B372862C; Thu, 6 Jul 2017 13:03:45 +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 0385828621 for ; Thu, 6 Jul 2017 13:03:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751994AbdGFNDi (ORCPT ); Thu, 6 Jul 2017 09:03:38 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:35187 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752081AbdGFNDf (ORCPT ); Thu, 6 Jul 2017 09:03:35 -0400 Received: by mail-lf0-f66.google.com with SMTP id z78so245719lff.2 for ; Thu, 06 Jul 2017 06:03:34 -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=Qk5bot7573UdGoO89Kie9TRLEU/mrkKg8jx+63xW/80=; b=BD0iB/OrbvuVPpoqudR7k8NS11GB4YmZGsbkF695ciQwmdsz2D+3+r451xJ6O6xDYf r3FhnfQySSrT/4yruQCbjsARWyJHTXCTCnhJMoB4+6DnpRsJz8wVrJO7SWX/2cJuVRTX 6cisW2SmY4kaFC+ng02SD3pUqn8aiyPIXove4= 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=Qk5bot7573UdGoO89Kie9TRLEU/mrkKg8jx+63xW/80=; b=p2VRxT1eliUsK42FfD3BPmi2TXkfOS7C5n+OxjaTpIi0DNkvCKyKVNwsBSiVtUXQu2 9D4sQQUuZS8c7bE/UNbToPszHbwkU3vXFo+ZhNuUal3gCWmUdYbjGoiXN3j7ed2zDTbY EiZ6KMeq5ez4ia0rjf3YBMr064cRC0ZHa1YyO/UIZTFc0PMJ8ogEKveilQcza3pcTyWJ 5tJ2HeNVOXSQFY009XPS22AH290HrZgATMwdYQh+X8OL5GvbqFhPzGTJWX6o5cYBx2dV /5BU3vHAUkRD0PcxMcm++VQjeqzPslP13p0rsCti/QXaOTRfWZyEmpuBRfLNr4sBZ+sC lK3A== X-Gm-Message-State: AKS2vOx47x/AtBX07xlkVcKNImMuhen0g/TB+WQfguKXuTin1ZiGvS8k k6B+sMwlfDOFa1nP X-Received: by 10.80.137.67 with SMTP id f3mr25794654edf.152.1499345864703; Thu, 06 Jul 2017 05:57:44 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:5640:0:960b:2678:e223:c1c6]) by smtp.gmail.com with ESMTPSA id 2sm406636edt.36.2017.07.06.05.57.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jul 2017 05:57:44 -0700 (PDT) From: Daniel Vetter To: DRI Development Cc: linux-fbdev@vger.kernel.org, Intel Graphics Development , Daniel Vetter , Bartlomiej Zolnierkiewicz , Daniel Vetter Subject: [PATCH 2/4] fbdev: Nuke FBINFO_MODULE Date: Thu, 6 Jul 2017 14:57:33 +0200 Message-Id: <20170706125735.28299-3-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170706125735.28299-1-daniel.vetter@ffwll.ch> References: <20170706125735.28299-1-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. 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 ++-- include/linux/fb.h | 7 +------ 3 files changed, 4 insertions(+), 9 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/include/linux/fb.h b/include/linux/fb.h index a964d076b4dc..40b767fa622f 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,11 +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