xref: /linux/drivers/gpu/drm/clients/Kconfig (revision 2c1ed907520c50326b8f604907a8478b27881a2e)
1# SPDX-License-Identifier: GPL-2.0-only
2
3config DRM_CLIENT_LIB
4	tristate
5	depends on DRM
6	select DRM_KMS_HELPER if DRM_FBDEV_EMULATION
7	select FB_CORE if DRM_FBDEV_EMULATION
8	help
9	  This option enables the DRM client library and selects all
10	  modules and components according to the enabled clients.
11
12config DRM_CLIENT_SELECTION
13	tristate
14	depends on DRM
15	select DRM_CLIENT_LIB if DRM_CLIENT_LOG
16	select DRM_CLIENT_LIB if DRM_FBDEV_EMULATION
17	help
18	  Drivers that support in-kernel DRM clients have to select this
19	  option.
20
21config DRM_CLIENT_SETUP
22	bool
23	depends on DRM_CLIENT_SELECTION
24	help
25	  Enables the DRM client selection. DRM drivers that support the
26	  default clients should select DRM_CLIENT_SELECTION instead.
27
28menu "Supported DRM clients"
29	depends on DRM_CLIENT_SELECTION
30
31config DRM_FBDEV_EMULATION
32	bool "Enable legacy fbdev support for your modesetting driver"
33	depends on DRM_CLIENT_SELECTION
34	select DRM_CLIENT
35	select DRM_CLIENT_SETUP
36	select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE
37	default FB
38	help
39	  Choose this option if you have a need for the legacy fbdev
40	  support. Note that this support also provides the linux console
41	  support on top of your modesetting driver.
42
43	  If in doubt, say "Y".
44
45config DRM_FBDEV_OVERALLOC
46	int "Overallocation of the fbdev buffer"
47	depends on DRM_FBDEV_EMULATION
48	default 100
49	help
50	  Defines the fbdev buffer overallocation in percent. Default
51	  is 100. Typical values for double buffering will be 200,
52	  triple buffering 300.
53
54config DRM_FBDEV_LEAK_PHYS_SMEM
55	bool "Shamelessly allow leaking of fbdev physical address (DANGEROUS)"
56	depends on DRM_FBDEV_EMULATION && EXPERT
57	default n
58	help
59	  In order to keep user-space compatibility, we want in certain
60	  use-cases to keep leaking the fbdev physical address to the
61	  user-space program handling the fbdev buffer.
62	  This affects, not only, Amlogic, Allwinner or Rockchip devices
63	  with ARM Mali GPUs using a userspace Blob.
64	  This option is not supported by upstream developers and should be
65	  removed as soon as possible and be considered as a broken and
66	  legacy behaviour from a modern fbdev device driver.
67
68	  Please send any bug reports when using this to your proprietary
69	  software vendor that requires this.
70
71	  If in doubt, say "N" or spread the word to your closed source
72	  library vendor.
73
74config DRM_CLIENT_LOG
75	bool "Print the kernel boot message on the screen"
76	depends on DRM_CLIENT_SELECTION
77	select DRM_CLIENT
78	select DRM_CLIENT_SETUP
79	select DRM_DRAW
80	select FONT_SUPPORT
81	help
82	  This enable a drm logger, that will print the kernel messages to the
83	  screen until the userspace is ready to take over.
84
85	  If you only need logs, but no terminal, or if you prefer userspace
86	  terminal, say "Y".
87
88choice
89	prompt "Default DRM Client"
90	depends on DRM_CLIENT_SELECTION
91	depends on DRM_FBDEV_EMULATION || DRM_CLIENT_LOG
92	default DRM_CLIENT_DEFAULT_FBDEV
93	help
94	  Selects the default drm client.
95
96	  The selection made here can be overridden by using the kernel
97	  command line 'drm_client_lib.active=fbdev' option.
98
99config DRM_CLIENT_DEFAULT_FBDEV
100	bool "fbdev"
101	depends on DRM_FBDEV_EMULATION
102	help
103	  Use fbdev emulation as default drm client. This is needed to have
104	  fbcon on top of a drm driver.
105
106config DRM_CLIENT_DEFAULT_LOG
107	bool "log"
108	depends on DRM_CLIENT_LOG
109	help
110	  Use drm log as default drm client. This will display boot logs on the
111	  screen, but doesn't implement a full terminal. For that you will need
112	  a userspace terminal using drm/kms.
113
114endchoice
115
116config DRM_CLIENT_DEFAULT
117       string
118       depends on DRM_CLIENT
119       default "fbdev" if DRM_CLIENT_DEFAULT_FBDEV
120       default "log" if DRM_CLIENT_DEFAULT_LOG
121       default ""
122
123endmenu
124