Lines Matching refs:display

256 	struct intel_display *display;  member
272 static int check_swsci_function(struct intel_display *display, u32 function) in check_swsci_function() argument
274 struct intel_opregion *opregion = display->opregion; in check_swsci_function()
304 static int swsci(struct intel_display *display, in swsci() argument
308 struct pci_dev *pdev = to_pci_dev(display->drm->dev); in swsci()
313 ret = check_swsci_function(display, function); in swsci()
317 swsci = display->opregion->swsci; in swsci()
335 drm_dbg(display->drm, "SWSCI request already in progress\n"); in swsci()
359 drm_dbg(display->drm, "SWSCI request timed out\n"); in swsci()
368 drm_dbg(display->drm, "SWSCI request error %u\n", scic); in swsci()
388 struct intel_display *display = to_intel_display(encoder); in intel_opregion_notify_encoder() local
395 if (!HAS_DDI(display)) in intel_opregion_notify_encoder()
399 ret = check_swsci_function(display, SWSCI_SBCB_DISPLAY_POWER_STATE); in intel_opregion_notify_encoder()
423 drm_dbg_kms(display->drm, in intel_opregion_notify_encoder()
448 drm_WARN_ONCE(display->drm, 1, in intel_opregion_notify_encoder()
456 return swsci(display, SWSCI_SBCB_DISPLAY_POWER_STATE, parm, NULL); in intel_opregion_notify_encoder()
470 int intel_opregion_notify_adapter(struct intel_display *display, in intel_opregion_notify_adapter() argument
475 if (!HAS_DDI(display)) in intel_opregion_notify_adapter()
480 return swsci(display, SWSCI_SBCB_ADAPTER_POWER_STATE, in intel_opregion_notify_adapter()
487 static u32 asle_set_backlight(struct intel_display *display, u32 bclp) in asle_set_backlight() argument
491 struct opregion_asle *asle = display->opregion->asle; in asle_set_backlight()
493 drm_dbg(display->drm, "bclp = 0x%08x\n", bclp); in asle_set_backlight()
496 drm_dbg_kms(display->drm, in asle_set_backlight()
508 drm_modeset_lock(&display->drm->mode_config.connection_mutex, NULL); in asle_set_backlight()
514 drm_dbg_kms(display->drm, "updating opregion backlight %d/255\n", in asle_set_backlight()
516 drm_connector_list_iter_begin(display->drm, &conn_iter); in asle_set_backlight()
522 drm_modeset_unlock(&display->drm->mode_config.connection_mutex); in asle_set_backlight()
528 static u32 asle_set_als_illum(struct intel_display *display, u32 alsi) in asle_set_als_illum() argument
532 drm_dbg(display->drm, "Illum is not supported\n"); in asle_set_als_illum()
536 static u32 asle_set_pwm_freq(struct intel_display *display, u32 pfmb) in asle_set_pwm_freq() argument
538 drm_dbg(display->drm, "PWM freq is not supported\n"); in asle_set_pwm_freq()
542 static u32 asle_set_pfit(struct intel_display *display, u32 pfit) in asle_set_pfit() argument
546 drm_dbg(display->drm, "Pfit is not supported\n"); in asle_set_pfit()
550 static u32 asle_set_supported_rotation_angles(struct intel_display *display, u32 srot) in asle_set_supported_rotation_angles() argument
552 drm_dbg(display->drm, "SROT is not supported\n"); in asle_set_supported_rotation_angles()
556 static u32 asle_set_button_array(struct intel_display *display, u32 iuer) in asle_set_button_array() argument
559 drm_dbg(display->drm, in asle_set_button_array()
562 drm_dbg(display->drm, in asle_set_button_array()
565 drm_dbg(display->drm, in asle_set_button_array()
568 drm_dbg(display->drm, in asle_set_button_array()
571 drm_dbg(display->drm, in asle_set_button_array()
574 drm_dbg(display->drm, in asle_set_button_array()
580 static u32 asle_set_convertible(struct intel_display *display, u32 iuer) in asle_set_convertible() argument
583 drm_dbg(display->drm, in asle_set_convertible()
586 drm_dbg(display->drm, in asle_set_convertible()
592 static u32 asle_set_docking(struct intel_display *display, u32 iuer) in asle_set_docking() argument
595 drm_dbg(display->drm, "Docking is not supported (docked)\n"); in asle_set_docking()
597 drm_dbg(display->drm, in asle_set_docking()
603 static u32 asle_isct_state(struct intel_display *display) in asle_isct_state() argument
605 drm_dbg(display->drm, "ISCT is not supported\n"); in asle_isct_state()
613 struct intel_display *display = opregion->display; in asle_work() local
624 drm_dbg(display->drm, in asle_work()
630 aslc_stat |= asle_set_als_illum(display, asle->alsi); in asle_work()
633 aslc_stat |= asle_set_backlight(display, asle->bclp); in asle_work()
636 aslc_stat |= asle_set_pfit(display, asle->pfit); in asle_work()
639 aslc_stat |= asle_set_pwm_freq(display, asle->pfmb); in asle_work()
642 aslc_stat |= asle_set_supported_rotation_angles(display, in asle_work()
646 aslc_stat |= asle_set_button_array(display, asle->iuer); in asle_work()
649 aslc_stat |= asle_set_convertible(display, asle->iuer); in asle_work()
652 aslc_stat |= asle_set_docking(display, asle->iuer); in asle_work()
655 aslc_stat |= asle_isct_state(display); in asle_work()
660 bool intel_opregion_asle_present(struct intel_display *display) in intel_opregion_asle_present() argument
662 return display->opregion && display->opregion->asle; in intel_opregion_asle_present()
665 void intel_opregion_asle_intr(struct intel_display *display) in intel_opregion_asle_intr() argument
667 struct drm_i915_private *i915 = to_i915(display->drm); in intel_opregion_asle_intr()
668 struct intel_opregion *opregion = display->opregion; in intel_opregion_asle_intr()
725 static void intel_didl_outputs(struct intel_display *display) in intel_didl_outputs() argument
727 struct intel_opregion *opregion = display->opregion; in intel_didl_outputs()
742 intel_acpi_device_id_update(display); in intel_didl_outputs()
744 drm_connector_list_iter_begin(display->drm, &conn_iter); in intel_didl_outputs()
752 drm_dbg_kms(display->drm, "%d outputs detected\n", i); in intel_didl_outputs()
755 drm_err(display->drm, in intel_didl_outputs()
764 static void intel_setup_cadls(struct intel_display *display) in intel_setup_cadls() argument
766 struct intel_opregion *opregion = display->opregion; in intel_setup_cadls()
781 drm_connector_list_iter_begin(display->drm, &conn_iter); in intel_setup_cadls()
794 static void swsci_setup(struct intel_display *display) in swsci_setup() argument
796 struct intel_opregion *opregion = display->opregion; in swsci_setup()
805 if (swsci(display, SWSCI_GBDA_SUPPORTED_CALLS, 0, &tmp) == 0) { in swsci_setup()
816 if (swsci(display, SWSCI_GBDA_REQUESTED_CALLBACKS, 0, &tmp) == 0) { in swsci_setup()
827 if (swsci(display, SWSCI_SBCB_SUPPORTED_CALLBACKS, 0, &tmp) == 0) { in swsci_setup()
837 drm_dbg(display->drm, in swsci_setup()
847 drm_dbg(display->drm, in swsci_setup()
872 int intel_opregion_setup(struct intel_display *display) in intel_opregion_setup() argument
875 struct pci_dev *pdev = to_pci_dev(display->drm->dev); in intel_opregion_setup()
890 drm_dbg(display->drm, "graphic opregion physical addr: 0x%x\n", in intel_opregion_setup()
893 drm_dbg(display->drm, "ACPI OpRegion not supported!\n"); in intel_opregion_setup()
901 opregion->display = display; in intel_opregion_setup()
902 display->opregion = opregion; in intel_opregion_setup()
915 drm_dbg(display->drm, "opregion signature mismatch\n"); in intel_opregion_setup()
921 drm_dbg(display->drm, "ACPI OpRegion version %u.%u.%u\n", in intel_opregion_setup()
928 drm_dbg(display->drm, "Public ACPI methods supported\n"); in intel_opregion_setup()
943 drm_err(display->drm, "SWSCI Mailbox #2 present for opregion v3.x, ignoring\n"); in intel_opregion_setup()
946 drm_dbg(display->drm, "SWSCI Mailbox #2 present for opregion v2.x\n"); in intel_opregion_setup()
947 drm_dbg(display->drm, "SWSCI supported\n"); in intel_opregion_setup()
949 swsci_setup(display); in intel_opregion_setup()
954 drm_dbg(display->drm, "ASLE supported\n"); in intel_opregion_setup()
961 drm_dbg(display->drm, "ASLE extension supported\n"); in intel_opregion_setup()
966 drm_dbg(display->drm, "Mailbox #2 for backlight present\n"); in intel_opregion_setup()
984 drm_WARN_ON(display->drm, rvda < OPREGION_SIZE); in intel_opregion_setup()
994 if (intel_bios_is_valid_vbt(display, vbt, vbt_size)) { in intel_opregion_setup()
995 drm_dbg_kms(display->drm, in intel_opregion_setup()
1001 drm_dbg_kms(display->drm, in intel_opregion_setup()
1019 if (intel_bios_is_valid_vbt(display, vbt, vbt_size)) { in intel_opregion_setup()
1020 drm_dbg_kms(display->drm, in intel_opregion_setup()
1025 drm_dbg_kms(display->drm, in intel_opregion_setup()
1036 display->opregion = NULL; in intel_opregion_setup()
1059 intel_opregion_get_panel_type(struct intel_display *display) in intel_opregion_get_panel_type() argument
1064 ret = swsci(display, SWSCI_GBDA_PANEL_DETAILS, 0x0, &panel_details); in intel_opregion_get_panel_type()
1070 drm_dbg_kms(display->drm, in intel_opregion_get_panel_type()
1077 drm_dbg_kms(display->drm, "No panel type in OpRegion\n"); in intel_opregion_get_panel_type()
1087 drm_dbg_kms(display->drm, in intel_opregion_get_panel_type()
1108 struct intel_display *display = to_intel_display(connector); in intel_opregion_get_edid() local
1109 struct intel_opregion *opregion = display->opregion; in intel_opregion_get_edid()
1127 drm_dbg_kms(display->drm, "Invalid EDID in ACPI OpRegion (Mailbox #5)\n"); in intel_opregion_get_edid()
1135 bool intel_opregion_vbt_present(struct intel_display *display) in intel_opregion_vbt_present() argument
1137 struct intel_opregion *opregion = display->opregion; in intel_opregion_vbt_present()
1145 const void *intel_opregion_get_vbt(struct intel_display *display, size_t *size) in intel_opregion_get_vbt() argument
1147 struct intel_opregion *opregion = display->opregion; in intel_opregion_get_vbt()
1158 bool intel_opregion_headless_sku(struct intel_display *display) in intel_opregion_headless_sku() argument
1160 struct intel_opregion *opregion = display->opregion; in intel_opregion_headless_sku()
1175 void intel_opregion_register(struct intel_display *display) in intel_opregion_register() argument
1177 struct intel_opregion *opregion = display->opregion; in intel_opregion_register()
1188 intel_opregion_resume(display); in intel_opregion_register()
1191 static void intel_opregion_resume_display(struct intel_display *display) in intel_opregion_resume_display() argument
1193 struct intel_opregion *opregion = display->opregion; in intel_opregion_resume_display()
1196 intel_didl_outputs(display); in intel_opregion_resume_display()
1197 intel_setup_cadls(display); in intel_opregion_resume_display()
1214 intel_dsm_get_bios_data_funcs_supported(display); in intel_opregion_resume_display()
1217 void intel_opregion_resume(struct intel_display *display) in intel_opregion_resume() argument
1219 struct intel_opregion *opregion = display->opregion; in intel_opregion_resume()
1224 if (HAS_DISPLAY(display)) in intel_opregion_resume()
1225 intel_opregion_resume_display(display); in intel_opregion_resume()
1227 intel_opregion_notify_adapter(display, PCI_D0); in intel_opregion_resume()
1230 static void intel_opregion_suspend_display(struct intel_display *display) in intel_opregion_suspend_display() argument
1232 struct intel_opregion *opregion = display->opregion; in intel_opregion_suspend_display()
1243 void intel_opregion_suspend(struct intel_display *display, pci_power_t state) in intel_opregion_suspend() argument
1245 struct intel_opregion *opregion = display->opregion; in intel_opregion_suspend()
1250 intel_opregion_notify_adapter(display, state); in intel_opregion_suspend()
1252 if (HAS_DISPLAY(display)) in intel_opregion_suspend()
1253 intel_opregion_suspend_display(display); in intel_opregion_suspend()
1256 void intel_opregion_unregister(struct intel_display *display) in intel_opregion_unregister() argument
1258 struct intel_opregion *opregion = display->opregion; in intel_opregion_unregister()
1260 intel_opregion_suspend(display, PCI_D1); in intel_opregion_unregister()
1271 void intel_opregion_cleanup(struct intel_display *display) in intel_opregion_cleanup() argument
1273 struct intel_opregion *opregion = display->opregion; in intel_opregion_cleanup()
1282 display->opregion = NULL; in intel_opregion_cleanup()
1287 struct intel_display *display = m->private; in intel_opregion_show() local
1288 struct intel_opregion *opregion = display->opregion; in intel_opregion_show()
1298 void intel_opregion_debugfs_register(struct intel_display *display) in intel_opregion_debugfs_register() argument
1300 struct drm_minor *minor = display->drm->primary; in intel_opregion_debugfs_register()
1303 display, &intel_opregion_fops); in intel_opregion_debugfs_register()