From patchwork Mon Dec 19 16:04:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13076941 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 326EDC4332F for ; Mon, 19 Dec 2022 17:48:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=TWIfuMUyekX40arE7TDNQGZOQ1Q3/FE3fECDeOU/dE8=; b=rC60I5EBwVy4v7 pZkdbyXhvWsMCT8La8kRwWNbai6KlgfHgQ7cg9EIz+LmumI1ZIXnZBIa43+emwGVfq3O32O/ix5Sk Q1pW3c2BYeJb1Jwp9zleOZ8K9CGsWMYPKgBk9EeXJidCdQuRp44To46tOFiu3MyXxEoc4xFIEMBJG dbfOsvQNXfCw3D5SsMGk7dG4O1QLKRJHcT0FBZxkLWXiKHuoLve4T4UgMq9emtvMoHb86Z8/7w7dl B+DqXuKtp7hC1YRwLPoLS4Pjch2gNYqtpMeLgJ6DPLmRV1KSDYWC9qSvrtJHEoytnnQ7OKeihYcvD q2YoZmvTf12wTdR2qx+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7KDi-00Gz4u-Te; Mon, 19 Dec 2022 17:46:35 +0000 Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7Idp-00Fmux-7B for linux-arm-kernel@lists.infradead.org; Mon, 19 Dec 2022 16:05:32 +0000 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 8296C38144; Mon, 19 Dec 2022 16:05:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1671465918; 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=Zi9DGAHO0BaQvyNUt7EaCCw0VNS9QAUwHpcrOeBGrvY=; b=ij+rxhcqW3W6+MWS3kO8nMtHYN3oDHlgFX/aDSZKOujL11P5YyA5Yp7J4PX+Ti5tiGaxVx xHeFpGDS6Y790wnabdtJDtShIYRUJWofvBsZb2l3zrBeJHBo1xpeMSqN/+iClmeP6Oep6Y 0kAs05m6gO/Z7fZltjIngJrkka93pjc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1671465918; 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=Zi9DGAHO0BaQvyNUt7EaCCw0VNS9QAUwHpcrOeBGrvY=; b=0p4gfUQSsxWvjADe+QY4pLfQhm4JPPLDWnJRyBCavXTyEkQMup1ME/v44uJTj5reo8Uvsk RFnYZJeqyymWAzCw== 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 487F613910; Mon, 19 Dec 2022 16:05:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id TWe9EL6LoGPeZwAAMHmgww (envelope-from ); Mon, 19 Dec 2022 16:05:18 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, intel-gfx@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-hyperv@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 00/18] drm,fbdev: Remove apertures structure and FBINFO_MISC_FIRMWARE Date: Mon, 19 Dec 2022 17:04:58 +0100 Message-Id: <20221219160516.23436-1-tzimmermann@suse.de> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221219_080525_513227_E60F3EAA X-CRM114-Status: GOOD ( 13.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Remove struct fb_info.apertures and FBINFO_MISC_FIRMWARE from fbdev and handle the aperture ownership without involving the fbdev core. The apertures field in struct fb_info is a remnant from earlier ownership management for framebuffer apertures. When fbdev core code still handled ownership of the framebuffer among fbdev device drivers, generic drivers set the aperture ranges to claim the firmware scanout buffer for themselves. Now that we have a module with helpers that manage aperture and framebuffer ownership among drivers, the aperture field is not needed any longer. In fact, several drivers set this field, even though they are not generic fbdev drivers. Only drivers that set FBINFO_MISC_FIRMWARE can use apertures in a meaningful way. To remove FBINFO_MISC_FIRMWARE, patches 1 and 2 remove it from fbcon. It was used to work around issues with font loading. That is now all handled in userspace. Patches 3 to 9 remove aperture setup from all non-generic drivers. These drivers are not for firmware graphics and do not have to set the values. For DRM, we do not need to allocate the apertures field any longer. Patches 10 to 17 update all generic fbdev drivers to manage aperture ownership by themselves by called Linux aperture helpers. The setup of the apertures field and setting FBINFO_MISC_FIRMWARE is being removed as a result of that. With all of its users gone, patch 18 removes FBINFO_MISC_FIRMWARE, struct fb_info.apertures and the fbdev core's aperture code. Tested with handover combinations of efifb, simpledrm and radeon. Thomas Zimmermann (18): fbcon: Remove trailing whitespaces Revert "fbcon: don't lose the console font across generic->chip driver switch" drm/gma500: Do not set struct fb_info.apertures drm/i915: Do not set struct fb_info.apertures drm/radeon: Do not set struct fb_info.apertures drm/fb-helper: Do not allocate unused apertures structure fbdev/clps711x-fb: Do not set struct fb_info.apertures fbdev/hyperv-fb: Do not set struct fb_info.apertures vfio-mdev/mdpy-fb: Do not set struct fb_info.apertures fbdev/efifb: Add struct efifb_par for driver data fbdev/efifb: Do not use struct fb_info.apertures fbdev/offb: Allocate struct offb_par with framebuffer_alloc() fbdev/offb: Do not use struct fb_info.apertures fbdev/simplefb: Do not use struct fb_info.apertures fbdev/vesafb: Remove trailing whitespaces fbdev/vesafb: Do not use struct fb_info.apertures fbdev/vga16fb: Do not use struct fb_info.apertures drm/fbdev: Remove aperture handling and FBINFO_MISC_FIRMWARE drivers/gpu/drm/drm_fb_helper.c | 20 ++--------- drivers/gpu/drm/gma500/framebuffer.c | 5 --- drivers/gpu/drm/i915/display/intel_fbdev.c | 7 ---- drivers/gpu/drm/radeon/radeon_fb.c | 4 --- drivers/video/fbdev/clps711x-fb.c | 10 +----- drivers/video/fbdev/core/fbcon.c | 41 ++++++++++------------ drivers/video/fbdev/core/fbmem.c | 33 ----------------- drivers/video/fbdev/core/fbsysfs.c | 1 - drivers/video/fbdev/efifb.c | 35 +++++++++++------- drivers/video/fbdev/hyperv_fb.c | 17 ++++----- drivers/video/fbdev/offb.c | 33 +++++++++-------- drivers/video/fbdev/simplefb.c | 19 +++++----- drivers/video/fbdev/vesafb.c | 37 ++++++++++--------- drivers/video/fbdev/vga16fb.c | 15 +++----- include/linux/fb.h | 22 ------------ samples/vfio-mdev/mdpy-fb.c | 8 ----- 16 files changed, 99 insertions(+), 208 deletions(-) base-commit: d322881f7e33af24901ee8ccaec3beef82f21203 prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24 prerequisite-patch-id: 3f204510fcbf9530d6540bd8e6128cce598988b6