aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/video.h
blob: db8548ff03cef48fc2af9f7fab2443e9b1c0d6d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ACPI_VIDEO_H
#define __ACPI_VIDEO_H

#include <linux/errno.h> /* for ENODEV */
#include <linux/types.h> /* for bool */

struct acpi_video_brightness_flags {
	u8 _BCL_no_ac_battery_levels:1;	/* no AC/Battery levels in _BCL */
	u8 _BCL_reversed:1;		/* _BCL package is in a reversed order */
	u8 _BQC_use_index:1;		/* _BQC returns an index value */
};

struct acpi_video_device_brightness {
	int curr;
	int count;
	int *levels;
	struct acpi_video_brightness_flags flags;
};

struct acpi_device;

#define ACPI_VIDEO_CLASS	"video"

#define ACPI_VIDEO_DISPLAY_CRT  1
#define ACPI_VIDEO_DISPLAY_TV   2
#define ACPI_VIDEO_DISPLAY_DVI  3
#define ACPI_VIDEO_DISPLAY_LCD  4

#define ACPI_VIDEO_DISPLAY_LEGACY_MONITOR 0x0100
#define ACPI_VIDEO_DISPLAY_LEGACY_PANEL   0x0110
#define ACPI_VIDEO_DISPLAY_LEGACY_TV      0x0200

#define ACPI_VIDEO_NOTIFY_SWITCH		0x80
#define ACPI_VIDEO_NOTIFY_PROBE			0x81
#define ACPI_VIDEO_NOTIFY_CYCLE			0x82
#define ACPI_VIDEO_NOTIFY_NEXT_OUTPUT		0x83
#define ACPI_VIDEO_NOTIFY_PREV_OUTPUT		0x84
#define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS	0x85
#define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS	0x86
#define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS	0x87
#define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS	0x88
#define ACPI_VIDEO_NOTIFY_DISPLAY_OFF		0x89

enum acpi_backlight_type {
	acpi_backlight_undef = -1,
	acpi_backlight_none = 0,
	acpi_backlight_video,
	acpi_backlight_vendor,
	acpi_backlight_native,
};

#if IS_ENABLED(CONFIG_ACPI_VIDEO)
extern int acpi_video_register(void);
extern void acpi_video_unregister(void);
extern int acpi_video_get_edid(struct acpi_device *device, int type,
			       int device_id, void **edid);
extern enum acpi_backlight_type acpi_video_get_backlight_type(void);
extern void acpi_video_set_dmi_backlight_type(enum acpi_backlight_type type);
/*
 * Note: The value returned by acpi_video_handles_brightness_key_presses()
 * may change over time and should not be cached.
 */
extern bool acpi_video_handles_brightness_key_presses(void);
extern int acpi_video_get_levels(struct acpi_device *device,
				 struct acpi_video_device_brightness **dev_br,
				 int *pmax_level);
#else
static inline int acpi_video_register(void) { return -ENODEV; }
static inline void acpi_video_unregister(void) { return; }
static inline int acpi_video_get_edid(struct acpi_device *device, int type,
				      int device_id, void **edid)
{
	return -ENODEV;
}
static inline enum acpi_backlight_type acpi_video_get_backlight_type(void)
{
	return acpi_backlight_vendor;
}
static inline void acpi_video_set_dmi_backlight_type(enum acpi_backlight_type type)
{
}
static inline bool acpi_video_handles_brightness_key_presses(void)
{
	return false;
}
static inline int acpi_video_get_levels(struct acpi_device *device,
			struct acpi_video_device_brightness **dev_br,
			int *pmax_level)
{
	return -ENODEV;
}
#endif

#endif
insertions'>+33 2007-10-27mmc: use common byte swap macrosPierre Ossman1-2/+2 2007-10-27mmc: fix cid and csd byte orderPierre Ossman1-2/+20 2007-10-27at91_mci: Fix bad referencePierre Ossman1-2/+2 2007-10-27[SPARC32]: Fix build-warning in io-unit.cDavid S. Miller1-1/+1 2007-10-27[CRYPTO] users: Fix up scatterlist conversion errorsHerbert Xu13-58/+93 2007-10-27[CRYPTO] tcrypt: Move sg_init_table out of timing loopsHerbert Xu1-6/+14 2007-10-27[SPARC64]: Fix BACKOFF_SPIN on non-SMP.David S. Miller1-1/+3 2007-10-27[SPARC32]: __inline__ --> inlineDavid S. Miller11-48/+40 2007-10-27[SPARC64]: __inline__ --> inlineDavid S. Miller22-155/+125 2007-10-26[NETNS]: Fix get_net_ns_by_pidEric W. Biederman1-1/+1 2007-10-26[NET]: Marking struct pernet_operations __net_initdata was inappropriateEric W. Biederman6-9/+7 2007-10-26[INET] ESP: Must #include <linux/scatterlist.h>Adrian Bunk2-2/+2 2007-10-26[TCP] IPV6: fix softnet build breakageJeff Garzik1-0/+1 2007-10-26ide: add SH-S202J to ivb_list[]Bartlomiej Zolnierkiewicz1-0/+3 2007-10-26drivers/ide/pci/sc1200.c: fix suspend/resume buglets and warningsJeff Garzik1-4/+5 2007-10-26drivers/ide/pci/generic: fix build for CONFIG_HOTPLUG=nBartlomiej Zolnierkiewicz1-1/+1 2007-10-26hpt366: fix build for CONFIG_HOTPLUG=nBartlomiej Zolnierkiewicz1-16/+16 2007-10-26cy82c693: fix build for CONFIG_HOTPLUG=nBartlomiej Zolnierkiewicz1-3/+3 2007-10-26De-constify sched.hAlexey Dobriyan1-14/+14 2007-10-26[NetLabel]: correct usage of RCU lockingPaul Moore4-62/+22 2007-10-26[TCP]: fix D-SACK cwnd handlingRyousei Takano1-7/+5 2007-10-26[NET] napi: use non-interruptible sleep in napi_disableBenjamin Herrenschmidt1-1/+1 2007-10-26[SCTP] net/sctp/auth.c: make 3 functions staticAdrian Bunk2-4/+3 2007-10-26[TCP]: Add missing I/O AT code to ipv6 side.David S. Miller1-0/+2 2007-10-26[SCTP]: #if 0 sctp_update_copy_cksum()Adrian Bunk2-1/+2 2007-10-26[INET]: Unexport icmpmsg_statisticsAdrian Bunk1-1/+0 2007-10-26[NET]: Unexport sock_enable_timestamp().Adrian Bunk1-1/+0 2007-10-26[TCP]: Make tcp_match_skb_to_sack() static.Adrian Bunk1-2/+2 2007-10-26[IRDA]: Make ircomm_tty static.Adrian Bunk2-2/+1 2007-10-26[NET] fs/proc/proc_net.c: make a struct staticAdrian Bunk1-1/+1 2007-10-26[NET] dev_change_name: ignore changes to same nameStephen Hemminger1-0/+3