From patchwork Wed May 24 09:21:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13253635 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 4F50BC87FE4 for ; Wed, 24 May 2023 09:22:43 +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=J6Rx6hRvv9vorPxW2eb8+kJe/M1kbIqAIJ9Jsc1UUtU=; b=ArBB84UGVgeZbD zHrFJKtBrfKC0Rm3u973y9luJ8vU7HB1MhVIcTrf+b7EQ/AuViJiCbW78fcdgNnsvtMzVZi8eVOlv 1c8RlHla8ReEE5lG2GNNylEf8QGPdEVeppFuLBaLEdvkHEFW3EuDCAQkh57sEI7fNiOWHQ2F4y2QQ iWqVl8+q8VopoQKGPyTp7+4bzjHI0BdUsC9a0v8ai4lcYsuSx+sfncnINtaTC67nE+PQz0rKaP3EO ZedCkfI6X8H57Tiwu6TrotNP/4O8L94BgxjlAQBHr79B5c56HI9/xDqDqgYp7V1ugq6MWFVFV4uNI sdjjY3Yxg3xSY3wnxn3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1khE-00CvtE-29; Wed, 24 May 2023 09:22:16 +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 1q1kh0-00Cvjf-2P for linux-arm-kernel@bombadil.infradead.org; Wed, 24 May 2023 09:22:02 +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=Oj2iRP6pMo4vDxNswIvtR3QKGnI5kEeFw2PfgIFRgBs=; b=QRuQUg+oLaTeZfpBM40OmsT6op BnUYyeqgirPd3IQT3e8S3B/1fNtwyICFF814X9ZctTPkEtpuDjBDbSsiCvkOtUhFth0MQBs6QOyg2 qcMS+3Q2lCinmHhz2b4xwqi7icEJjTF2+Dt+YuvLwUublE/C/bBw9CR4tkj7yR4d5tmNT0rzhDtPn BmQ8lN5CELj6OX8YlaCOiM+6+qIbXaROuRxN++/A96HESTxhWnAxzlQzREeJhxapgt3ggh8IMLe+I evHRTCgy3QBnUrEIDRw5twuuhyn2PQd3QEgU7t9dryDR+tkQnibrTRyarPyZy3tLMKypBPCTkaUMs yo0zmO6Q==; Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1kgw-004x82-25 for linux-arm-kernel@lists.infradead.org; Wed, 24 May 2023 09:22:01 +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 9107C22498; Wed, 24 May 2023 09:21:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1684920116; 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=Oj2iRP6pMo4vDxNswIvtR3QKGnI5kEeFw2PfgIFRgBs=; b=NFGtqcWf+kR1+9XuBtmK5g4jw/b/cKBsucrTQYr4JtOznGE5idxK8p3e7lA/p0EsGyYaYz lO1Enum4+7EVeqi3r57ppA2wUY/T9e8ZWCMZuk7o59A6SgzuvxVC1fMxF+EYlP2jrzTdyK gzzGxFS4biFixrDBDqed+spj8wt095A= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1684920116; 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=Oj2iRP6pMo4vDxNswIvtR3QKGnI5kEeFw2PfgIFRgBs=; b=vTx9MiQcb0Oc//KTM/MISv+8HVX4/muXP8Onapsy8Wf0GzktWfGfRt0gLCGfbyCCj1iPBl y8b4jw7tygg7l6CA== 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 4914513A10; Wed, 24 May 2023 09:21:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id mM8TETTXbWTHewAAMHmgww (envelope-from ); Wed, 24 May 2023 09:21:56 +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 , Tomi Valkeinen Subject: [PATCH v4 09/13] drm/omapdrm: Use regular fbdev I/O helpers Date: Wed, 24 May 2023 11:21:46 +0200 Message-Id: <20230524092150.11776-10-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230524092150.11776-1-tzimmermann@suse.de> References: <20230524092150.11776-1-tzimmermann@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230524_102158_912304_1C2DE2A7 X-CRM114-Status: GOOD ( 12.21 ) 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. Omapdrm 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. v4: * use initializer macros for struct fb_ops v2: * use FB_SYS_HELPERS option Signed-off-by: Thomas Zimmermann Cc: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/Kconfig | 1 + drivers/gpu/drm/omapdrm/omap_fbdev.c | 11 +++-------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/Kconfig b/drivers/gpu/drm/omapdrm/Kconfig index 76ded1568bd0..b4ac76c9f31b 100644 --- a/drivers/gpu/drm/omapdrm/Kconfig +++ b/drivers/gpu/drm/omapdrm/Kconfig @@ -4,6 +4,7 @@ config DRM_OMAP depends on DRM && OF depends on ARCH_OMAP2PLUS select DRM_KMS_HELPER + select FB_SYS_HELPERS if DRM_FBDEV_EMULATION select VIDEOMODE_HELPERS select HDMI default n diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c index b950e93b3846..b7ccce0704a3 100644 --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c @@ -4,6 +4,8 @@ * Author: Rob Clark */ +#include + #include #include #include @@ -95,20 +97,13 @@ static void omap_fbdev_fb_destroy(struct fb_info *info) static const struct fb_ops omap_fb_ops = { .owner = THIS_MODULE, - + FB_DEFAULT_SYS_OPS, .fb_check_var = drm_fb_helper_check_var, .fb_set_par = drm_fb_helper_set_par, .fb_setcmap = drm_fb_helper_setcmap, .fb_blank = drm_fb_helper_blank, .fb_pan_display = omap_fbdev_pan_display, .fb_ioctl = drm_fb_helper_ioctl, - - .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_destroy = omap_fbdev_fb_destroy, };