Message ID | 20230706124905.15134-1-tzimmermann@suse.de |
---|---|
Headers | show |
Series | drm: Improve fbdev emulation for DMA-able framebuffers | expand |
On Thu, Jul 06, 2023 at 02:46:42PM +0200, Thomas Zimmermann wrote: > Mark the framebuffer with FBINFO_VIRTFB. The framebuffer range is > in DMA-able memory and should be accessed with the CPU's regular > memory ops. > > v2: > * drop FBINFO_DEFAULT > > Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> > Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> > Acked-by: Maxime Ripard <mripard@kernel.org> > Cc: Thierry Reding <thierry.reding@gmail.com> > Cc: Mikko Perttunen <mperttunen@nvidia.com> > --- > drivers/gpu/drm/tegra/fbdev.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/tegra/fbdev.c b/drivers/gpu/drm/tegra/fbdev.c > index 82577b7c88da..d8460c5dc91e 100644 > --- a/drivers/gpu/drm/tegra/fbdev.c > +++ b/drivers/gpu/drm/tegra/fbdev.c > @@ -132,6 +132,7 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper, > } > } > > + info->flags |= FBINFO_VIRTFB; > info->screen_base = (void __iomem *)bo->vaddr + offset; As part of this, do we also need to set info->screen_buffer instead of info->screen_base? The drm_fbdev_dma_helper functions do that. Thierry > info->screen_size = size; > info->fix.smem_start = (unsigned long)(bo->iova + offset); > -- > 2.41.0 >
Hi, > -----Original Message----- > From: Thomas Zimmermann <tzimmermann@suse.de> > Sent: Thursday, July 6, 2023 9:47 PM > 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 v2 06/11] drm/exynos: Set fbdev FBINFO_VIRTFB flag > > Mark the framebuffer with FBINFO_VIRTFB. The framebuffer range is > in DMA-able memory and should be accessed with the CPU's regular > memory ops. > > v2: > * drop FBINFO_FLAG_DEFAULT > > Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> > Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> > Acked-by: Maxime Ripard <mripard@kernel.org> Acked-by : Inki Dae <inki.dae@samsung.com> Thanks, Inki Dae > 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/exynos_drm_fbdev.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c > b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c > index 7ca3424b59ce..828318de8529 100644 > --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c > +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c > @@ -79,6 +79,7 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper > *helper, > offset = fbi->var.xoffset * fb->format->cpp[0]; > offset += fbi->var.yoffset * fb->pitches[0]; > > + fbi->flags |= FBINFO_VIRTFB; > fbi->screen_buffer = exynos_gem->kvaddr + offset; > fbi->screen_size = size; > fbi->fix.smem_len = size; > -- > 2.41.0