Message ID | 20230704160133.20261-6-tzimmermann@suse.de (mailing list archive) |
---|---|
State | Accepted |
Commit | b1d69bf1bf93d23751031e8f086e3b6ba275320b |
Headers | show |
Series | drm: Improve fbdev emulation for DMA-able framebuffers | expand |
Hi, > -----Original Message----- > From: Thomas Zimmermann <tzimmermann@suse.de> > Sent: Wednesday, July 5, 2023 12:50 AM > 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 05/10] drm/exynos: Use fbdev DMA helpers > > Use fbdev's DMA helpers for fbdev emulation. They drivers 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. Acked-by : Inki Dae <inki.dae@samsung.com> Thanks, Inki Dae > > Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> > Fixes: 1c248b7d2960 ("DRM: add DRM Driver for Samsung SoC EXYNOS4210.") > 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
Thomas Zimmermann <tzimmermann@suse.de> writes: > Use fbdev's DMA helpers for fbdev emulation. They drivers previously s/They/The > 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. > > Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> > Fixes: 1c248b7d2960 ("DRM: add DRM Driver for Samsung SoC EXYNOS4210.") Wonder the value of this "Fixes:" tag since this patch depends on the DMA helpers introduced in 1/10? I would just drop it, since it might confuse the different kernel stable scripts that attempt to backport by looking at this tag. As you said, it has been present from the beginning of this driver. Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
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, };
Use fbdev's DMA helpers for fbdev emulation. They drivers 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. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Fixes: 1c248b7d2960 ("DRM: add DRM Driver for Samsung SoC EXYNOS4210.") 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(-)