Debian Codegraph @

src/drivers/gfx/generic/chip.h

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #ifndef __DRIVERS_GFX_GENERIC_CHIP_H__
4 #define __DRIVERS_GFX_GENERIC_CHIP_H__
5
6 #include <acpi/acpi_device.h>
7 #include <acpi/acpi_pld.h>
8
9 /* ACPI spec 6.5 table B-2, Display Output Device */
10 #define DOD_FW_DETECT BIT(16) /* Platform boot firmware can detect the device. */
11 #define DOD_DID_STD BIT(31) /* DID Scheme: Use standard bit-field definitions */
12 enum display_type {
13 other = 0,
14 vga = 1, /* VGA, CRT, VESA monitor */
15 tv = 2, /* TV/HDTV or analog monitor */
16 ext = 3, /* External digital monitor (DVI, HDMI, DP) */
17 panel = 4, /* Internal/integrated digital flat panel */
18 };
19
20 /* Config for electronic privacy screen */
21 struct drivers_gfx_generic_privacy_screen_config {
22 /* Is privacy screen available on this graphics device */
23 int enabled;
24 /* ACPI namespace path to privacy screen detection function */
25 const char *detect_function;
26 /* ACPI namespace path to privacy screen status function */
27 const char *status_function;
28 /* ACPI namespace path to privacy screen enable function */
29 const char *enable_function;
30 /* ACPI namespace path to privacy screen disable function */
31 const char *disable_function;
32 /*
33 * GPIO used for controlling the privacy screen. If provided,
34 * the gpio mechanism takes preference over the functions ptrs
35 * above, if any (GPIO functions override the function ptrs).
36 */
37 struct acpi_gpio gpio;
38 };
39
40 /* Config for an output device as defined in section A.5 of the ACPI spec */
41 struct drivers_gfx_generic_device_config {
42 /* ACPI device name of the output device */
43 const char *name;
44 /* Value to use for _HID Name, will take precedence over _ADR */
45 const char *hid;
46 /* The display type of the output device. See definition above */
47 enum display_type type;
48 /* The address of the output device.
49 Will be dynamically generated if not set and display_type is set */
50 unsigned int addr;
51 /* Electronic privacy screen specific config */
52 struct drivers_gfx_generic_privacy_screen_config privacy;
53 /* Physical location of connection point */
54 bool use_pld;
55 struct acpi_pld pld;
56 };
57
58 /* Config for an ACPI video device defined in Appendix A of the ACPI spec */
59 struct drivers_gfx_generic_config {
60 /*
61 * ACPI device name of the graphics card, "GFX0" will be used if name is
62 * not set
63 */
64 const char *name;
65 /* The number of output devices defined */
66 int device_count;
67 /* Config for output devices */
68 /* 1 DDIA + 1 DDIB + max 4 TCP = up to 6 GFX devices */
69 struct drivers_gfx_generic_device_config device[6];
70 };
71
72 #endif /* __DRIVERS_GFX_GENERIC_CHIP_H__ */