Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp35250lqh; Fri, 3 May 2024 12:29:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU2N9S+FJhnewcqLZfWILpDlAo72k55UzsPeTlC1psBYMpDLT62v+eM66YP7mHm8c+dTskb9dfXTVTH1oah4U6v0jxLPFUnPrUV3Ho51A== X-Google-Smtp-Source: AGHT+IFSBNHz/PExxH4AfVVed52OtlXtpkv2FuKho2yOBi4IQP6v5WH4RJiHK/7qu7hTxPNWjO/9 X-Received: by 2002:a05:6512:3f1a:b0:51e:1264:8435 with SMTP id y26-20020a0565123f1a00b0051e12648435mr2873751lfa.27.1714764574707; Fri, 03 May 2024 12:29:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714764574; cv=pass; d=google.com; s=arc-20160816; b=1Gwd0QqANj8cHktpB3MuOGnKGFBdGx/2DV+c2MHe9lBNoxVb8hWHqj0qfwEcrl0YsZ SUMOjjFTX3ShtwqPQBE4CBLI7qwwGytzCsdI3bE5+2pbB+hw5fD0KY02g+ogu267pSof 8rqLnO0roZgot/afx3P5un6w/RXxbjeljdmAIgq7c6eyBnrZAh+qaFMB4wHCb6KgCcYM 5LsV9gEsfvLoHJZv1Wwt0d2y89H7ZqF2bVP5o1fOKcijh9jO+zkDkh3/8uBi6j6EDLWT uRx1zQ1cSgMr+CAW/THP2mNTZ6g16uXIQw1OFRW3Uz73VTXweAggmlM7HINZv9PTZrp0 ZgXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter; bh=N7AFVq2aggDVKD4cczY+lJ57ERtHtgg9KAr3Qn5oCf0=; fh=RGded6Vh4YefuEfq0DtdgyqexfaDrrYiAamEjQruy3M=; b=OXTb6QIY3CEtlBhmW/PJ8AYyHtsS44MAqT1wtnFQuYVp+iEinV9ltdOTEOlSDPOszl OqeNkmgU/JkeuCWppCMFWrBdpl30lNhaTtBYhzcYugPD6SVUNkE4YPGAd0GfCjJABkeN YaPgeMETnSi8fLgI02KTniZj6PFgWj5Wqxq5kkIeSTV22JZ+zIw2r1L/M34kP/pYx1ZK js1+MiL8bN8IGk1INVoVnRYLJbPK38jwUdvV46F+KaU1vnZgjQY1PHYvUnwkT4LmUzAo 4zjB6vZM0+M4KnroMTHqC0XG4CAWIPzYKlpgI2adWfz8k6+PoxgiVi45LLMll+CCvM0P 7usA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=Yphn7V1+; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-168121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168121-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q16-20020a1709066ad000b00a55adcea921si1845737ejs.577.2024.05.03.12.29.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 12:29:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=Yphn7V1+; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-168121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168121-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5F5671F23565 for ; Fri, 3 May 2024 19:29:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 50DAC158A03; Fri, 3 May 2024 19:29:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="Yphn7V1+" Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.144.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CE8363CF; Fri, 3 May 2024 19:29:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.144.207 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714764568; cv=none; b=EBgcx2Myxck139qsiwXCfZtW1iX6qon8Q03FLQkC7oIprgusLlvlbC7tkEesaduplw/1Hx1AikDf8ft93xLGmtZUidfWAPNSpDqXMIHNpL6rMT/9+8Yfhb3F0tvyWDc33C+VG+Zy/WC+5KgEIo4tCgEvjcAM9jg+xjWmXdMcnfQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714764568; c=relaxed/simple; bh=9ZqHM4abn7CpGGthTHlMK+mT3y3FvF3yKb+/l5xV6mY=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=UwrqJ8Q6KkBmArhozq4/POKl8nIH4QIQc2+kpvPgGMJgHcscPjUlNaRQFz98w6fQ56kcF4IbJqi0ACpYCHOam/1LGZ2g71al25zrTypEa890uvHQMbSpyq3dIn0+L2s9bizGdBFP8bYuAfmMZrubalkmuApVCkinREGMXEQdaKM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=Yphn7V1+; arc=none smtp.client-ip=192.19.144.207 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id DE0E2C0003CA; Fri, 3 May 2024 12:29:17 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com DE0E2C0003CA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1714764557; bh=9ZqHM4abn7CpGGthTHlMK+mT3y3FvF3yKb+/l5xV6mY=; h=From:To:Cc:Subject:Date:From; b=Yphn7V1+cQVI97VgfZU/RfjVHnOBn0Sr3tpVctdb4+KZQQjXiQPaNSSZWaNecPp/k sy96J/1ekIIYg2n/PwyFWpUiTfyj0HzmktQsHeq5OG/oMvNn9qr9AgqsJ3NefXqaCj D+zbsE71Wl3MeDwmF/D+cHagadkhkLF2m8rps+qM= Received: from fainelli-desktop.igp.broadcom.net (fainelli-desktop.dhcp.broadcom.net [10.67.48.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id E35D018041CAC4; Fri, 3 May 2024 12:29:15 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Daniel Vetter , Helge Deller , Thomas Zimmermann , Javier Martinez Canillas , Sam Ravnborg , Arnd Bergmann , linux-fbdev@vger.kernel.org (open list:FRAMEBUFFER LAYER), dri-devel@lists.freedesktop.org (open list:FRAMEBUFFER LAYER) Subject: [PATCH] fbdev: Have CONFIG_FB_NOTIFY be tristate Date: Fri, 3 May 2024 12:28:54 -0700 Message-Id: <20240503192858.103640-1-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Android devices in recovery mode make use of a framebuffer device to provide an user interface. In a GKI configuration that has CONFIG_FB=m, but CONFIG_FB_NOTIFY=y, loading the fb.ko module will fail with: fb: Unknown symbol fb_notifier_call_chain (err -2) Have CONFIG_FB_NOTIFY be tristate, just like CONFIG_FB such that both can be loaded as module with fb_notify.ko first, and fb.ko second. Signed-off-by: Florian Fainelli --- drivers/video/fbdev/core/Kconfig | 2 +- drivers/video/fbdev/core/fb_notify.c | 3 +++ include/linux/fb.h | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/core/Kconfig b/drivers/video/fbdev/core/Kconfig index db09fe87fcd4..036af8b5914a 100644 --- a/drivers/video/fbdev/core/Kconfig +++ b/drivers/video/fbdev/core/Kconfig @@ -8,7 +8,7 @@ config FB_CORE tristate config FB_NOTIFY - bool + tristate config FIRMWARE_EDID bool "Enable firmware EDID" diff --git a/drivers/video/fbdev/core/fb_notify.c b/drivers/video/fbdev/core/fb_notify.c index 10e3b9a74adc..ef707e092344 100644 --- a/drivers/video/fbdev/core/fb_notify.c +++ b/drivers/video/fbdev/core/fb_notify.c @@ -52,3 +52,6 @@ int fb_notifier_call_chain(unsigned long val, void *v) return blocking_notifier_call_chain(&fb_notifier_list, val, v); } EXPORT_SYMBOL_GPL(fb_notifier_call_chain); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Frame buffer notifier support"); diff --git a/include/linux/fb.h b/include/linux/fb.h index 0dd27364d56f..8c7ae5997278 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -156,7 +156,7 @@ struct fb_blit_caps { u32 flags; }; -#ifdef CONFIG_FB_NOTIFY +#if IS_ENABLED(CONFIG_FB_NOTIFY) extern int fb_register_client(struct notifier_block *nb); extern int fb_unregister_client(struct notifier_block *nb); extern int fb_notifier_call_chain(unsigned long val, void *v); -- 2.34.1