drm: Implement DRM aperture helpers under video/
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 22 Jun 2022 14:01:33 +0000 (16:01 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 27 Jun 2022 09:07:55 +0000 (11:07 +0200)
commit7283f862bd991c8657e9bf1c02db772fcf018f13
treef1a68f7a0ba8af5d2d1429bf75cdb62acc85bb0b
parentefc8f3229f846ea6e6d96ffc336b3db8837eae56
drm: Implement DRM aperture helpers under video/

Implement DRM's aperture helpers under video/ for sharing with other
sub-systems. Remove DRM-isms from the interface. The helpers track
the ownership of framebuffer apertures and provide hand-over from
firmware, such as EFI and VESA, to native graphics drivers.

Other subsystems, such as fbdev and vfio, also have to maintain ownership
of framebuffer apertures. Moving DRM's aperture helpers to a more public
location allows all subsystems to interact with each other and share a
common implementation.

The aperture helpers are selected by the various firmware drivers within
DRM and fbdev, and the VGA text-console driver.

The original DRM interface is kept in place for use by DRM drivers.

v3:
* prefix all interfaces with aperture_ (Javier)
* rework and simplify documentation (Javier)
* rename struct dev_aperture to struct aperture_range
* rebase onto latest DRM
* update MAINTAINERS entry

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220622140134.12763-3-tzimmermann@suse.de
Documentation/driver-api/aperture.rst [new file with mode: 0644]
Documentation/driver-api/index.rst
MAINTAINERS
drivers/gpu/drm/drm_aperture.c
drivers/gpu/drm/tiny/Kconfig
drivers/video/Kconfig
drivers/video/Makefile
drivers/video/aperture.c [new file with mode: 0644]
drivers/video/console/Kconfig
drivers/video/fbdev/Kconfig
include/linux/aperture.h [new file with mode: 0644]