Skip to content

Commit 11e8f5f

Browse files
author
Thomas Zimmermann
committed
drm: Add simpledrm driver
The simpledrm driver is a DRM driver for simple-framebuffer framebuffers as provided by the kernel's boot code. This driver enables basic graphical output on many different graphics devices that are provided by the platform (e.g., EFI, VESA, embedded framebuffers). With the kernel's simple-framebuffer infrastructure, the kernel receives a pre-configured framebuffer from the system (i.e., firmware, boot loader). It creates a platform device to which simpledrm attaches. The system's framebuffer consists of a memory range, size and format. Based on these values, simpledrm creates a DRM devices. No actual modesetting is possible. A firmware framebuffer might also be specified via device-tree files. If no device platform data is given, try the DT device node. Make sure required hardware clocks and regulators are enabled while the firmware framebuffer is in use. The basic code has been taken from the simplefb driver and adapted to DRM. Clocks are released automatically via devres helpers. The drivers displays a console on simpledrm's framebuffer. The default framebuffer format is being used. v4: * disable simplefb if simpledrm has been selected (Maxime) v3: * add disable function that clears screen to black (Daniel) * set shadow buffering only for fbdev emulation * set platform-driver data during device creation v2: * rename driver to simpledrm * add dri-devel to MAINTAINERS entry * put native format first in primary-plane format list (Daniel) * inline simplekms_device_cleanup() (Daniel) * use helpers for shadow-buffered planes * fix whitespace errors * add Device Tree match table * clean-up parser wrappers * use strscpy() Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> # fbdev support Acked-by: Maxime Ripard <maxime@cerno.tech> Tested-by: nerdopolis <bluescreen_avenger@verizon.net> Link: https://patchwork.freedesktop.org/patch/msgid/20210430105840.30515-5-tzimmermann@suse.de Link: https://patchwork.freedesktop.org/patch/msgid/20210430105840.30515-6-tzimmermann@suse.de Link: https://patchwork.freedesktop.org/patch/msgid/20210430105840.30515-7-tzimmermann@suse.de Link: https://patchwork.freedesktop.org/patch/msgid/20210430105840.30515-8-tzimmermann@suse.de Link: https://patchwork.freedesktop.org/patch/msgid/20210430105840.30515-9-tzimmermann@suse.de
1 parent 730e799 commit 11e8f5f

File tree

5 files changed

+898
-1
lines changed

5 files changed

+898
-1
lines changed

MAINTAINERS

+7
Original file line numberDiff line numberDiff line change
@@ -5765,6 +5765,13 @@ S: Orphan / Obsolete
57655765
F: drivers/gpu/drm/savage/
57665766
F: include/uapi/drm/savage_drm.h
57675767

5768+
DRM DRIVER FOR SIMPLE FRAMEBUFFERS
5769+
M: Thomas Zimmermann <tzimmermann@suse.de>
5770+
L: dri-devel@lists.freedesktop.org
5771+
S: Maintained
5772+
T: git git://anongit.freedesktop.org/drm/drm-misc
5773+
F: drivers/gpu/drm/tiny/simplekms.c
5774+
57685775
DRM DRIVER FOR SIS VIDEO CARDS
57695776
S: Orphan / Obsolete
57705777
F: drivers/gpu/drm/sis/

drivers/gpu/drm/tiny/Kconfig

+16
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,22 @@ config DRM_GM12U320
3838
This is a KMS driver for projectors which use the GM12U320 chipset
3939
for video transfer over USB2/3, such as the Acer C120 mini projector.
4040

41+
config DRM_SIMPLEDRM
42+
tristate "Simple framebuffer driver"
43+
depends on DRM
44+
select DRM_GEM_SHMEM_HELPER
45+
select DRM_KMS_HELPER
46+
help
47+
DRM driver for simple platform-provided framebuffers.
48+
49+
This driver assumes that the display hardware has been initialized
50+
by the firmware or bootloader before the kernel boots. Scanout
51+
buffer, size, and display format must be provided via device tree,
52+
UEFI, VESA, etc.
53+
54+
On x86 and compatible, you should also select CONFIG_X86_SYSFB to
55+
use UEFI and VESA framebuffers.
56+
4157
config TINYDRM_HX8357D
4258
tristate "DRM support for HX8357D display panels"
4359
depends on DRM && SPI

drivers/gpu/drm/tiny/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
obj-$(CONFIG_DRM_ARCPGU) += arcpgu.o
44
obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus.o
55
obj-$(CONFIG_DRM_GM12U320) += gm12u320.o
6+
obj-$(CONFIG_DRM_SIMPLEDRM) += simpledrm.o
67
obj-$(CONFIG_TINYDRM_HX8357D) += hx8357d.o
78
obj-$(CONFIG_TINYDRM_ILI9225) += ili9225.o
89
obj-$(CONFIG_TINYDRM_ILI9341) += ili9341.o

0 commit comments

Comments
 (0)