From: Thomas Zimmermann <tzimmermann@suse.de>
To: daniel@ffwll.ch, airlied@gmail.com,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
javierm@redhat.com, sam@ravnborg.org
Cc: linux-samsung-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
amd-gfx@lists.freedesktop.org,
Thomas Zimmermann <tzimmermann@suse.de>,
linux-tegra@vger.kernel.org, freedreno@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 06/12] drm/fbdev-dma: Use regular fbdev I/O helpers
Date: Mon, 22 May 2023 14:21:34 +0200 [thread overview]
Message-ID: <20230522122140.30131-7-tzimmermann@suse.de> (raw)
In-Reply-To: <20230522122140.30131-1-tzimmermann@suse.de>
Use the regular fbdev helpers for framebuffer I/O instead of DRM's
helpers. Fbdev-dma 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 <tzimmermann@suse.de>
---
drivers/gpu/drm/Kconfig | 1 +
drivers/gpu/drm/drm_fbdev_dma.c | 12 +++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index ba3fb04bb691..77fb10ddd8a2 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -223,6 +223,7 @@ config DRM_TTM_HELPER
config DRM_GEM_DMA_HELPER
tristate
depends on DRM
+ select FB_SYS_HELPERS if DRM_FBDEV_EMULATION
help
Choose this if you need the GEM DMA helper functions
diff --git a/drivers/gpu/drm/drm_fbdev_dma.c b/drivers/gpu/drm/drm_fbdev_dma.c
index 728deffcc0d9..09a36dc38c43 100644
--- a/drivers/gpu/drm/drm_fbdev_dma.c
+++ b/drivers/gpu/drm/drm_fbdev_dma.c
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: MIT
+#include <linux/fb.h>
+
#include <drm/drm_crtc_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_fb_helper.h>
@@ -64,12 +66,12 @@ static const struct fb_ops drm_fbdev_dma_fb_ops = {
.owner = THIS_MODULE,
.fb_open = drm_fbdev_dma_fb_open,
.fb_release = drm_fbdev_dma_fb_release,
- .fb_read = drm_fb_helper_sys_read,
- .fb_write = drm_fb_helper_sys_write,
+ .fb_read = fb_sys_read,
+ .fb_write = fb_sys_write,
DRM_FB_HELPER_DEFAULT_OPS,
- .fb_fillrect = drm_fb_helper_sys_fillrect,
- .fb_copyarea = drm_fb_helper_sys_copyarea,
- .fb_imageblit = drm_fb_helper_sys_imageblit,
+ .fb_fillrect = sys_fillrect,
+ .fb_copyarea = sys_copyarea,
+ .fb_imageblit = sys_imageblit,
.fb_destroy = drm_fbdev_dma_fb_destroy,
.fb_mmap = drm_fbdev_dma_fb_mmap,
};
--
2.40.1
next prev parent reply other threads:[~2023-05-22 12:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-22 12:21 [PATCH v3 00/12] drm/fbdev: Remove DRM's helpers for fbdev I/O Thomas Zimmermann
2023-05-22 12:21 ` [PATCH v3 01/12] fbdev: Add Kconfig options to select different fb_ops helpers Thomas Zimmermann
2023-05-22 12:21 ` [PATCH v3 02/12] drm/armada: Use regular fbdev I/O helpers Thomas Zimmermann
2023-05-22 12:21 ` [PATCH v3 03/12] drm/exynos: " Thomas Zimmermann
2023-05-22 12:21 ` [PATCH v3 04/12] drm/gma500: " Thomas Zimmermann
2023-05-22 12:21 ` [PATCH v3 05/12] drm/radeon: " Thomas Zimmermann
2023-05-22 12:21 ` Thomas Zimmermann [this message]
2023-05-22 12:21 ` [PATCH v3 07/12] drm/msm: " Thomas Zimmermann
2023-05-22 12:21 ` [PATCH v3 08/12] drm/omapdrm: " Thomas Zimmermann
2023-05-22 12:21 ` [PATCH v3 09/12] drm/tegra: " Thomas Zimmermann
2023-05-22 12:21 ` [PATCH v3 10/12] drm/fb-helper: Export helpers for marking damage areas Thomas Zimmermann
2023-05-22 12:21 ` [PATCH v3 11/12] drm/fbdev-generic: Implement dedicated fbdev I/O helpers Thomas Zimmermann
2023-05-22 13:20 ` [Freedreno] " Dmitry Baryshkov
2023-05-22 18:46 ` Thomas Zimmermann
2023-05-23 19:19 ` Thomas Zimmermann
2023-05-22 12:21 ` [PATCH v3 12/12] drm/i915: " Thomas Zimmermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230522122140.30131-7-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox