Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp817523rwl; Wed, 5 Apr 2023 08:06:42 -0700 (PDT) X-Google-Smtp-Source: AKy350Y7VwS0BLWjjBJezk5D4WXna4ZEGmI5pUcwE7SRavSy7MWEzGPcDv17zx6OXPNRWqHqeIfZ X-Received: by 2002:a17:903:1103:b0:19b:107b:698e with SMTP id n3-20020a170903110300b0019b107b698emr7500043plh.14.1680707202049; Wed, 05 Apr 2023 08:06:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680707202; cv=none; d=google.com; s=arc-20160816; b=fuYPwKDlWSwOsbDYWTKGMsv000RFahRx6JLkAAq6x8eNEQekXQ8LWejmx8MaLI+a5/ r2v0igyy2UpZzrevIBDdQVVOaeMvzjtFRcFo/tEL/xqKt4o2GazY6gMilL8rcT0nm45x pFfeXUTj7sYVCsZbYJrLOFWo0H5Oc++tbNKNacIab0B/PVjwTjU3jgYOZ5vmdfQbetHL 0KlEQMQtVIvefn/EnniZET5sqCIdGr24lS8U5ZrDghkG8I0nXKOq7mMaowZqx97037rH gNjrSp+iXf8t1tCD8GD5jQdWzWNffS8NQoAK3lCWix5Wz2y96pivqhTTmLm0nqBbP2MY JPow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=g5CNiBMyJmGfOboPN85iL6BEAbMbhCK1z8h/E7PJqO8=; b=l1LjHwT6rT3Yxr16cVbq0k/5+g41/YFZQiGYj/2WBPl/zJ4iU4qXPwC6cZ2ngpyWXg F09wvkYMMTIAV6OE+b9cFvLVPDRa8SRSac4kgCx4Y9QshhnB6UgvNj4b2WYDFmip/wbc VYBXzLwMpCVnMD1rPe3yN1NzVGWteNsbqV1yNV5DBJTNhJRGw8YA59Q49HMCLr/Hmjsj aFAed2a1+icLx2GM8IbH9UIMllmvHxcOw76vMCYgUu+LMkrfs5ZmsFe+zON2oa+clupH 0JICm8KH87wYrSnpRIQzXtVheEbgU3wnQ+ZpR1eVmKhbyZyJt2asII0b+xWgSfAO8bSw INOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=w8tf3DJb; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 71-20020a63014a000000b0051357734521si13026806pgb.604.2023.04.05.08.06.28; Wed, 05 Apr 2023 08:06:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=w8tf3DJb; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238684AbjDEPGK (ORCPT + 99 others); Wed, 5 Apr 2023 11:06:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238666AbjDEPGD (ORCPT ); Wed, 5 Apr 2023 11:06:03 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 130C4E5; Wed, 5 Apr 2023 08:05:59 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E984822926; Wed, 5 Apr 2023 15:05:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1680707157; 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; bh=g5CNiBMyJmGfOboPN85iL6BEAbMbhCK1z8h/E7PJqO8=; b=w8tf3DJbATFS2jgiySieo5lgHacr0/X4t8O83kSm+JjUTN7INy+KEE0c6QKy2YQQEG1D51 ei/9VshpEuJZ8SmDOnR/EjlVwb3io8xNrPAvyiDEaO/puZewQ0rt7tBgAYItRDRs1brqRE qzs1tuAkBaBxL74Ueu6ptbgKfBk5KMI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1680707157; 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; bh=g5CNiBMyJmGfOboPN85iL6BEAbMbhCK1z8h/E7PJqO8=; b=NJtJ5rJLvESSn/PDRi2v9Tc541wLbJpWwnGJQVN5sUOfOKv49P3yAdDLaj2lKracLovScc sc9Vq2L2x0GeLvDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 85CA413A10; Wed, 5 Apr 2023 15:05:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id aFHUH1WOLWTPIAAAMHmgww (envelope-from ); Wed, 05 Apr 2023 15:05:57 +0000 From: Thomas Zimmermann To: arnd@arndb.de, daniel.vetter@ffwll.ch, deller@gmx.de, javierm@redhat.com, gregkh@linuxfoundation.org Cc: linux-arch@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org, Thomas Zimmermann Subject: [PATCH 00/18] arch: Consolidate Date: Wed, 5 Apr 2023 17:05:36 +0200 Message-Id: <20230405150554.30540-1-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Various architectures provide with helpers for fbdev framebuffer devices. Share the contained code where possible. There is already , which implements generic (as in 'empty') functions of the fbdev helpers. The header was added in commit aafe4dbed0bf ("asm-generic: add generic versions of common headers"), but never used. Each per-architecture header file declares and/or implements fbdev helpers and defines a preprocessor token for each. The generic header then provides the remaining helpers. It works like the I/O helpers in . For PARISC, the architecture helpers are mixed up with helpers for the system's STI graphics firmware. We first move the STI code to appropriate locations under video/ and then move the architecture helper under arch/parisc. For Sparc, there's an additional patch that moves the implementation from the header into a source file. This allows to avoid some include statements in the header file. Built on arm, arm64, m68k, mips, parisc, powerpc, sparc and x86. Thomas Zimmermann (18): fbdev: Prepare generic architecture helpers arch/arc: Implement with generic helpers arch/arm: Implement with generic helpers arch/arm64: Implement with generic helpers arch/ia64: Implement with generic helpers arch/loongarch: Implement with generic helpers arch/m68k: Implement with generic helpers arch/mips: Implement with generic helpers video: Remove trailing whitespaces video: Move HP PARISC STI core code to shared location arch/parisc: Remove trailing whitespaces arch/parisc: Implement fb_is_primary_device() under arch/parisc arch/parisc: Implement with generic helpers arch/powerpc: Implement with generic helpers arch/sh: Implement with generic helpers arch/sparc: Implement fb_is_primary_device() in source file arch/sparc: Implement with generic helpers arch/x86: Implement with generic helpers arch/arc/include/asm/fb.h | 11 +- arch/arm/include/asm/fb.h | 10 +- arch/arm64/include/asm/fb.h | 10 +- arch/ia64/include/asm/fb.h | 11 +- arch/loongarch/include/asm/fb.h | 10 +- arch/m68k/include/asm/fb.h | 10 +- arch/mips/include/asm/fb.h | 10 +- arch/parisc/Makefile | 4 +- arch/parisc/include/asm/fb.h | 17 +- arch/parisc/video/Makefile | 3 + arch/parisc/video/fbdev.c | 27 +++ arch/powerpc/include/asm/fb.h | 8 +- arch/sh/include/asm/fb.h | 10 +- arch/sparc/Makefile | 1 + arch/sparc/include/asm/fb.h | 30 ++-- arch/sparc/video/Makefile | 3 + arch/sparc/video/fbdev.c | 24 +++ arch/x86/include/asm/fb.h | 11 +- drivers/video/Kconfig | 7 + drivers/video/Makefile | 1 + drivers/video/console/Kconfig | 1 + drivers/video/console/Makefile | 4 +- drivers/video/console/sticon.c | 6 +- drivers/video/fbdev/Kconfig | 3 +- drivers/video/fbdev/stifb.c | 158 +++++++++--------- drivers/video/{console => }/sticore.c | 123 ++++++-------- include/asm-generic/fb.h | 20 ++- .../video/fbdev => include/video}/sticore.h | 16 +- 28 files changed, 297 insertions(+), 252 deletions(-) create mode 100644 arch/parisc/video/Makefile create mode 100644 arch/parisc/video/fbdev.c create mode 100644 arch/sparc/video/Makefile create mode 100644 arch/sparc/video/fbdev.c rename drivers/video/{console => }/sticore.c (95%) rename {drivers/video/fbdev => include/video}/sticore.h (99%) base-commit: a7180debb9c631375684f4d717466cfb9f238660 -- 2.40.0