From patchwork Mon May 15 09:40:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13241135 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 B70B4C7EE22 for ; Mon, 15 May 2023 09:41:12 +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=8HEeh5SM7m8FhqsNv9THJTIpHeVrhrVoybzTOaMWJ9g=; b=Eu+4lTdYwUDwlH FgAqbw3+Pu3jLE1v5Cw9rwSa9+rJhp80svZKiZeeJEjEjVjgtg6d4P2xsZeJk6sKeZwxyIvO3gsmU 4UQh8Sy3mOvfGVCP4hvmw2JuA2SpZASi0e9B3JLqkCxPgZN+ePd/c7L+FfNxvd+GMCB+WhC94TtXM kVtNfqyH7dI6r2xZzRa4OGckAPObYWIZZFPTdJ9cu8U7ImCRlRQrDY5qC/Byx+4w4N4VxCmaOaVKi f1lBBEWfh1gWI4LAsbploFVsIYFMZ1okqktLmPbAh6iYueBL4M+j4AlXO9nir4Z52GcRBpN+KNKkB Ex9xX3a44SuZaGdHCJ8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pyUhH-001b2Q-0O; Mon, 15 May 2023 09:40:51 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pyUh5-001auv-2L for linux-arm-kernel@lists.infradead.org; Mon, 15 May 2023 09:40:42 +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 6652E21D28; Mon, 15 May 2023 09:40:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1684143637; 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=opXTG60XyU/ZCK5AHjD7yJxVvldlhQpJTX0QZWs21Mc=; b=IT6vYbvjDEHpTGYjAbWHCgPx/sKEH7mQmtfygRYa37tA8ZuIe6kO85MVqO3aymN8ZJKL1B Z8xCExMr6PB+VQRY+l8XitWXI5/vO8qgW/205e36rG5Di1JBN10Gj+DPubgWCGWdMHxufE OpGqQ5Qwl6WRUXU5TOLsXPIKc8DQXZo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1684143637; 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=opXTG60XyU/ZCK5AHjD7yJxVvldlhQpJTX0QZWs21Mc=; b=Fa+i7Q8xqLFxU+pPyhmkKI62cNpW+TbYPWm94XMrSeRi6GfnBZgSE2Zom3rYoG1FhPzU7L FlxwDvjqGVbpg2DA== 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 085A713466; Mon, 15 May 2023 09:40:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6JcLARX+YWTeTwAAMHmgww (envelope-from ); Mon, 15 May 2023 09:40:37 +0000 From: Thomas Zimmermann To: daniel@ffwll.ch, airlied@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, javierm@redhat.com, sam@ravnborg.org Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-tegra@vger.kernel.org, Thomas Zimmermann , Dmitry Baryshkov , Rob Clark , Abhinav Kumar , Sean Paul Subject: [PATCH v2 07/12] drm/msm: Use regular fbdev I/O helpers Date: Mon, 15 May 2023 11:40:28 +0200 Message-Id: <20230515094033.2133-8-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230515094033.2133-1-tzimmermann@suse.de> References: <20230515094033.2133-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230515_024039_929235_7C7B4211 X-CRM114-Status: GOOD ( 13.26 ) 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 Use the regular fbdev helpers for framebuffer I/O instead of DRM's helpers. Msm does not use damage handling, so DRM's fbdev helpers are mere wrappers around the fbdev code. By using fbdev helpers directly within each DRM fbdev emulation, we can eventually remove DRM's wrapper functions entirely. v2: * use FB_SYS_HELPERS option Signed-off-by: Thomas Zimmermann Reviewed-by: Dmitry Baryshkov Cc: Rob Clark Cc: Abhinav Kumar Cc: Dmitry Baryshkov Cc: Sean Paul --- drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/msm/msm_fbdev.c | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig index 85f5ab1d552c..a78662bd6273 100644 --- a/drivers/gpu/drm/msm/Kconfig +++ b/drivers/gpu/drm/msm/Kconfig @@ -21,6 +21,7 @@ config DRM_MSM select DRM_BRIDGE select DRM_PANEL_BRIDGE select DRM_SCHED + select FB_SYS_HELPERS if DRM_FBDEV_EMULATION select SHMEM select TMPFS select QCOM_SCM diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c index 2ebc86381e1c..fc0353a4160e 100644 --- a/drivers/gpu/drm/msm/msm_fbdev.c +++ b/drivers/gpu/drm/msm/msm_fbdev.c @@ -4,6 +4,8 @@ * Author: Rob Clark */ +#include + #include #include #include @@ -57,11 +59,11 @@ static const struct fb_ops msm_fb_ops = { /* Note: to properly handle manual update displays, we wrap the * basic fbdev ops which write to the framebuffer */ - .fb_read = drm_fb_helper_sys_read, - .fb_write = drm_fb_helper_sys_write, - .fb_fillrect = drm_fb_helper_sys_fillrect, - .fb_copyarea = drm_fb_helper_sys_copyarea, - .fb_imageblit = drm_fb_helper_sys_imageblit, + .fb_read = fb_sys_read, + .fb_write = fb_sys_write, + .fb_fillrect = sys_fillrect, + .fb_copyarea = sys_copyarea, + .fb_imageblit = sys_imageblit, .fb_mmap = msm_fbdev_mmap, .fb_destroy = msm_fbdev_fb_destroy, };