2 * Copyright © 2008-2017 Intel Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
25 #ifndef _INTEL_OPREGION_H_
26 #define _INTEL_OPREGION_H_
28 #include <linux/pci.h>
29 #include <linux/types.h>
31 struct intel_connector;
37 int intel_opregion_setup(struct intel_display *display);
38 void intel_opregion_cleanup(struct intel_display *display);
40 void intel_opregion_register(struct intel_display *display);
41 void intel_opregion_unregister(struct intel_display *display);
43 void intel_opregion_resume(struct intel_display *display);
44 void intel_opregion_suspend(struct intel_display *display,
47 bool intel_opregion_asle_present(struct intel_display *display);
48 void intel_opregion_asle_intr(struct intel_display *display);
49 int intel_opregion_notify_encoder(struct intel_encoder *encoder,
51 int intel_opregion_notify_adapter(struct intel_display *display,
53 int intel_opregion_get_panel_type(struct intel_display *display);
54 const struct drm_edid *intel_opregion_get_edid(struct intel_connector *connector);
56 bool intel_opregion_vbt_present(struct intel_display *display);
57 const void *intel_opregion_get_vbt(struct intel_display *display, size_t *size);
59 bool intel_opregion_headless_sku(struct intel_display *display);
61 void intel_opregion_debugfs_register(struct intel_display *display);
63 #else /* CONFIG_ACPI*/
65 static inline int intel_opregion_setup(struct intel_display *display)
70 static inline void intel_opregion_cleanup(struct intel_display *display)
74 static inline void intel_opregion_register(struct intel_display *display)
78 static inline void intel_opregion_unregister(struct intel_display *display)
82 static inline void intel_opregion_resume(struct intel_display *display)
86 static inline void intel_opregion_suspend(struct intel_display *display,
91 static inline bool intel_opregion_asle_present(struct intel_display *display)
96 static inline void intel_opregion_asle_intr(struct intel_display *display)
101 intel_opregion_notify_encoder(struct intel_encoder *encoder, bool enable)
107 intel_opregion_notify_adapter(struct intel_display *display, pci_power_t state)
112 static inline int intel_opregion_get_panel_type(struct intel_display *display)
117 static inline const struct drm_edid *
118 intel_opregion_get_edid(struct intel_connector *connector)
123 static inline bool intel_opregion_vbt_present(struct intel_display *display)
128 static inline const void *
129 intel_opregion_get_vbt(struct intel_display *display, size_t *size)
134 static inline bool intel_opregion_headless_sku(struct intel_display *display)
139 static inline void intel_opregion_debugfs_register(struct intel_display *display)
143 #endif /* CONFIG_ACPI */