1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2020 Vladimir Kondratyev <wulf@FreeBSD.org> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in 13 * the documentation and/or other materials provided with the 14 * distribution. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28 29 #ifndef _LINUXKPI_ACPI_VIDEO_H_ 30 #define _LINUXKPI_ACPI_VIDEO_H_ 31 32 #include <sys/types.h> 33 #include <sys/errno.h> 34 35 /* Alias struct acpi_device to device_t; repeated from <acpi/acpi_bus.h> */ 36 #define acpi_device _device 37 38 #define ACPI_VIDEO_CLASS "video" 39 40 #define ACPI_VIDEO_DISPLAY_CRT 1 41 #define ACPI_VIDEO_DISPLAY_TV 2 42 #define ACPI_VIDEO_DISPLAY_DVI 3 43 #define ACPI_VIDEO_DISPLAY_LCD 4 44 45 #define ACPI_VIDEO_DISPLAY_LEGACY_MONITOR 0x0100 46 #define ACPI_VIDEO_DISPLAY_LEGACY_PANEL 0x0110 47 #define ACPI_VIDEO_DISPLAY_LEGACY_TV 0x0200 48 49 #define ACPI_VIDEO_NOTIFY_SWITCH 0x80 50 #define ACPI_VIDEO_NOTIFY_PROBE 0x81 51 #define ACPI_VIDEO_NOTIFY_CYCLE 0x82 52 #define ACPI_VIDEO_NOTIFY_NEXT_OUTPUT 0x83 53 #define ACPI_VIDEO_NOTIFY_PREV_OUTPUT 0x84 54 #define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x85 55 #define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x86 56 #define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x87 57 #define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x88 58 #define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x89 59 60 static inline int 61 acpi_video_register(void) 62 { 63 64 return (-ENODEV); 65 } 66 67 static inline void 68 acpi_video_unregister(void) 69 { 70 } 71 72 static inline void 73 acpi_video_register_backlight(void) 74 { 75 } 76 77 static inline bool 78 acpi_video_backlight_use_native(void) 79 { 80 return (true); 81 } 82 83 static inline int 84 acpi_video_get_edid(struct acpi_device *device, int type, int device_id, 85 void **edid) 86 { 87 return (-ENODEV); 88 } 89 90 #endif /* _LINUXKPI_ACPI_VIDEO_H_ */ 91