linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: javierm@redhat.com, maarten.lankhorst@linux.intel.com,
	mripard@kernel.org
Cc: dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-fbdev@vger.kernel.org,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Inki Dae <inki.dae@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Alim Akhtar <alim.akhtar@samsung.com>
Subject: [PATCH v3 06/12] drm/exynos: Use fbdev DMA helpers
Date: Fri,  7 Jul 2023 10:31:57 +0200	[thread overview]
Message-ID: <20230707083422.18691-7-tzimmermann@suse.de> (raw)
In-Reply-To: <20230707083422.18691-1-tzimmermann@suse.de>

Use fbdev's DMA helpers for fbdev emulation. The driver previously
used the I/O-memory helpers, while allocating DMA-able system memory.
This could (in theory) result in bus errors from accessing the memory
range.

This bug has been present since the exynos driver was first added.

v2:
	* drop the pointless Fixes tag (Javier)
	* fix typo in commit message

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
---
 drivers/gpu/drm/exynos/Kconfig            | 2 +-
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig
index 7ca7e1dab52c..661b42ad4873 100644
--- a/drivers/gpu/drm/exynos/Kconfig
+++ b/drivers/gpu/drm/exynos/Kconfig
@@ -7,7 +7,7 @@ config DRM_EXYNOS
 	select DRM_DISPLAY_HELPER if DRM_EXYNOS_DP
 	select DRM_KMS_HELPER
 	select VIDEOMODE_HELPERS
-	select FB_IO_HELPERS if DRM_FBDEV_EMULATION
+	select FB_DMA_HELPERS if DRM_FBDEV_EMULATION
 	select SND_SOC_HDMI_CODEC if SND_SOC
 	help
 	  Choose this option if you have a Samsung SoC Exynos chipset.
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index fdf65587f1fe..7ca3424b59ce 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -49,9 +49,9 @@ static void exynos_drm_fb_destroy(struct fb_info *info)
 
 static const struct fb_ops exynos_drm_fb_ops = {
 	.owner		= THIS_MODULE,
-	__FB_DEFAULT_IO_OPS_RDWR,
+	__FB_DEFAULT_DMA_OPS_RDWR,
 	DRM_FB_HELPER_DEFAULT_OPS,
-	__FB_DEFAULT_IO_OPS_DRAW,
+	__FB_DEFAULT_DMA_OPS_DRAW,
 	.fb_mmap        = exynos_drm_fb_mmap,
 	.fb_destroy	= exynos_drm_fb_destroy,
 };
-- 
2.41.0


  parent reply	other threads:[~2023-07-07  8:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07  8:31 [PATCH v3 00/12] drm: Improve fbdev emulation for DMA-able framebuffers Thomas Zimmermann
2023-07-07  8:31 ` [PATCH v3 01/12] fbdev: Add fb_ops init macros for framebuffers in DMA-able memory Thomas Zimmermann
2023-07-07  8:31 ` [PATCH v3 02/12] drm/fbdev-dma: Use fbdev DMA helpers Thomas Zimmermann
2023-07-07  8:31 ` [PATCH v3 03/12] drm/tegra: " Thomas Zimmermann
2023-07-07 12:27   ` Thierry Reding
2023-07-07  8:31 ` [PATCH v3 04/12] drm/tegra: Set fbdev FBINFO_VIRTFB flag Thomas Zimmermann
2023-07-07 12:27   ` Thierry Reding
2023-07-07  8:31 ` [PATCH v3 05/12] drm/tegra: Store pointer to vmap'ed framebuffer in screen_buffer Thomas Zimmermann
2023-07-07 10:12   ` Javier Martinez Canillas
2023-07-07 12:27   ` Thierry Reding
2023-07-07  8:31 ` Thomas Zimmermann [this message]
2023-07-07  8:31 ` [PATCH v3 07/12] drm/exynos: Set fbdev FBINFO_VIRTFB flag Thomas Zimmermann
2023-07-07  8:31 ` [PATCH v3 08/12] drm/omapdrm: Set VM flags in GEM-object mmap function Thomas Zimmermann
2023-07-07  8:32 ` [PATCH v3 09/12] drm/omapdrm: Use GEM mmap for fbdev emulation Thomas Zimmermann
2023-07-07  8:32 ` [PATCH v3 10/12] drm/omapdrm: Set fbdev FBINFO_VIRTFB flag Thomas Zimmermann
2023-07-07  8:32 ` [PATCH v3 11/12] fbdev: Remove FB_DEFAULT_SYS_OPS Thomas Zimmermann
2023-07-07  8:32 ` [PATCH v3 12/12] fbdev: Harmonize some comments in <linux/fb.h> 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=20230707083422.18691-7-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=alim.akhtar@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=javierm@redhat.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fbdev@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=sw0312.kim@samsung.com \
    /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;
as well as URLs for NNTP newsgroup(s).