#include <linux/acpi.h>
#include <linux/dmi.h>
#include <acpi/video.h>
#include <drm/drm_edid.h>
#include "i915_drv.h"
#include "intel_acpi.h"
#include "intel_backlight.h"
#include "intel_display_types.h"
#include "intel_opregion.h"
#include "intel_pci_config.h"
#define OPREGION_HEADER_OFFSET …
#define OPREGION_ACPI_OFFSET …
#define ACPI_CLID …
#define ACPI_CDCK …
#define OPREGION_SWSCI_OFFSET …
#define OPREGION_ASLE_OFFSET …
#define OPREGION_VBT_OFFSET …
#define OPREGION_ASLE_EXT_OFFSET …
#define OPREGION_SIGNATURE …
#define MBOX_ACPI …
#define MBOX_SWSCI …
#define MBOX_ASLE …
#define MBOX_ASLE_EXT …
#define MBOX_BACKLIGHT …
#define PCON_HEADLESS_SKU …
struct opregion_header { … } __packed;
struct opregion_acpi { … } __packed;
struct opregion_swsci { … } __packed;
struct opregion_asle { … } __packed;
struct opregion_asle_ext { … } __packed;
#define ASLE_ARDY_READY …
#define ASLE_ARDY_NOT_READY …
#define ASLC_SET_ALS_ILLUM …
#define ASLC_SET_BACKLIGHT …
#define ASLC_SET_PFIT …
#define ASLC_SET_PWM_FREQ …
#define ASLC_SUPPORTED_ROTATION_ANGLES …
#define ASLC_BUTTON_ARRAY …
#define ASLC_CONVERTIBLE_INDICATOR …
#define ASLC_DOCKING_INDICATOR …
#define ASLC_ISCT_STATE_CHANGE …
#define ASLC_REQ_MSK …
#define ASLC_ALS_ILLUM_FAILED …
#define ASLC_BACKLIGHT_FAILED …
#define ASLC_PFIT_FAILED …
#define ASLC_PWM_FREQ_FAILED …
#define ASLC_ROTATION_ANGLES_FAILED …
#define ASLC_BUTTON_ARRAY_FAILED …
#define ASLC_CONVERTIBLE_FAILED …
#define ASLC_DOCKING_FAILED …
#define ASLC_ISCT_STATE_FAILED …
#define ASLE_TCHE_ALS_EN …
#define ASLE_TCHE_BLC_EN …
#define ASLE_TCHE_PFIT_EN …
#define ASLE_TCHE_PFMB_EN …
#define ASLE_BCLP_VALID …
#define ASLE_BCLP_MSK …
#define ASLE_PFIT_VALID …
#define ASLE_PFIT_CENTER …
#define ASLE_PFIT_STRETCH_TEXT …
#define ASLE_PFIT_STRETCH_GFX …
#define ASLE_PFMB_BRIGHTNESS_MASK …
#define ASLE_PFMB_BRIGHTNESS_VALID …
#define ASLE_PFMB_PWM_MASK …
#define ASLE_PFMB_PWM_VALID …
#define ASLE_CBLV_VALID …
#define ASLE_IUER_DOCKING …
#define ASLE_IUER_CONVERTIBLE …
#define ASLE_IUER_ROTATION_LOCK_BTN …
#define ASLE_IUER_VOLUME_DOWN_BTN …
#define ASLE_IUER_VOLUME_UP_BTN …
#define ASLE_IUER_WINDOWS_BTN …
#define ASLE_IUER_POWER_BTN …
#define ASLE_PHED_EDID_VALID_MASK …
#define SWSCI_SCIC_INDICATOR …
#define SWSCI_SCIC_MAIN_FUNCTION_SHIFT …
#define SWSCI_SCIC_MAIN_FUNCTION_MASK …
#define SWSCI_SCIC_SUB_FUNCTION_SHIFT …
#define SWSCI_SCIC_SUB_FUNCTION_MASK …
#define SWSCI_SCIC_EXIT_PARAMETER_SHIFT …
#define SWSCI_SCIC_EXIT_PARAMETER_MASK …
#define SWSCI_SCIC_EXIT_STATUS_SHIFT …
#define SWSCI_SCIC_EXIT_STATUS_MASK …
#define SWSCI_SCIC_EXIT_STATUS_SUCCESS …
#define SWSCI_FUNCTION_CODE(main, sub) …
#define SWSCI_GBDA …
#define SWSCI_GBDA_SUPPORTED_CALLS …
#define SWSCI_GBDA_REQUESTED_CALLBACKS …
#define SWSCI_GBDA_BOOT_DISPLAY_PREF …
#define SWSCI_GBDA_PANEL_DETAILS …
#define SWSCI_GBDA_TV_STANDARD …
#define SWSCI_GBDA_INTERNAL_GRAPHICS …
#define SWSCI_GBDA_SPREAD_SPECTRUM …
#define SWSCI_SBCB …
#define SWSCI_SBCB_SUPPORTED_CALLBACKS …
#define SWSCI_SBCB_INIT_COMPLETION …
#define SWSCI_SBCB_PRE_HIRES_SET_MODE …
#define SWSCI_SBCB_POST_HIRES_SET_MODE …
#define SWSCI_SBCB_DISPLAY_SWITCH …
#define SWSCI_SBCB_SET_TV_FORMAT …
#define SWSCI_SBCB_ADAPTER_POWER_STATE …
#define SWSCI_SBCB_DISPLAY_POWER_STATE …
#define SWSCI_SBCB_SET_BOOT_DISPLAY …
#define SWSCI_SBCB_SET_PANEL_DETAILS …
#define SWSCI_SBCB_SET_INTERNAL_GFX …
#define SWSCI_SBCB_POST_HIRES_TO_DOS_FS …
#define SWSCI_SBCB_SUSPEND_RESUME …
#define SWSCI_SBCB_SET_SPREAD_SPECTRUM …
#define SWSCI_SBCB_POST_VBE_PM …
#define SWSCI_SBCB_ENABLE_DISABLE_AUDIO …
#define MAX_DSLP …
#define OPREGION_SIZE …
struct intel_opregion { … };
static int check_swsci_function(struct intel_display *display, u32 function)
{ … }
static int swsci(struct intel_display *display,
u32 function, u32 parm, u32 *parm_out)
{ … }
#define DISPLAY_TYPE_CRT …
#define DISPLAY_TYPE_TV …
#define DISPLAY_TYPE_EXTERNAL_FLAT_PANEL …
#define DISPLAY_TYPE_INTERNAL_FLAT_PANEL …
int intel_opregion_notify_encoder(struct intel_encoder *encoder,
bool enable)
{ … }
static const struct { … } power_state_map[] = …;
int intel_opregion_notify_adapter(struct intel_display *display,
pci_power_t state)
{ … }
static u32 asle_set_backlight(struct intel_display *display, u32 bclp)
{ … }
static u32 asle_set_als_illum(struct intel_display *display, u32 alsi)
{ … }
static u32 asle_set_pwm_freq(struct intel_display *display, u32 pfmb)
{ … }
static u32 asle_set_pfit(struct intel_display *display, u32 pfit)
{ … }
static u32 asle_set_supported_rotation_angles(struct intel_display *display, u32 srot)
{ … }
static u32 asle_set_button_array(struct intel_display *display, u32 iuer)
{ … }
static u32 asle_set_convertible(struct intel_display *display, u32 iuer)
{ … }
static u32 asle_set_docking(struct intel_display *display, u32 iuer)
{ … }
static u32 asle_isct_state(struct intel_display *display)
{ … }
static void asle_work(struct work_struct *work)
{ … }
bool intel_opregion_asle_present(struct intel_display *display)
{ … }
void intel_opregion_asle_intr(struct intel_display *display)
{ … }
#define ACPI_EV_DISPLAY_SWITCH …
#define ACPI_EV_LID …
#define ACPI_EV_DOCK …
static int intel_opregion_video_event(struct notifier_block *nb,
unsigned long val, void *data)
{ … }
static void set_did(struct intel_opregion *opregion, int i, u32 val)
{ … }
static void intel_didl_outputs(struct intel_display *display)
{ … }
static void intel_setup_cadls(struct intel_display *display)
{ … }
static void swsci_setup(struct intel_display *display)
{ … }
static int intel_no_opregion_vbt_callback(const struct dmi_system_id *id)
{ … }
static const struct dmi_system_id intel_no_opregion_vbt[] = …;
int intel_opregion_setup(struct intel_display *display)
{ … }
static int intel_use_opregion_panel_type_callback(const struct dmi_system_id *id)
{ … }
static const struct dmi_system_id intel_use_opregion_panel_type[] = …;
int
intel_opregion_get_panel_type(struct intel_display *display)
{ … }
const struct drm_edid *intel_opregion_get_edid(struct intel_connector *connector)
{ … }
bool intel_opregion_vbt_present(struct intel_display *display)
{ … }
const void *intel_opregion_get_vbt(struct intel_display *display, size_t *size)
{ … }
bool intel_opregion_headless_sku(struct intel_display *display)
{ … }
void intel_opregion_register(struct intel_display *display)
{ … }
static void intel_opregion_resume_display(struct intel_display *display)
{ … }
void intel_opregion_resume(struct intel_display *display)
{ … }
static void intel_opregion_suspend_display(struct intel_display *display)
{ … }
void intel_opregion_suspend(struct intel_display *display, pci_power_t state)
{ … }
void intel_opregion_unregister(struct intel_display *display)
{ … }
void intel_opregion_cleanup(struct intel_display *display)
{ … }
static int intel_opregion_show(struct seq_file *m, void *unused)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
void intel_opregion_debugfs_register(struct intel_display *display)
{ … }