drm/omapdrm: Use GEM mmap for fbdev emulation
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 7 Jul 2023 08:32:00 +0000 (10:32 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 24 Jul 2023 18:14:43 +0000 (20:14 +0200)
commitda6eb399d46bf537b8e7d585a971449c44873366
treebfa10f97bd6b50d676a70a63470f10399976e8d1
parent413b75745f9f712ff7e015c6c82ed3d394a385df
drm/omapdrm: Use GEM mmap for fbdev emulation

The fbdev emulation currently uses fbdev's default mmap code, which
has been written for I/O memory. Provide an mmap that uses GEM's mmap
infrastructure.

Utilize fine-grained fbdev macros to initialize struct fb_ops. The
macros set the read/write and the draw callbacks for DMA memory. Set
the fb_mmap callback to omapdrm's new mmap helper. Also select the
correct Kconfig token for fbdev's DMA helpers. Note that the DMA
helpers are the same as for system memory.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230707083422.18691-10-tzimmermann@suse.de
drivers/gpu/drm/omapdrm/Kconfig
drivers/gpu/drm/omapdrm/omap_fbdev.c