Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2228852rwl; Thu, 6 Apr 2023 07:31:27 -0700 (PDT) X-Google-Smtp-Source: AKy350Zg3Q2o0Y00Om5EVzZVcxeLiVTCSABr00Q6WfruLtGP5QgfwR7EOSL0+lH6ovBjayJORlMw X-Received: by 2002:a17:906:cb86:b0:933:3b2e:6016 with SMTP id mf6-20020a170906cb8600b009333b2e6016mr5806616ejb.7.1680791486813; Thu, 06 Apr 2023 07:31:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680791486; cv=none; d=google.com; s=arc-20160816; b=ViUGYz2UBkPekOzOotb501pw2mtS8m/nGPK3z5GqdXTzNwicEFzO9+STNGk5igxYaI t2L6anVWYq5oek3cK4KJpDT1pmuTo8lp4sdYz8omUjkMdf/pavEM3p5gSYtGYIV40hTA EZ7qwenbCmpbV1DdUqy+269ZBZrSJ9pSAHrxHhGhM+NWsRILMe3LVmHWvWVpWZhhTBLA 3prCukosHuxRDz5NHZLXNp3mZaiD3DYB+JAr2xtgDovLsiV16BOYC3lVl2NqvfqRPOYF Q5CajCAu5PvIEvDS6gQzIzZFfZh6Z7N3mtd2oKChxFxyXowRSK1q8NF2oH9j/iewVLet O/ag== 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=Qfcv3B3fedBLgcumau4bBH8VjCihrniSXhFDyqRcmIU=; b=c/tWhi50hSnq6WmH8zeWxBsdDwzAwjrpdfnQokVLBwTb0NLExPQWmzkPCg8KWbq2lY kG6iCEzRXxLnajCAqZxD9TtTh6BISm2TJQeFDx/vvKtRgQHJ3zVh2tKxOO9AGssFhWjA wOw6tNj1hloeJH03jA2DyuePwSkc22bX9W/e5EjHPzD3w6BlkyKh3nX+1yodzOITlTY3 mhZrLEByNJTPPgPsejt+PFQdPAA+uJc50GgFffE2Enap4vEH6S/T9NoWyILKcXxroLZQ bpF03EMGrlZR9V/Im/6UteoL29v0yVDCa5QXH16Eju4H4pw0CZh8HJhyq8SK5vYiHfxy RJIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=UMgoJnvC; dkim=neutral (no key) header.i=@suse.de header.b="xMs2/mrF"; 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 v7-20020a1709060b4700b009495e73249esi1312445ejg.601.2023.04.06.07.30.59; Thu, 06 Apr 2023 07:31:26 -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=UMgoJnvC; dkim=neutral (no key) header.i=@suse.de header.b="xMs2/mrF"; 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 S239177AbjDFOah (ORCPT + 99 others); Thu, 6 Apr 2023 10:30:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236811AbjDFOaZ (ORCPT ); Thu, 6 Apr 2023 10:30:25 -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 C44BF93C4; Thu, 6 Apr 2023 07:30:23 -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 734D01FDF2; Thu, 6 Apr 2023 14:30:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1680791421; 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=Qfcv3B3fedBLgcumau4bBH8VjCihrniSXhFDyqRcmIU=; b=UMgoJnvCeiK9jxVQtqmeqIxOrlhEykEZKjzSOFgdjYXPOaEeouZr/xPGH92rkXlZMCRCom 7m0nP4zxeu+AOSSlaHjChhQ5Ltxeby0X9cOePyOoqK+1RJOGmcGU0slDPgitbbzb2e4jHF UglT7A7F2x/yJkklxkp32Pp0LoLSC0s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1680791421; 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=Qfcv3B3fedBLgcumau4bBH8VjCihrniSXhFDyqRcmIU=; b=xMs2/mrF+wI+I87wQTE4JPLgLXh4qxf8hQ2bf6jBN7tF2FFTkb2p4x3cm6gAajii019gcw 1cnGeoKGGcSHFoBg== 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 0FF431351F; Thu, 6 Apr 2023 14:30:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 9LH5An3XLmS4LgAAMHmgww (envelope-from ); Thu, 06 Apr 2023 14:30:21 +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 v2 00/19] arch: Consolidate Date: Thu, 6 Apr 2023 16:30:00 +0200 Message-Id: <20230406143019.6709-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. 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 | 11 +- 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 | 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 | 15 +- arch/sparc/Makefile | 1 + arch/sparc/include/asm/fb.h | 26 +-- 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 | 23 ++- .../video/fbdev => include/video}/sticore.h | 16 +- 28 files changed, 289 insertions(+), 291 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 prerequisite-patch-id: 0aa359f6144c4015c140c8a6750be19099c676fb prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24 prerequisite-patch-id: d571861118316645b0124ac21260571720b632e2 prerequisite-patch-id: 15c0024c23be42851054ea840eec195f69716c08 prerequisite-patch-id: 441ee4341b183e4577c20a3f3bdebee529d21c34 prerequisite-patch-id: cbc453ee02fae02af22fbfdce56ab732c7a88c36 -- 2.40.0