From patchwork Mon May 22 12:21:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13250503 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 A4395C7EE2E for ; Mon, 22 May 2023 12:40:44 +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=NpwDreeaAV6kCudZYHj/rrMnGYryo7k57DAbjtSfs+A=; b=ZOsX+ts6sXjZqf Jm3TzfgQ0yTtv+ag1PiGaVvDNE0eZm3UYGax+n2MYHKeOuZLjYn6a6ySIZyXXB6d6VLVG8yHcqPQu hv8onZN9hmFzpQ+AW+5++N0qTqKyXbtbRkKU/dJKRWyCKddSGkFMrRtrhvVPZqX8qv2B1NWJBvi6h Q1e1O1n2FP6mguk+FMhwd0AQwaX7RllVmhTBeliOw1EfaGOtQm5xk++OAyv6mPK9Sc/u/GjpMr5+H oOvnzrIQlsQf4+KwqMhkZI0DR79jJN0OZblpYDe4wzQAUelreQ7W28XvZyJ5dhQ3aIgsT9kjv67f1 RgA1K/4oNkC5mLn8Fbww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q14pl-006WIJ-2s; Mon, 22 May 2023 12:40:17 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q14pg-006WGi-1q for linux-arm-kernel@bombadil.infradead.org; Mon, 22 May 2023 12:40:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=x+qQP86XyhL0pbwZiVaiGsWQMYOZoabJAUGvw5FILJM=; b=JggVxhZmePMA2Lhklc5fZOO/gA EM23FH3xPoEL5Doo3qOYcDb65xrnUs5OWkKhZptKuL/P+uTMqhi3vgfrWgWO2cTM2pPbi7MpCEc+8 rtW9es8bnR3bU4LMe3O+XBF5ev6V4QuQI3npDxJBPEJqYeVer7R4ivgCvrqNqtVzalT/vWRD/61Cu xYKqhwAHwOqZi4gtaRVCoiaBG7V8WJd9cGHfBl88RfnQ9bppCDIz2jcE9zQXc8iBHFOeZOyCPjfNL 7lu9NsznfvKoBUmd+m8J98PksTLXP1yNJCQNL+qubCF/001f/g9NvLV3cgUvVppbBmwbGcTEymc0N Bq1J+RzA==; Received: from smtp-out2.suse.de ([195.135.220.29]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q14YF-0021s8-2T for linux-arm-kernel@lists.infradead.org; Mon, 22 May 2023 12:22:13 +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 988521FED0; Mon, 22 May 2023 12:21:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1684758105; 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=x+qQP86XyhL0pbwZiVaiGsWQMYOZoabJAUGvw5FILJM=; b=XD2LIXhq6YDA+U6wryL2sYQfx7/hF7EsMKyHd0GgYNXtkvCfpnVOkHRXptCsRIjBRgDtHO qXrGBDaG076jNbiBmxlh8qc6inhE7HLIz2ui029qSaCd39ohWjDzGqelsrbAeQEsBp6DXo yK0PGJzd4ChmY8Wc57toIbP+rpyQiis= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1684758105; 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=x+qQP86XyhL0pbwZiVaiGsWQMYOZoabJAUGvw5FILJM=; b=GeDTIHEv1apUN/PFvodHyXjmokj7EIF/5d6K9DQE6MhkmwKVRqSFSbSQi0MP6Fxlmxv/gK rgoa6z8ubQIKmfAw== 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 40E0813776; Mon, 22 May 2023 12:21:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gKznDllea2RYVAAAMHmgww (envelope-from ); Mon, 22 May 2023 12:21:45 +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 , Thierry Reding , Mikko Perttunen , Jonathan Hunter Subject: [PATCH v3 09/12] drm/tegra: Use regular fbdev I/O helpers Date: Mon, 22 May 2023 14:21:37 +0200 Message-Id: <20230522122140.30131-10-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230522122140.30131-1-tzimmermann@suse.de> References: <20230522122140.30131-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230522_132212_112869_FD30E866 X-CRM114-Status: GOOD ( 12.51 ) 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. Tegra 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 Cc: Thierry Reding Cc: Mikko Perttunen Cc: Jonathan Hunter --- drivers/gpu/drm/tegra/Kconfig | 1 + drivers/gpu/drm/tegra/fbdev.c | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/tegra/Kconfig b/drivers/gpu/drm/tegra/Kconfig index 56453ca277c2..498313778175 100644 --- a/drivers/gpu/drm/tegra/Kconfig +++ b/drivers/gpu/drm/tegra/Kconfig @@ -12,6 +12,7 @@ config DRM_TEGRA select DRM_KMS_HELPER select DRM_MIPI_DSI select DRM_PANEL + select FB_SYS_HELPERS if DRM_FBDEV_EMULATION select TEGRA_HOST1X select INTERCONNECT select IOMMU_IOVA diff --git a/drivers/gpu/drm/tegra/fbdev.c b/drivers/gpu/drm/tegra/fbdev.c index dca9eccae466..144d851e566f 100644 --- a/drivers/gpu/drm/tegra/fbdev.c +++ b/drivers/gpu/drm/tegra/fbdev.c @@ -8,6 +8,7 @@ */ #include +#include #include #include @@ -59,11 +60,11 @@ static void tegra_fbdev_fb_destroy(struct fb_info *info) static const struct fb_ops tegra_fb_ops = { .owner = THIS_MODULE, DRM_FB_HELPER_DEFAULT_OPS, - .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 = tegra_fb_mmap, .fb_destroy = tegra_fbdev_fb_destroy, };