From patchwork Thu Jan 18 09:05:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 764355 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44AE9D51B for ; Thu, 18 Jan 2024 09:07:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705568846; cv=none; b=UI6GuKvJXUK7OcK2cVchy0zaVyWNMdVnz9a606ABkzb3R9DmOk/Rz4wjpVfvkKW/Y+yxOyyCgm2WVeXEsWDJkgCabg0jyLIOGJ4p0WzgP93/HH6yx3sLbQ2CXm8ehLAFmr9L4TTXn72jcph/oC3KwVfN3s9QyespZaq8XX6JHi8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705568846; c=relaxed/simple; bh=KXn+Da1Cz0FPoYPFPAYY2asaLCTlAZTiB+kLytLir1M=; h=Received:DKIM-Signature:DKIM-Signature:DKIM-Signature: DKIM-Signature:Received:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Spamd-Result:X-Spam-Level:X-Spam-Flag: X-Spam-Score; b=oGObuBymot5kc5kWIqQ4ipC2Rs6Fu4WbfY8U+mF9TA7y9eyfBqGVOWu5QeeZbuEr98rMNC/PfxkSdNQ78f2ZBkT+KzPtw8ysGUjWF9mRRXtM/pV71WdKlW87xDDlfcTHt891d7UFF1B/uOcX5mUMH7Cp/nKgwmgY02CM6DYz5HY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=mFsNO/kk; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=LQAsO2lk; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=mFsNO/kk; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=LQAsO2lk; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="mFsNO/kk"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="LQAsO2lk"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="mFsNO/kk"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="LQAsO2lk" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5AB0121F35; Thu, 18 Jan 2024 09:07:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1705568843; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=86J5hea7k/j7DdLyiqddOBIwOfygrZ3Xk/R9qBHTfnk=; b=mFsNO/kka65fJQmtzexEJgpvnrfZoaStauPEx4iupWiTTp9qk5XqQ3cflIG5LMvP1KIhue +h7HcvII9bSEDFjtY8UkaZAlfUPg8VcwJF79W+VpaahszvsgZD1Q3P7ob+KBaW58Nzs2CS CdU8A5R70OWy5EzvtQjEE2pXWTAU21E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1705568843; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=86J5hea7k/j7DdLyiqddOBIwOfygrZ3Xk/R9qBHTfnk=; b=LQAsO2lk0Jys2+QGfBblgrHXbMKGF8sCf/JiDmAJyNIFdqy1OyqLo6aqafTpJqKTLee8rk dpxm57qAydTeZAAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1705568843; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=86J5hea7k/j7DdLyiqddOBIwOfygrZ3Xk/R9qBHTfnk=; b=mFsNO/kka65fJQmtzexEJgpvnrfZoaStauPEx4iupWiTTp9qk5XqQ3cflIG5LMvP1KIhue +h7HcvII9bSEDFjtY8UkaZAlfUPg8VcwJF79W+VpaahszvsgZD1Q3P7ob+KBaW58Nzs2CS CdU8A5R70OWy5EzvtQjEE2pXWTAU21E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1705568843; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=86J5hea7k/j7DdLyiqddOBIwOfygrZ3Xk/R9qBHTfnk=; b=LQAsO2lk0Jys2+QGfBblgrHXbMKGF8sCf/JiDmAJyNIFdqy1OyqLo6aqafTpJqKTLee8rk dpxm57qAydTeZAAA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 292F41387C; Thu, 18 Jan 2024 09:07:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id WG3mCEvqqGWIMgAAD6G6ig (envelope-from ); Thu, 18 Jan 2024 09:07:23 +0000 From: Thomas Zimmermann To: javierm@redhat.com, deller@gmx.de, daniel@ffwll.ch, airlied@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 1/3] video/cmdline: Introduce CONFIG_VIDEO for video= parameter Date: Thu, 18 Jan 2024 10:05:26 +0100 Message-ID: <20240118090721.7995-2-tzimmermann@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240118090721.7995-1-tzimmermann@suse.de> References: <20240118090721.7995-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [-2.10 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_SEVEN(0.00)[7]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FREEMAIL_TO(0.00)[redhat.com,gmx.de,ffwll.ch,gmail.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Level: X-Spam-Flag: NO X-Spam-Score: -2.10 Add CONFIG_VIDEO for common code in drivers/video/. Use the option to select helpers for the video= parameter. Replaces CONFIG_VIDEO_CMDLINE. Other common code in drivers/video/ can be moved behind CONFIG_VIDEO, which will simplify the Kconfig rules. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/Kconfig | 2 +- drivers/video/Kconfig | 3 ++- drivers/video/Makefile | 2 +- drivers/video/fbdev/core/Kconfig | 2 +- include/video/cmdline.h | 7 ------- 5 files changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 6ec33d36f3a4..e519e1987613 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -19,7 +19,7 @@ menuconfig DRM # gallium uses SYS_kcmp for os_same_file_description() to de-duplicate # device and dmabuf fd. Let's make sure that is available for our userspace. select KCMP - select VIDEO_CMDLINE + select VIDEO select VIDEO_NOMODESET help Kernel-level support for the Direct Rendering Infrastructure (DRI) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index b694d7669d32..253b129a82dc 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -18,8 +18,9 @@ config STI_CORE STI refers to the HP "Standard Text Interface" which is a set of BIOS routines contained in a ROM chip in HP PA-RISC based machines. -config VIDEO_CMDLINE +config VIDEO bool + default n config VIDEO_NOMODESET bool diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 6bbc03950899..287c198f0c82 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -3,7 +3,7 @@ obj-$(CONFIG_APERTURE_HELPERS) += aperture.o obj-$(CONFIG_STI_CORE) += sticore.o obj-$(CONFIG_VGASTATE) += vgastate.o -obj-$(CONFIG_VIDEO_CMDLINE) += cmdline.o +obj-$(CONFIG_VIDEO) += cmdline.o obj-$(CONFIG_VIDEO_NOMODESET) += nomodeset.o obj-$(CONFIG_HDMI) += hdmi.o diff --git a/drivers/video/fbdev/core/Kconfig b/drivers/video/fbdev/core/Kconfig index 21053bf00dc5..db09fe87fcd4 100644 --- a/drivers/video/fbdev/core/Kconfig +++ b/drivers/video/fbdev/core/Kconfig @@ -4,7 +4,7 @@ # config FB_CORE - select VIDEO_CMDLINE + select VIDEO tristate config FB_NOTIFY diff --git a/include/video/cmdline.h b/include/video/cmdline.h index 26b80cdaef79..77292d1d6173 100644 --- a/include/video/cmdline.h +++ b/include/video/cmdline.h @@ -5,16 +5,9 @@ #include -#if defined(CONFIG_VIDEO_CMDLINE) const char *video_get_options(const char *name); /* exported for compatibility with fbdev; don't use in new code */ bool __video_get_options(const char *name, const char **option, bool is_of); -#else -static inline const char *video_get_options(const char *name) -{ - return NULL; -} -#endif #endif From patchwork Thu Jan 18 09:05:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 763809 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C85F125A4 for ; Thu, 18 Jan 2024 09:07:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705568846; cv=none; b=bo1TncSJatMhLLy/Y1aLqmiIrKj1owgusiv05Ej8CIWjVwkfNCk2P2fSjcG7SwoSEXtIonATol/Q1sAHCmq3D5mZvfF/kq6TdX04eJV8QS55rRlYSIAJG+FmfkxsxP3aE4fPVpci7Ui9TGSPOpNPd8l4p4KencMgQylx9eB1on4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705568846; c=relaxed/simple; bh=GJcCFJ5jVCQ9LwdzM1fkSLGo/MuhnV2B9VGnpla1aEw=; h=Received:DKIM-Signature:DKIM-Signature:DKIM-Signature: DKIM-Signature:Received:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Spam-Level:X-Spam-Score:X-Spamd-Result: X-Spam-Flag; b=mj9zT7XQkhWzF8tXVZwkAP97HRAHYxdPU0GsTc9mYmWjnNNnGbeU2sRf+QY0RteHfVLcrArF2xUUH9Z0FZat6ZE18vlq37M6LYU/dhRav9qntorlGaFGq3aWs9+qu5MuF25AKk2Zdy/jGn0e9QRjvcdejnSb9Ri1uRx9rsKeaNo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=XvygUUlr; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=uI6loTc1; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=XvygUUlr; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=uI6loTc1; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="XvygUUlr"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="uI6loTc1"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="XvygUUlr"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="uI6loTc1" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 91CD01F76E; Thu, 18 Jan 2024 09:07:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1705568843; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EQaqcr5hH6CH51DZABXoX3g9p53ULCPq1i1ADmCWCX0=; b=XvygUUlrmdfrEKFOb8kLOotF0lelcMsN7S2oZSlHu6QcfhSWXLOYCti5orgC1J8oadKs4e iXzpvK6EzWNfV4EDHb64ZFGUKhLCTPD7eymhgYD454CqscE4iwzCdmwPwEGvjvKCkauaEW 1Dk+ST9SDoKc7YvnnxjwI/JRB9kdgrE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1705568843; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EQaqcr5hH6CH51DZABXoX3g9p53ULCPq1i1ADmCWCX0=; b=uI6loTc10od7FviretdP8mPHK7bplrWZi+60jj2X0Lk8knDGwT0OSVrr8z+6V3HEyApsF4 MieCJtC1oGfhY7Bw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1705568843; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EQaqcr5hH6CH51DZABXoX3g9p53ULCPq1i1ADmCWCX0=; b=XvygUUlrmdfrEKFOb8kLOotF0lelcMsN7S2oZSlHu6QcfhSWXLOYCti5orgC1J8oadKs4e iXzpvK6EzWNfV4EDHb64ZFGUKhLCTPD7eymhgYD454CqscE4iwzCdmwPwEGvjvKCkauaEW 1Dk+ST9SDoKc7YvnnxjwI/JRB9kdgrE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1705568843; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EQaqcr5hH6CH51DZABXoX3g9p53ULCPq1i1ADmCWCX0=; b=uI6loTc10od7FviretdP8mPHK7bplrWZi+60jj2X0Lk8knDGwT0OSVrr8z+6V3HEyApsF4 MieCJtC1oGfhY7Bw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 60A5E13874; Thu, 18 Jan 2024 09:07:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id sK13FkvqqGWIMgAAD6G6ig (envelope-from ); Thu, 18 Jan 2024 09:07:23 +0000 From: Thomas Zimmermann To: javierm@redhat.com, deller@gmx.de, daniel@ffwll.ch, airlied@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 2/3] video/cmdline: Hide __video_get_options() behind CONFIG_FB_CORE Date: Thu, 18 Jan 2024 10:05:27 +0100 Message-ID: <20240118090721.7995-3-tzimmermann@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240118090721.7995-1-tzimmermann@suse.de> References: <20240118090721.7995-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: -0.30 X-Spamd-Result: default: False [-0.30 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[7]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FREEMAIL_TO(0.00)[redhat.com,gmx.de,ffwll.ch,gmail.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO The function __video_get_options() only exists for compatibility with old fbdev drivers that cannot be refactored easily. Hide it behind CONFIG_FB_CORE. v2: * support CONFIG_FB_CORE=m via IS_ENABLED() (kernel test robot) Signed-off-by: Thomas Zimmermann --- drivers/video/cmdline.c | 2 ++ include/video/cmdline.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/video/cmdline.c b/drivers/video/cmdline.c index d3d257489c3d..49ee3fb4951a 100644 --- a/drivers/video/cmdline.c +++ b/drivers/video/cmdline.c @@ -80,6 +80,7 @@ const char *video_get_options(const char *name) } EXPORT_SYMBOL(video_get_options); +#if IS_ENABLED(CONFIG_FB_CORE) bool __video_get_options(const char *name, const char **options, bool is_of) { bool enabled = true; @@ -96,6 +97,7 @@ bool __video_get_options(const char *name, const char **options, bool is_of) return enabled; } EXPORT_SYMBOL(__video_get_options); +#endif /* * Process command line options for video adapters. This function is diff --git a/include/video/cmdline.h b/include/video/cmdline.h index 77292d1d6173..76649465bb08 100644 --- a/include/video/cmdline.h +++ b/include/video/cmdline.h @@ -3,11 +3,14 @@ #ifndef VIDEO_CMDLINE_H #define VIDEO_CMDLINE_H +#include #include const char *video_get_options(const char *name); +#if IS_ENABLED(CONFIG_FB_CORE) /* exported for compatibility with fbdev; don't use in new code */ bool __video_get_options(const char *name, const char **option, bool is_of); +#endif #endif From patchwork Thu Jan 18 09:05:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 764354 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9889D125D1 for ; Thu, 18 Jan 2024 09:07:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705568847; cv=none; b=FE++0CeL67cplYwYqKHgpAqvvGlj0v8RD4RB3w8Q1f6+P/kBmHTc9tUd8TALJ2rj7b5lpTaSs7bNkgnCG69ovj3dBdiAO5ktv/k+8PSPe8vPLGkW6Sb5w9BUV9i0mjCS0QVTuQed9hifzhhLEufeSppybyyRiTXJPJCI7QbK7Jk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705568847; c=relaxed/simple; bh=Lza4sNhwvDU4Gw2MCmiOTFl/6vnM4MZ8dzWx7PJWiAc=; h=Received:Received:Received:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Spamd-Result:X-Rspamd-Server: X-Rspamd-Queue-Id:X-Spam-Level:X-Spam-Score:X-Spam-Flag; b=B/8QeYHTdvvYFLIRhzDRSofy1bJQJb8pK/yw8yUqgepewLm6dFdg298CQLB/hd2rnusHMQ9291z/Ih3lqVUX1h9jRkjptKRnbrCubpyCffniu5GjMjjTRxEBB0vQzZvCjJjdDv76U99OwWYsgVnflEKOop0mHS6RYJymFwDKo+s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id CEB501F785; Thu, 18 Jan 2024 09:07:23 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 98FE81387C; Thu, 18 Jan 2024 09:07:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id UF0zJEvqqGWIMgAAD6G6ig (envelope-from ); Thu, 18 Jan 2024 09:07:23 +0000 From: Thomas Zimmermann To: javierm@redhat.com, deller@gmx.de, daniel@ffwll.ch, airlied@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 3/3] video/nomodeset: Select nomodeset= parameter with CONFIG_VIDEO Date: Thu, 18 Jan 2024 10:05:28 +0100 Message-ID: <20240118090721.7995-4-tzimmermann@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240118090721.7995-1-tzimmermann@suse.de> References: <20240118090721.7995-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Queue-Id: CEB501F785 X-Spam-Level: X-Spam-Score: -4.00 X-Spam-Flag: NO Enable support for nomodeset= parameter via CONFIG_VIDEO. Both, DRM and fbdev, already select this option. Remove the existing option CONFIG_VIDEO_NOMODESET. Simplifies the Kconfig rules. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/Kconfig | 1 - drivers/staging/sm750fb/Kconfig | 1 - drivers/video/Kconfig | 4 ---- drivers/video/Makefile | 3 +-- drivers/video/fbdev/Kconfig | 37 ------------------------------- drivers/video/fbdev/core/fbmem.c | 2 -- drivers/video/fbdev/geode/Kconfig | 3 --- include/linux/fb.h | 7 ------ 8 files changed, 1 insertion(+), 57 deletions(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index e519e1987613..872edb47bb53 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -20,7 +20,6 @@ menuconfig DRM # device and dmabuf fd. Let's make sure that is available for our userspace. select KCMP select VIDEO - select VIDEO_NOMODESET help Kernel-level support for the Direct Rendering Infrastructure (DRI) introduced in XFree86 4.0. If you say Y here, you need to select diff --git a/drivers/staging/sm750fb/Kconfig b/drivers/staging/sm750fb/Kconfig index ab3d9b057d56..08bcccdd0f1c 100644 --- a/drivers/staging/sm750fb/Kconfig +++ b/drivers/staging/sm750fb/Kconfig @@ -6,7 +6,6 @@ config FB_SM750 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT - select VIDEO_NOMODESET help Frame buffer driver for the Silicon Motion SM750 chip with 2D acceleration and dual head support. diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 253b129a82dc..130ebccb8338 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -22,10 +22,6 @@ config VIDEO bool default n -config VIDEO_NOMODESET - bool - default n - source "drivers/auxdisplay/Kconfig" if HAS_IOMEM diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 287c198f0c82..9eb5557911de 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -3,8 +3,7 @@ obj-$(CONFIG_APERTURE_HELPERS) += aperture.o obj-$(CONFIG_STI_CORE) += sticore.o obj-$(CONFIG_VGASTATE) += vgastate.o -obj-$(CONFIG_VIDEO) += cmdline.o -obj-$(CONFIG_VIDEO_NOMODESET) += nomodeset.o +obj-$(CONFIG_VIDEO) += cmdline.o nomodeset.o obj-$(CONFIG_HDMI) += hdmi.o obj-$(CONFIG_VT) += console/ diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index d5909a9206ff..f15ba4b2f306 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -75,7 +75,6 @@ config FB_CIRRUS select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select FB_IOMEM_FOPS - select VIDEO_NOMODESET help This enables support for Cirrus Logic GD542x/543x based boards on Amiga: SD64, Piccolo, Picasso II/II+, Picasso IV, or EGS Spectrum. @@ -95,7 +94,6 @@ config FB_PM2 select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select FB_IOMEM_FOPS - select VIDEO_NOMODESET help This is the frame buffer device driver for cards based on the 3D Labs Permedia, Permedia 2 and Permedia 2V chips. @@ -179,7 +177,6 @@ config FB_CYBER2000 tristate "CyberPro 2000/2010/5000 support" depends on FB && PCI && (BROKEN || !SPARC64) select FB_IOMEM_HELPERS - select VIDEO_NOMODESET help This enables support for the Integraphics CyberPro 20x0 and 5000 VGA chips used in the Rebel.com Netwinder and other machines. @@ -330,7 +327,6 @@ config FB_CT65550 bool "Chips 65550 display support" depends on (FB = y) && PPC32 && PCI select FB_IOMEM_HELPERS - select VIDEO_NOMODESET help This is the frame buffer device driver for the Chips & Technologies 65550 graphics chip in PowerBooks. @@ -339,7 +335,6 @@ config FB_ASILIANT bool "Asiliant (Chips) 69000 display support" depends on (FB = y) && PCI select FB_IOMEM_HELPERS - select VIDEO_NOMODESET help This is the frame buffer device driver for the Asiliant 69030 chipset @@ -349,7 +344,6 @@ config FB_IMSTT select FB_CFB_IMAGEBLIT select FB_IOMEM_FOPS select FB_MACMODES if PPC_PMAC - select VIDEO_NOMODESET help The IMS Twin Turbo is a PCI-based frame buffer card bundled with many Macintosh and compatible computers. @@ -414,7 +408,6 @@ config FB_TGA select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select FB_IOMEM_FOPS - select VIDEO_NOMODESET help This is the frame buffer device driver for generic TGA and SFB+ graphic cards. These include DEC ZLXp-E1, -E2 and -E3 PCI cards, @@ -591,7 +584,6 @@ config FB_XVR500 select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select FB_IOMEM_FOPS - select VIDEO_NOMODESET help This is the framebuffer device for the Sun XVR-500 and similar graphics cards based upon the 3DLABS Wildcat chipset. The driver @@ -603,7 +595,6 @@ config FB_XVR2500 bool "Sun XVR-2500 3DLABS Wildcat support" depends on (FB = y) && PCI && SPARC64 select FB_IOMEM_HELPERS - select VIDEO_NOMODESET help This is the framebuffer device for the Sun XVR-2500 and similar graphics cards based upon the 3DLABS Wildcat chipset. The driver @@ -629,7 +620,6 @@ config FB_PVR2 select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select FB_IOMEM_FOPS - select VIDEO_NOMODESET help Say Y here if you have a PowerVR 2 card in your box. If you plan to run linux on your Dreamcast, you will have to say Y here. @@ -692,7 +682,6 @@ config FB_NVIDIA select FB_IOMEM_FOPS select BITREVERSE select VGASTATE - select VIDEO_NOMODESET help This driver supports graphics boards with the nVidia chips, TNT and newer. For very old chipsets, such as the RIVA128, then use @@ -741,7 +730,6 @@ config FB_RIVA select FB_MODE_HELPERS select BITREVERSE select VGASTATE - select VIDEO_NOMODESET help This driver supports graphics boards with the nVidia Riva/Geforce chips. @@ -784,7 +772,6 @@ config FB_I740 select FB_IOMEM_HELPERS select FB_MODE_HELPERS select VGASTATE - select VIDEO_NOMODESET select FB_DDC help This driver supports graphics cards based on Intel740 chip. @@ -795,7 +782,6 @@ config FB_I810 select FB_IOMEM_FOPS select FB_MODE_HELPERS select VGASTATE - select VIDEO_NOMODESET help This driver supports the on-board graphics built in to the Intel 810 and 815 chipsets. Say Y if you have and plan to use such a board. @@ -844,7 +830,6 @@ config FB_LE80578 depends on FB && PCI && X86 select FB_IOMEM_HELPERS select FB_MODE_HELPERS - select VIDEO_NOMODESET help This driver supports the LE80578 (Vermilion Range) chipset @@ -863,7 +848,6 @@ config FB_INTEL select FB_IOMEM_FOPS select FB_MODE_HELPERS select BOOT_VESA_SUPPORT if FB_INTEL = y - select VIDEO_NOMODESET depends on !DRM_I915 help This driver supports the on-board graphics built in to the Intel @@ -902,7 +886,6 @@ config FB_MATROX select FB_IOMEM_FOPS select FB_TILEBLITTING select FB_MACMODES if PPC_PMAC - select VIDEO_NOMODESET help Say Y here if you have a Matrox Millennium, Matrox Millennium II, Matrox Mystique, Matrox Mystique 220, Matrox Productiva G100, Matrox @@ -1025,7 +1008,6 @@ config FB_RADEON select FB_IOMEM_FOPS select FB_MACMODES if PPC select FB_MODE_HELPERS - select VIDEO_NOMODESET help Choose this option if you want to use an ATI Radeon graphics card as a framebuffer device. There are both PCI and AGP versions. You @@ -1063,7 +1045,6 @@ config FB_ATY128 select FB_BACKLIGHT if FB_ATY128_BACKLIGHT select FB_IOMEM_HELPERS select FB_MACMODES if PPC_PMAC - select VIDEO_NOMODESET help This driver supports graphics boards with the ATI Rage128 chips. Say Y if you have such a graphics board and read @@ -1089,7 +1070,6 @@ config FB_ATY select FB_IOMEM_FOPS select FB_MACMODES if PPC select FB_ATY_CT if SPARC64 && PCI - select VIDEO_NOMODESET help This driver supports graphics boards with the ATI Mach64 chips. Say Y if you have such a graphics board. @@ -1141,7 +1121,6 @@ config FB_S3 select FB_TILEBLITTING select FB_SVGALIB select VGASTATE - select VIDEO_NOMODESET select FONT_8x16 if FRAMEBUFFER_CONSOLE help Driver for graphics boards with S3 Trio / S3 Virge chip. @@ -1163,7 +1142,6 @@ config FB_SAVAGE select FB_IOMEM_FOPS select FB_MODE_HELPERS select VGASTATE - select VIDEO_NOMODESET help This driver supports notebooks and computers with S3 Savage PCI/AGP chips. @@ -1203,7 +1181,6 @@ config FB_SIS select FB_CFB_IMAGEBLIT select FB_IOMEM_FOPS select FB_SIS_300 if !FB_SIS_315 - select VIDEO_NOMODESET help This is the frame buffer device driver for the SiS 300, 315, 330 and 340 series as well as XGI V3XT, V5, V8, Z7 graphics chipsets. @@ -1234,7 +1211,6 @@ config FB_VIA select FB_CFB_IMAGEBLIT select FB_IOMEM_FOPS select I2C_ALGOBIT - select VIDEO_NOMODESET help This is the frame buffer device driver for Graphics chips of VIA UniChrome (Pro) Family (CLE266,PM800/CN400,P4M800CE/P4M800Pro/ @@ -1275,7 +1251,6 @@ config FB_NEOMAGIC select FB_IOMEM_FOPS select FB_MODE_HELPERS select VGASTATE - select VIDEO_NOMODESET help This driver supports notebooks with NeoMagic PCI chips. Say Y if you have such a graphics card. @@ -1287,7 +1262,6 @@ config FB_KYRO tristate "IMG Kyro support" depends on FB && PCI select FB_IOMEM_HELPERS - select VIDEO_NOMODESET help Say Y here if you have a STG4000 / Kyro / PowerVR 3 based graphics board. @@ -1303,7 +1277,6 @@ config FB_3DFX select FB_CFB_IMAGEBLIT select FB_IOMEM_FOPS select FB_MODE_HELPERS - select VIDEO_NOMODESET help This driver supports graphics boards with the 3Dfx Banshee, Voodoo3 or VSA-100 (aka Voodoo4/5) chips. Say Y if you have @@ -1332,7 +1305,6 @@ config FB_VOODOO1 depends on FB && PCI depends on FB_DEVICE select FB_IOMEM_HELPERS - select VIDEO_NOMODESET help Say Y here if you have a 3Dfx Voodoo Graphics (Voodoo1/sst1) or Voodoo2 (cvg) based graphics card. @@ -1355,7 +1327,6 @@ config FB_VT8623 select FB_TILEBLITTING select FB_SVGALIB select VGASTATE - select VIDEO_NOMODESET select FONT_8x16 if FRAMEBUFFER_CONSOLE help Driver for CastleRock integrated graphics core in the @@ -1370,7 +1341,6 @@ config FB_TRIDENT select FB_DDC select FB_IOMEM_FOPS select FB_MODE_HELPERS - select VIDEO_NOMODESET help This is the frame buffer device driver for Trident PCI/AGP chipsets. Supported chipset families are TGUI 9440/96XX, 3DImage, Blade3D @@ -1395,7 +1365,6 @@ config FB_ARK select FB_TILEBLITTING select FB_SVGALIB select VGASTATE - select VIDEO_NOMODESET select FONT_8x16 if FRAMEBUFFER_CONSOLE help Driver for PCI graphics boards with ARK 2000PV chip @@ -1408,7 +1377,6 @@ config FB_PM3 select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select FB_IOMEM_FOPS - select VIDEO_NOMODESET help This is the frame buffer device driver for the 3DLabs Permedia3 chipset, used in Formac ProFormance III, 3DLabs Oxygen VX1 & @@ -1419,7 +1387,6 @@ config FB_CARMINE tristate "Fujitsu carmine frame buffer support" depends on FB && PCI select FB_IOMEM_HELPERS - select VIDEO_NOMODESET help This is the frame buffer device driver for the Fujitsu Carmine chip. The driver provides two independent frame buffer devices. @@ -1701,7 +1668,6 @@ config FB_IBM_GXT4500 tristate "Framebuffer support for IBM GXT4000P/4500P/6000P/6500P adaptors" depends on FB select FB_IOMEM_HELPERS - select VIDEO_NOMODESET help Say Y here to enable support for the IBM GXT4000P/6000P and GXT4500P/6500P display adaptor based on Raster Engine RC1000, @@ -1819,7 +1785,6 @@ config FB_MB862XX depends on FB depends on PCI || (OF && PPC) select FB_IOMEM_HELPERS - select VIDEO_NOMODESET help Frame buffer driver for Fujitsu Carmine/Coral-P(A)/Lime controllers. @@ -1885,7 +1850,6 @@ config FB_HYPERV depends on FB && HYPERV select DMA_CMA if HAVE_DMA_CONTIGUOUS && CMA select FB_IOMEM_HELPERS_DEFERRED - select VIDEO_NOMODESET help This framebuffer driver supports Microsoft Hyper-V Synthetic Video. @@ -1919,7 +1883,6 @@ config FB_SM712 tristate "Silicon Motion SM712 framebuffer support" depends on FB && PCI select FB_IOMEM_HELPERS - select VIDEO_NOMODESET help Frame buffer driver for the Silicon Motion SM710, SM712, SM721 and SM722 chips. diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index fc206755f5f6..48287366e0d4 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -645,7 +645,6 @@ int fb_new_modelist(struct fb_info *info) return 0; } -#if defined(CONFIG_VIDEO_NOMODESET) bool fb_modesetting_disabled(const char *drvname) { bool fwonly = video_firmware_drivers_only(); @@ -657,6 +656,5 @@ bool fb_modesetting_disabled(const char *drvname) return fwonly; } EXPORT_SYMBOL(fb_modesetting_disabled); -#endif MODULE_LICENSE("GPL"); diff --git a/drivers/video/fbdev/geode/Kconfig b/drivers/video/fbdev/geode/Kconfig index 9a49916e0492..3b20420cc94d 100644 --- a/drivers/video/fbdev/geode/Kconfig +++ b/drivers/video/fbdev/geode/Kconfig @@ -14,7 +14,6 @@ config FB_GEODE_LX tristate "AMD Geode LX framebuffer support" depends on FB && FB_GEODE select FB_IOMEM_HELPERS - select VIDEO_NOMODESET help Framebuffer driver for the display controller integrated into the AMD Geode LX processors. @@ -28,7 +27,6 @@ config FB_GEODE_GX tristate "AMD Geode GX framebuffer support" depends on FB && FB_GEODE select FB_IOMEM_HELPERS - select VIDEO_NOMODESET help Framebuffer driver for the display controller integrated into the AMD Geode GX processors. @@ -42,7 +40,6 @@ config FB_GEODE_GX1 tristate "AMD Geode GX1 framebuffer support" depends on FB && FB_GEODE select FB_IOMEM_HELPERS - select VIDEO_NOMODESET help Framebuffer driver for the display controller integrated into the AMD Geode GX1 processor. diff --git a/include/linux/fb.h b/include/linux/fb.h index 05dc9624897d..2ce2f5c2fca9 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -840,14 +840,7 @@ extern int fb_find_mode(struct fb_var_screeninfo *var, const struct fb_videomode *default_mode, unsigned int default_bpp); -#if defined(CONFIG_VIDEO_NOMODESET) bool fb_modesetting_disabled(const char *drvname); -#else -static inline bool fb_modesetting_disabled(const char *drvname) -{ - return false; -} -#endif /* * Convenience logging macros