Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3937720rwe; Mon, 17 Apr 2023 05:58:45 -0700 (PDT) X-Google-Smtp-Source: AKy350b0y7H4shexwpkBJZytqL1RcMLV+G0Otcg7TCrTYr4C/70JRvIez/mYDaaUL6ZyEJpfjqux X-Received: by 2002:a17:90a:db85:b0:23b:d506:226e with SMTP id h5-20020a17090adb8500b0023bd506226emr14952849pjv.42.1681736325218; Mon, 17 Apr 2023 05:58:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681736325; cv=none; d=google.com; s=arc-20160816; b=CTpwtSlEWYZMBsZxdu+ViITJRgXQNa44H/GlU9vg+gNs9Zvj/JmOQEQMn8dFxWTnDZ tSznHQ+2/olhLxBVQPXBVxbMUXmSYQTWo0W8p7iqQoxc5J7DzyOiE9tAj4yf2g07hHJA wa4lAv3CwlwaPvLC5hTtCzQ1v6j3gSBt5u8OZVvmyk39QLfstOAA88CE+LUOqZYoVXHQ Ij7FBYSfKWV9POna8tfgYymtlB9co+/K9YDEx5MBf9cJpxweSBevWgqiQ+w4LAJNUzs2 C9Fy9ATjD5KDaRXNT6A620OhcGC7df7B3HEB2Ndcu4aAEKsZUSB4z7hhcHrHqZLPwBAH /v+A== 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=TjKFT65nFde0KHYwvUCAIbizOxCNdL0ntslOVRl87lE=; b=x/00yBmQThBluJYm2i9K49kCsIO1lgaxH93/Z9QP0QMaCdYSI5rO+dyiicOM3693wy AjXYHVyk2rYNFSeQ+hMvxVX4j9xX33YZogHUxKpD5CBfFkUjK90CGqsSmURC7tP/nrX4 ebKQUUQxUHNYudxQM0MJcy6PeRBapx6cKSA0dJ3lYP31ht/ko/FDmpJuXZZDOVUsU7Jd GXI1TsLqwlxtAZ0ARzv1Za0wBBNezr+xVMCwNRhIe4HONmTE3wB/caoeGdHyY7fLfOtz Tsi0LKTdAKkevvShGMluXPOTWuw7jFKjmOcUWuccBXrKE85qguztCOuRn8g9emzgYxd7 ZxCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=qU6w2kY5; 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 gb5-20020a17090b060500b002471d40b4d0si726667pjb.106.2023.04.17.05.58.34; Mon, 17 Apr 2023 05:58:45 -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=qU6w2kY5; 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 S231343AbjDQM5V (ORCPT + 99 others); Mon, 17 Apr 2023 08:57:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229738AbjDQM5R (ORCPT ); Mon, 17 Apr 2023 08:57:17 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAEB1210C; Mon, 17 Apr 2023 05:56: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-out2.suse.de (Postfix) with ESMTPS id 65ACA1F86C; Mon, 17 Apr 2023 12:56:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1681736218; 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=TjKFT65nFde0KHYwvUCAIbizOxCNdL0ntslOVRl87lE=; b=qU6w2kY5MzqEXwd8TMNs58RhCH9e5hAM3giF5jjQmYT6lBuIWGXS/c+WHrP5T+pN3SY2vp NA5N6GTN/+zI0Nkuz0JjvVnZJyhucRMUl5SOITpu5xAQg48nvBBYq194+Km0t5IwM18z2J BTyIpDo3bUNDxPWIkyVoQeOFNoGNWP4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1681736218; 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=TjKFT65nFde0KHYwvUCAIbizOxCNdL0ntslOVRl87lE=; b=oVQCEIp+Zsfrb6hp9far1l809Ib3e3nbzdCxJOOQ2f8MndGptEVdK0mKoxA4OcCHq1YcqT IcKcAyErDVaEE+AQ== 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 E43D31390E; Mon, 17 Apr 2023 12:56:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id yBGhNhlCPWToWwAAMHmgww (envelope-from ); Mon, 17 Apr 2023 12:56: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 v3 00/19] arch: Consolidate Date: Mon, 17 Apr 2023 14:56:32 +0200 Message-Id: <20230417125651.25126-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=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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. v3: * use default fb_pgprotect() on arc, parisc, sparc64 (Arnd) * fix includes in generic fb.h v2: * make writecombine the default mapping mode (Arnd) * rework fb_pgprotect() on m68k Thomas Zimmermann (19): 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: Merge variants of fb_pgprotect() into single function 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 | 16 +- arch/arm/include/asm/fb.h | 15 +- arch/arm64/include/asm/fb.h | 15 +- arch/ia64/include/asm/fb.h | 11 +- arch/loongarch/include/asm/fb.h | 15 +- arch/m68k/include/asm/fb.h | 22 +-- arch/mips/include/asm/fb.h | 10 +- arch/parisc/Makefile | 4 +- arch/parisc/include/asm/fb.h | 20 +-- arch/parisc/video/Makefile | 3 + arch/parisc/video/fbdev.c | 27 +++ arch/powerpc/include/asm/fb.h | 8 +- arch/sh/include/asm/fb.h | 15 +- arch/sparc/Makefile | 1 + arch/sparc/include/asm/fb.h | 33 ++-- 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 | 24 ++- .../video/fbdev => include/video}/sticore.h | 16 +- 28 files changed, 285 insertions(+), 311 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: c7cfe0c7215db9556ffe7ce33d1f60f768336cfd prerequisite-patch-id: 0aa359f6144c4015c140c8a6750be19099c676fb prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24 prerequisite-patch-id: cbc453ee02fae02af22fbfdce56ab732c7a88c36 -- 2.40.0