drm/fbdev-generic: Always use shadow buffering
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 20 Mar 2023 15:07:44 +0000 (16:07 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 22 Mar 2023 12:32:46 +0000 (13:32 +0100)
commita5b44c4adb1699661d22e5152fb26885f30a2e4c
tree23da53c42bc0a1311b25a1417f84076054e33a09
parentdb8496d0b50519540e1ee50f7e209b3a536ed671
drm/fbdev-generic: Always use shadow buffering

Remove all codepaths that implement fbdev output directly on GEM
buffers. Always allocate a shadow buffer in system memory and set
up deferred I/O for mmap.

The fbdev code that operated directly on GEM buffers was used by
drivers based on GEM DMA helpers. Those drivers have been migrated
to use fbdev-dma, a dedicated fbdev emulation for DMA memory. All
remaining users of fbdev-generic require shadow buffering.

Memory management of the remaining callers uses TTM, GEM SHMEM
helpers or a variant of GEM DMA helpers that is incompatible with
fbdev-dma. Therefore remove the unused codepaths from fbdev-generic
and simplify the code.

Using a shadow buffer with deferred I/O is probably the best case
for most remaining callers. Some of the TTM-based drivers might
benefit from a dedicated fbdev emulation that operates directly on
the driver's video memory.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Zack Rusin <zackr@vmware.com>
Tested-by: Sui Jingfeng <suijingfeng@loongson.cn>
Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-2-tzimmermann@suse.de
drivers/gpu/drm/drm_fbdev_generic.c