Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp204925lqz; Fri, 29 Mar 2024 13:35:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWdk/MCIQgkeKY5nDp8valBW4JMSNFD0QSIwfpTZx/f0Ku1y692VR0fqdWqB+o+S6u6Q31eK7yXgtX4GuHWUuOASR+2EynqjYXpSI0lsg== X-Google-Smtp-Source: AGHT+IGCHMkTeWETUjviDr7vHfNyiUjFzwHAwQb9jPZqN2rUqViJba1jjoVpmQ5yOCDS9LKohRji X-Received: by 2002:a05:6512:4848:b0:515:d1b9:3066 with SMTP id ep8-20020a056512484800b00515d1b93066mr1506199lfb.46.1711744544536; Fri, 29 Mar 2024 13:35:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711744544; cv=pass; d=google.com; s=arc-20160816; b=vsoRCgWSJViqMdeJ6xS4dl7Huwmu1x/UDSM+8ttbKEqeStUAAN/kufeC0AtnOsnjCT FluXtlumv5N7M+8ToFwkk0jKRkU7RymioWbeLm7ifIBlhyfhpTUm59EEOMICxZnzU5RP CyOyPJdFdQVNBMIZvQXmzyKAWesWaachaFLXLazcZMkdGWWOOsChgV1TlYadplj7d7HY 9tctdqRGlyaD2XPqUbhmDB815KxfPUWcIf02KLGZ5F/2On+7mRbOrY70JGnBBcIXhakD SSJ5Ihv8PLtTqrY155K7CHjzxzF4wUpKXdKLsKFzhLH2ScED8lsYX5kyYiwHWNYcdGwF Zwpg== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-signature; bh=5zPhAoJzxNIA+Zyc3rmr96I44yGrbHHtvC/kao9p1aE=; fh=cToUR+yn/pTuKLY34XYZECiE+SFUSKlgkzDC5K70Tzs=; b=iyUBMTm9bRLfGrUXnsVehP0VtaYv9F5j/9FniOUf1eL9SKraUE5yu4lolXDPfbDe+Z VlU2HziSumqcZkYfBS57uhPnrzOtWd6NO4Vm+5nvjhFZ2lhWfhjnonMLcqMflZXb2TRg TQX+pocKbL7nINEIjpVkLSFhAmqox+pFrofRCcfcfg50XGrt6VXhhvZ7mcl4NG7u4vTT Zp0CI3A+ziVsoiHPg/TZXmp1LUf4IgqApSTtesZfZanFumVjfdOGxMdkLmzp1xCjY5Pd j8fdun4trymiIaBXV3y+DVO90BToeAZ2zYFqWOReV6b6rSHgIlx+cChjSk7ckN8pQ3Bo PF1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="SuO/o9hH"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-125398-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125398-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v16-20020a1709064e9000b00a46e367e1a2si2066430eju.414.2024.03.29.13.35.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 13:35:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125398-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=@suse.de header.s=susede2_rsa header.b="SuO/o9hH"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-125398-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125398-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de 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 0FCE41F24057 for ; Fri, 29 Mar 2024 20:35:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 923E613CC77; Fri, 29 Mar 2024 20:35:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="SuO/o9hH"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="CFzrdsSx" 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 B57393C08F; Fri, 29 Mar 2024 20:35:01 +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=1711744505; cv=none; b=D2ofjUhYBPAnqU8lGAhowDvfKwsItz+8XiC0p7wMkxuzWnDcahsqJl+Z5HKtPDPI+MetQI3YaOVOv5tLpSvIPWVaMMXdp4qlViEK/xXHpxCcdra9ZZYwrzYgXUPMe+gtt1DDxvanHOYB5LZYgh8ofD7NZbGMk2iUTxrdnwldbao= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711744505; c=relaxed/simple; bh=wjr0wxurAHUDsgUa3LOd+Gda+u2lXRCA/UsEWyt8a0Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=c6zWdb/QOiyoMceMcDcA8vFwnlVuJc7LbUAkHuhp4UngvEgzwkOlU+xd4pRYMEBWm4nDCWGwYto5FgcEGk+gQpyLpmDmAyhWtlQu7cCQyduJxRLVHrvx2TE59dXWhY+fyvmLekudePofipY77J7tV5atAcY5sj1zdGBfrkj9Vps= 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=SuO/o9hH; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=CFzrdsSx; 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 imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:98]) (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 C36DD5CACF; Fri, 29 Mar 2024 20:34:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711744499; 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=5zPhAoJzxNIA+Zyc3rmr96I44yGrbHHtvC/kao9p1aE=; b=SuO/o9hHDFaqftV6eI2MO+utLXpa5M51LlMEE/ka1+JY65aMSjaH8l+mhXYN1LzyI8ehHU l3zrsO0NpwIzc6+J2xu7Ll5okFEvpYRyqkfHV/uZdikGklfdJnlx2cBZLXMkLSVp1fsXfp fAld15I8m5n7cmZldzEBJFN/cF4IxAM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711744499; 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=5zPhAoJzxNIA+Zyc3rmr96I44yGrbHHtvC/kao9p1aE=; b=CFzrdsSxhUSmaQoySt/OHi2C7T3Mr3nGK4vRoiBbHJIe1ukVeOpu2ckjXSBd+87oJ2dZu7 /PzLmNyBpir4viCQ== Authentication-Results: smtp-out2.suse.de; dkim=none Received: from imap2.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 imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 024CD13A7E; Fri, 29 Mar 2024 20:34:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap2.dmz-prg2.suse.org with ESMTPSA id eHCCOvIlB2YTPgAAn2gu4w (envelope-from ); Fri, 29 Mar 2024 20:34:58 +0000 From: Thomas Zimmermann To: arnd@arndb.de, sam@ravnborg.org, javierm@redhat.com, deller@gmx.de, sui.jingfeng@linux.dev Cc: linux-arch@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, sparclinux@vger.kernel.org, linux-sh@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-parisc@vger.kernel.org, linux-mips@vger.kernel.org, linux-m68k@lists.linux-m68k.org, loongarch@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , "James E.J. Bottomley" , "David S. Miller" , Andreas Larsson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Subject: [PATCH v3 2/3] arch: Remove struct fb_info from video helpers Date: Fri, 29 Mar 2024 21:32:11 +0100 Message-ID: <20240329203450.7824-3-tzimmermann@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240329203450.7824-1-tzimmermann@suse.de> References: <20240329203450.7824-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C36DD5CACF X-Spamd-Result: default: False [-1.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.19)[-0.968]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_TWELVE(0.00)[28]; MIME_TRACE(0.00)[0:+]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap2.dmz-prg2.suse.org:rdns,imap2.dmz-prg2.suse.org:helo]; FREEMAIL_TO(0.00)[arndb.de,ravnborg.org,redhat.com,gmx.de,linux.dev]; R_DKIM_NA(0.00)[]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:104:10:150:64:98:from]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmx.de] X-Rspamd-Action: no action X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spam-Score: -1.80 X-Spam-Level: X-Spam-Flag: NO The per-architecture video helpers do not depend on struct fb_info or anything else from fbdev. Remove it from the interface and replace fb_is_primary_device() with video_is_primary_device(). The new helper is similar in functionality, but can operate on non-fbdev devices. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: "David S. Miller" Cc: Andreas Larsson Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: "H. Peter Anvin" --- arch/parisc/include/asm/fb.h | 8 +++++--- arch/parisc/video/fbdev.c | 9 +++++---- arch/sparc/include/asm/fb.h | 7 ++++--- arch/sparc/video/fbdev.c | 17 ++++++++--------- arch/x86/include/asm/fb.h | 8 +++++--- arch/x86/video/fbdev.c | 18 +++++++----------- drivers/video/fbdev/core/fbcon.c | 2 +- include/asm-generic/fb.h | 11 ++++++----- 8 files changed, 41 insertions(+), 39 deletions(-) diff --git a/arch/parisc/include/asm/fb.h b/arch/parisc/include/asm/fb.h index 658a8a7dc5312..ed2a195a3e762 100644 --- a/arch/parisc/include/asm/fb.h +++ b/arch/parisc/include/asm/fb.h @@ -2,11 +2,13 @@ #ifndef _ASM_FB_H_ #define _ASM_FB_H_ -struct fb_info; +#include + +struct device; #if defined(CONFIG_STI_CORE) -int fb_is_primary_device(struct fb_info *info); -#define fb_is_primary_device fb_is_primary_device +bool video_is_primary_device(struct device *dev); +#define video_is_primary_device video_is_primary_device #endif #include diff --git a/arch/parisc/video/fbdev.c b/arch/parisc/video/fbdev.c index e4f8ac99fc9e0..540fa0c919d59 100644 --- a/arch/parisc/video/fbdev.c +++ b/arch/parisc/video/fbdev.c @@ -5,12 +5,13 @@ * Copyright (C) 2001-2002 Thomas Bogendoerfer */ -#include #include #include