Message ID | 20230417125651.25126-1-tzimmermann@suse.de |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2103777vqo; Mon, 17 Apr 2023 05:59:03 -0700 (PDT) X-Google-Smtp-Source: AKy350b5mo9Ep1V/kLzTE4IFqPhnuvJQfP5Oh7svgE8R/4PPRKBuphqpBRZqPgPkW5shv3hLUg7G X-Received: by 2002:a05:6a00:b4f:b0:63b:5f78:d6db with SMTP id p15-20020a056a000b4f00b0063b5f78d6dbmr19626607pfo.21.1681736342994; Mon, 17 Apr 2023 05:59:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681736342; cv=none; d=google.com; s=arc-20160816; b=lhx4ZvZm+rC3I7Tfg8/PVMSMDeu+7tb9MVhbLzcWE4ic+FlE5iIInDDFkZ6rnwgI/U ayEpKsa8hxxy7n9kCWFGka/GOD50Zy6yXiWcY/91hhITtKk5B0fz2x8iN454WNsjMOTP dP+WObN2gXTacxpU9LIGMAQ1YEVXktjUTowHXUKJrwbC3ptMFZ9MWmGkmVCtG5OB5Ghb djzeZnz+xSM0SioUTqqD00Wjb1zasSxTEaVjinYa4YOVIuUSgtbkxiV/FHjUPwUrQWgl U0ASdBpxR5fIaVw+5mh+bf3NDQrpns5mQ6Iy3JaT+yy8JtK7LL3PuzUdwn8x0PPVkb21 sN7Q== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z20-20020aa79494000000b0062a3e63c747si11291135pfk.197.2023.04.17.05.58.49; Mon, 17 Apr 2023 05:59:02 -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 S231355AbjDQM5W (ORCPT <rfc822;leviz.kernel.dev@gmail.com> + 99 others); Mon, 17 Apr 2023 08:57:22 -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 <rfc822;linux-kernel@vger.kernel.org>); 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 <tzimmermann@suse.de>); Mon, 17 Apr 2023 12:56:57 +0000 From: Thomas Zimmermann <tzimmermann@suse.de> 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 <tzimmermann@suse.de> Subject: [PATCH v3 00/19] arch: Consolidate <asm/fb.h> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763428367546529381?= X-GMAIL-MSGID: =?utf-8?q?1763428367546529381?= |
Series |
arch: Consolidate <asm/fb.h>
|
|
Message
Thomas Zimmermann
April 17, 2023, 12:56 p.m. UTC
Various architectures provide <asm/fb.h> with helpers for fbdev framebuffer devices. Share the contained code where possible. There is already <asm-generic/fb.h>, 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 <asm/io.h>. 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 <asm/fb.h> with generic helpers arch/arm: Implement <asm/fb.h> with generic helpers arch/arm64: Implement <asm/fb.h> with generic helpers arch/ia64: Implement <asm/fb.h> with generic helpers arch/loongarch: Implement <asm/fb.h> with generic helpers arch/m68k: Merge variants of fb_pgprotect() into single function arch/m68k: Implement <asm/fb.h> with generic helpers arch/mips: Implement <asm/fb.h> 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 <asm/fb.h> with generic helpers arch/powerpc: Implement <asm/fb.h> with generic helpers arch/sh: Implement <asm/fb.h> with generic helpers arch/sparc: Implement fb_is_primary_device() in source file arch/sparc: Implement <asm/fb.h> with generic helpers arch/x86: Implement <asm/fb.h> 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
Comments
On Mon, Apr 17, 2023, at 14:56, Thomas Zimmermann wrote: > Various architectures provide <asm/fb.h> with helpers for fbdev > framebuffer devices. Share the contained code where possible. There > is already <asm-generic/fb.h>, 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 <asm/io.h>. Looks all good to me, Acked-by: Arnd Bergmann <arnd@arndb.de> Arnd
Hi Am 17.04.23 um 16:12 schrieb Arnd Bergmann: > On Mon, Apr 17, 2023, at 14:56, Thomas Zimmermann wrote: >> Various architectures provide <asm/fb.h> with helpers for fbdev >> framebuffer devices. Share the contained code where possible. There >> is already <asm-generic/fb.h>, 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 <asm/io.h>. > > Looks all good to me, > > Acked-by: Arnd Bergmann <arnd@arndb.de> Thanks a lot. I know that Helge wants to test the PARISC changes, so I'll keep this series pending for a bit longer. I'd like to merge the patches through the DRM tree, if no one objects. Best regards Thomas > > Arnd -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Hi Thomas, > Am 17.04.23 um 16:12 schrieb Arnd Bergmann:>> On Mon, Apr 17, 2023, at 14:56, Thomas Zimmermann wrote: >>> Various architectures provide <asm/fb.h> with helpers for fbdev >>> framebuffer devices. Share the contained code where possible. There >>> is already <asm-generic/fb.h>, 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 <asm/io.h>. >> >> Looks all good to me, >> >> Acked-by: Arnd Bergmann <arnd@arndb.de> > > Thanks a lot. I know that Helge wants to test the PARISC changes, so > I'll keep this series pending for a bit longer. I'd like to merge the > patches through the DRM tree, if no one objects. Yes, patch is good and I've tested it on parisc. Thanks! You may add: Acked-by: Helge Deller <deller@gmx.de> to the series and take it through the drm tree. Helge