From patchwork Thu Aug 3 18:35:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13340723 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 4E435C04FE1 for ; Thu, 3 Aug 2023 18:42:13 +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:References:In-Reply-To: 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: List-Owner; bh=pIOhYqki++PmktQbJFWbPwdGTc2iLDdfBG6LJL+FbOo=; b=48ULZzWLfJI9k8 Z/AdoBS2oYjljN2b3Q83HZaMQBCTPQOBqnCZQ2Wqcr/yiYkJ4yfcJTTHokedCXk1WcBDVePa2STaZ tLPyVhqHKTSF2etWDXi+9jaGR3buMiBx9rxEPLjjdECFcTLDszx3o5ACT+HXa46y3DER9O+EM/SC1 qlx2XzXlbd5XSzh7m1Am+WEZotsRSLEGqKoCdoeOttMExJNVleIl71DY1I8TRV5T63rhSYGvtYpg7 TFsSgVx1+nSSyuqYvoyeUzrRa26Oe/WAipRS/6BewpTJ88yuyKxO7PF2uwCAUZd89P2rfZi1gMPMG 0uoFtD+9tnRvasYLHMZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRdGV-00AccH-0Y; Thu, 03 Aug 2023 18:41:39 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRdFf-00AbhY-1q; Thu, 03 Aug 2023 18:40:53 +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-out2.suse.de (Postfix) with ESMTPS id A30591F890; Thu, 3 Aug 2023 18:40:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1691088043; 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: in-reply-to:in-reply-to:references:references; bh=JNBli7ory+gyKuKwHaGXbQurMpw0VV11y2foC+Necv8=; b=qWytb2Rza+De3yOqACFMtr8+agcJQmVMl5YF9VMlevucfLfEAcSkpmpbmA5PaycIkr4vFN 0zbs4cQrxV2db4c7BjtERP67CC/FEW+WU1i0eX5b9oBplcv2HplkkmrQOfJsF3A2fmvK/1 XRKxNbsiuvV4Qevzxe2lCrtO01FAh/0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1691088043; 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: in-reply-to:in-reply-to:references:references; bh=JNBli7ory+gyKuKwHaGXbQurMpw0VV11y2foC+Necv8=; b=vfXglBuUkb8zydPE/D60YXyEtHcRiYFSIm/44C7Q74YAAGDUwn2jLlWj74swAz8S2ELUcQ 3Daf6JIBsBP9LdCA== 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 6EF43139BD; Thu, 3 Aug 2023 18:40:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uKgvGqv0y2TLGAAAMHmgww (envelope-from ); Thu, 03 Aug 2023 18:40:43 +0000 From: Thomas Zimmermann To: deller@gmx.de, javierm@redhat.com, sam@ravnborg.org Cc: linux-media@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-geode@lists.infradead.org, linux-omap@vger.kernel.org, kvm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v3 22/47] fbdev/macfb: Use fbdev I/O helpers Date: Thu, 3 Aug 2023 20:35:47 +0200 Message-ID: <20230803184034.6456-23-tzimmermann@suse.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230803184034.6456-1-tzimmermann@suse.de> References: <20230803184034.6456-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230803_114047_781712_ADDB82BE X-CRM114-Status: GOOD ( 12.43 ) 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 Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions. Select the correct modules with Kconfig's FB_IOMEM_HELPERS token. The macro and token set the currently selected values, so there is no functional change. v3: * use _IOMEM_ in commit message v2: * updated to use _IOMEM_ tokens Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Helge Deller --- drivers/video/fbdev/Kconfig | 4 +--- drivers/video/fbdev/macfb.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 231450ef449f..c7ee242985ed 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -407,9 +407,7 @@ config FB_STI config FB_MAC bool "Generic Macintosh display support" depends on (FB = y) && MAC - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT + select FB_IOMEM_HELPERS select FB_MACMODES config FB_HP300 diff --git a/drivers/video/fbdev/macfb.c b/drivers/video/fbdev/macfb.c index 5ca208d992cc..887fffdccd24 100644 --- a/drivers/video/fbdev/macfb.c +++ b/drivers/video/fbdev/macfb.c @@ -498,10 +498,8 @@ static int macfb_setcolreg(unsigned regno, unsigned red, unsigned green, static const struct fb_ops macfb_ops = { .owner = THIS_MODULE, + FB_DEFAULT_IOMEM_OPS, .fb_setcolreg = macfb_setcolreg, - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, }; static void __init macfb_setup(char *options)