drm/tegra: Set fbdev FBINFO_VIRTFB flag
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 7 Jul 2023 08:31:55 +0000 (10:31 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 24 Jul 2023 18:14:43 +0000 (20:14 +0200)
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>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230707083422.18691-5-tzimmermann@suse.de
drivers/gpu/drm/tegra/fbdev.c

index 030e560df1181b28fd63cba1983d0b203ee75d68..7204784cd52b4403586d3cb258b2477ff23bf1f0 100644 (file)
@@ -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;
        info->screen_size = size;
        info->fix.smem_start = (unsigned long)(bo->iova + offset);