]> git.dujemihanovic.xyz Git - linux.git/commitdiff
drm/exynos: Use fbdev DMA helpers
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 7 Jul 2023 08:31:57 +0000 (10:31 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 24 Jul 2023 18:14:43 +0000 (20:14 +0200)
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>
Link: https://patchwork.freedesktop.org/patch/msgid/20230707083422.18691-7-tzimmermann@suse.de
drivers/gpu/drm/exynos/Kconfig
drivers/gpu/drm/exynos/exynos_drm_fbdev.c

index 7ca7e1dab52c3ecbd16badcf0c21a85b7a84e2e2..661b42ad48733e66f5a2d853c8e8e33dafaf6780 100644 (file)
@@ -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.
index 226310c765d833d3f4c74e6541981b6493950e15..6c5090466524e25c8fe2cd4b9ac5f1429aa37894 100644 (file)
@@ -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,
 };