From patchwork Wed May 24 09:21:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13253639 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 AEA88C77B73 for ; Wed, 24 May 2023 09:22:47 +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=71skWQ603GDKK1uhcx13C+T6PYRKjm3JqGpEsaCpQGU=; b=SPlzLDJqy20y7h BrRmReB8dcYVYfcAGXz7TUEvAnM8/Te7CZWklnFY0kcxNmRW4XpV49WO7Wi686/DXygl2KolATlB/ Aj2ZOr0CLyJ5d21b+k8zXhjqv1MNsAhJooZV3hMkn0w3QHaI+IrhPoWFz2KDy6lhw/wocl4PK+9J9 jSRaZwRapPoemcQkH5azOJ4bAxwzt7M6PpiU+NJBOHdzZJ0HqdlsBa+8uNmMfFBYL4MiwwImUusqM bE+F+0ktanxR20W90E9RoCM4GMEZicAa843HR2LiBPyI3r2bZhtnrR6GOpL6VOA9YOkaO6FAdoiB8 CeiE7/W2sg/iV+iIbCDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1khH-00CvwC-1H; Wed, 24 May 2023 09:22:19 +0000 Received: from desiato.infradead.org ([90.155.92.199]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1kh2-00Cvkt-1a for linux-arm-kernel@bombadil.infradead.org; Wed, 24 May 2023 09:22:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:Content-ID:Content-Description; bh=VboR6P5Y8v7anRwiGC6Dqkjcqx1w/oYRokA4I/cAkvQ=; b=oHcCKXI87jsQqGvjI504wbVtg3 /9QRwcG+NjfCETjoHOzRRG2A3XHbfzs3c3eDJdW7vDyIjGXelN0FZQqI+5b5qHNFiC1He3+KpjTwN Xd61ZyCeaWtKktmZgwJOp5wQsofiT2Ac2tPCyOFLJYsne5bdlEKD2kGKLFGEw2T3s/3RG/HXH4SFb O70wq0q7/SMx0i2MuhCNzuw+SUhUPGIGav1CLGLx4ic7+0BmvzXeIiUP9uZmoa2BsDgDIL21mHqio UIPTa291S1C0DwMHO5RDT5AsXTqUtVXmsH3UiWI/Eagb1BHe01LgYyHP/hvGMnMoZVe0MRIsRG31r HgXhTqXA==; Received: from smtp-out2.suse.de ([195.135.220.29]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1kgw-004x7z-2S for linux-arm-kernel@lists.infradead.org; Wed, 24 May 2023 09:22:02 +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 8DA361FDE6; Wed, 24 May 2023 09:21:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1684920115; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VboR6P5Y8v7anRwiGC6Dqkjcqx1w/oYRokA4I/cAkvQ=; b=qLtKgSF4GMEkW9IkcCsr1ssuXygdfVzt7JkAy16m5UaPoWyO2EsUNwlIubBg5ujXy2tLti kIlNbZ+LSZsARlJmpULaxdE4qRhS25wjpi9Tc9Nq0fXb1/JdmCLi2v1e51r0/k7GlmiVEu EwP9tEGqaFest+t4D+Fx4lEeuW3MHiY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1684920115; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VboR6P5Y8v7anRwiGC6Dqkjcqx1w/oYRokA4I/cAkvQ=; b=TdVQov4MztWlJ0vA8hM02dpiljW/eiZnFOlqgTWF1PSkwuX1SYuOCYTC9Lww30D92lvG+D MK49GCo4QS0P0pDQ== 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 3DB3B13425; Wed, 24 May 2023 09:21:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id WLs4DjPXbWTHewAAMHmgww (envelope-from ); Wed, 24 May 2023 09:21:55 +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 , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" Subject: [PATCH v4 06/13] drm/radeon: Use regular fbdev I/O helpers Date: Wed, 24 May 2023 11:21:43 +0200 Message-Id: <20230524092150.11776-7-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_102159_099556_FFBC9423 X-CRM114-Status: GOOD ( 13.10 ) 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. Radeon 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_IO_HELPERS option Signed-off-by: Thomas Zimmermann Acked-by: Alex Deucher Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" --- drivers/gpu/drm/radeon/Kconfig | 1 + drivers/gpu/drm/radeon/radeon_fbdev.c | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/radeon/Kconfig b/drivers/gpu/drm/radeon/Kconfig index e19d77d58810..fe498c8af1bb 100644 --- a/drivers/gpu/drm/radeon/Kconfig +++ b/drivers/gpu/drm/radeon/Kconfig @@ -11,6 +11,7 @@ config DRM_RADEON select DRM_SUBALLOC_HELPER select DRM_TTM select DRM_TTM_HELPER + select FB_IO_HELPERS if DRM_FBDEV_EMULATION select SND_HDA_COMPONENT if SND_HDA_CORE select POWER_SUPPLY select HWMON diff --git a/drivers/gpu/drm/radeon/radeon_fbdev.c b/drivers/gpu/drm/radeon/radeon_fbdev.c index fe76e29910ef..28212c2d6c98 100644 --- a/drivers/gpu/drm/radeon/radeon_fbdev.c +++ b/drivers/gpu/drm/radeon/radeon_fbdev.c @@ -24,6 +24,7 @@ * David Airlie */ +#include #include #include #include @@ -190,14 +191,10 @@ static void radeon_fbdev_fb_destroy(struct fb_info *info) static const struct fb_ops radeon_fbdev_fb_ops = { .owner = THIS_MODULE, - DRM_FB_HELPER_DEFAULT_OPS, .fb_open = radeon_fbdev_fb_open, .fb_release = radeon_fbdev_fb_release, - .fb_read = drm_fb_helper_cfb_read, - .fb_write = drm_fb_helper_cfb_write, - .fb_fillrect = drm_fb_helper_cfb_fillrect, - .fb_copyarea = drm_fb_helper_cfb_copyarea, - .fb_imageblit = drm_fb_helper_cfb_imageblit, + FB_DEFAULT_IO_OPS, + DRM_FB_HELPER_DEFAULT_OPS, .fb_destroy = radeon_fbdev_fb_destroy, };