Lines Matching refs:hotplug
154 struct intel_hotplug *hpd = &display->hotplug; in intel_hpd_irq_storm_detect()
162 (!long_hpd && !display->hotplug.hpd_short_storm_enabled)) in intel_hpd_irq_storm_detect()
190 return display->hotplug.detection_work_enabled; in detection_work_enabled()
244 display->hotplug.stats[pin].state != HPD_MARK_DISABLED) in intel_hpd_irq_storm_switch_to_polling()
252 display->hotplug.stats[pin].state = HPD_DISABLED; in intel_hpd_irq_storm_switch_to_polling()
263 &display->hotplug.reenable_work, in intel_hpd_irq_storm_switch_to_polling()
271 container_of(work, typeof(*display), hotplug.reenable_work.work); in intel_hpd_irq_storm_reenable_work()
285 display->hotplug.stats[pin].state != HPD_DISABLED) in intel_hpd_irq_storm_reenable_work()
297 if (display->hotplug.stats[pin].state == HPD_DISABLED) in intel_hpd_irq_storm_reenable_work()
298 display->hotplug.stats[pin].state = HPD_ENABLED; in intel_hpd_irq_storm_reenable_work()
373 return display->hotplug.stats[pin].blocked_count; in hpd_pin_is_blocked()
392 container_of(work, struct intel_display, hotplug.dig_port_work); in i915_digport_work_func()
393 struct intel_hotplug *hotplug = &display->hotplug; in i915_digport_work_func() local
402 long_hpd_pin_mask = hotplug->long_hpd_pin_mask & ~blocked_hpd_pin_mask; in i915_digport_work_func()
403 hotplug->long_hpd_pin_mask &= ~long_hpd_pin_mask; in i915_digport_work_func()
404 short_hpd_pin_mask = hotplug->short_hpd_pin_mask & ~blocked_hpd_pin_mask; in i915_digport_work_func()
405 hotplug->short_hpd_pin_mask &= ~short_hpd_pin_mask; in i915_digport_work_func()
435 display->hotplug.event_bits |= old_bits; in i915_digport_work_func()
437 &display->hotplug.hotplug_work, 0); in i915_digport_work_func()
452 struct intel_hotplug *hotplug = &display->hotplug; in intel_hpd_trigger_irq() local
457 hotplug->short_hpd_pin_mask |= BIT(encoder->hpd_pin); in intel_hpd_trigger_irq()
459 queue_work(hotplug->dp_wq, &hotplug->dig_port_work); in intel_hpd_trigger_irq()
470 container_of(work, struct intel_display, hotplug.hotplug_work.work); in i915_hotplug_work_func()
471 struct intel_hotplug *hotplug = &display->hotplug; in i915_hotplug_work_func() local
487 hpd_event_bits = hotplug->event_bits & ~blocked_hpd_pin_mask; in i915_hotplug_work_func()
488 hotplug->event_bits &= ~hpd_event_bits; in i915_hotplug_work_func()
489 hpd_retry_bits = hotplug->retry_bits & ~blocked_hpd_pin_mask; in i915_hotplug_work_func()
490 hotplug->retry_bits &= ~hpd_retry_bits; in i915_hotplug_work_func()
498 if (display->hotplug.ignore_long_hpd) { in i915_hotplug_work_func()
528 switch (encoder->hotplug(encoder, connector)) { in i915_hotplug_work_func()
560 display->hotplug.retry_bits |= retry; in i915_hotplug_work_func()
563 &display->hotplug.hotplug_work, in i915_hotplug_work_func()
629 display->hotplug.long_hpd_pin_mask |= BIT(pin); in intel_hpd_irq_handler()
632 display->hotplug.short_hpd_pin_mask |= BIT(pin); in intel_hpd_irq_handler()
643 if (display->hotplug.stats[pin].state == HPD_DISABLED) { in intel_hpd_irq_handler()
656 if (display->hotplug.stats[pin].state != HPD_ENABLED) in intel_hpd_irq_handler()
667 display->hotplug.event_bits |= BIT(pin); in intel_hpd_irq_handler()
675 display->hotplug.event_bits &= ~BIT(pin); in intel_hpd_irq_handler()
695 queue_work(display->hotplug.dp_wq, &display->hotplug.dig_port_work); in intel_hpd_irq_handler()
698 &display->hotplug.hotplug_work, 0); in intel_hpd_irq_handler()
725 display->hotplug.stats[i].count = 0; in intel_hpd_init()
726 display->hotplug.stats[i].state = HPD_ENABLED; in intel_hpd_init()
784 container_of(work, typeof(*display), hotplug.poll_init_work); in i915_hpd_poll_init_work()
792 enabled = READ_ONCE(display->hotplug.poll_enabled); in i915_hpd_poll_init_work()
803 READ_ONCE(display->hotplug.poll_enabled)); in i915_hpd_poll_init_work()
804 cancel_work(&display->hotplug.poll_init_work); in i915_hpd_poll_init_work()
817 if (display->hotplug.stats[pin].state == HPD_DISABLED) in i915_hpd_poll_init_work()
869 WRITE_ONCE(display->hotplug.poll_enabled, true); in intel_hpd_poll_enable()
879 &display->hotplug.poll_init_work); in intel_hpd_poll_enable()
912 WRITE_ONCE(display->hotplug.poll_enabled, false); in intel_hpd_poll_disable()
916 &display->hotplug.poll_init_work); in intel_hpd_poll_disable()
936 INIT_DELAYED_WORK(&display->hotplug.hotplug_work, in intel_hpd_init_early()
938 INIT_WORK(&display->hotplug.dig_port_work, i915_digport_work_func); in intel_hpd_init_early()
939 INIT_WORK(&display->hotplug.poll_init_work, i915_hpd_poll_init_work); in intel_hpd_init_early()
940 INIT_DELAYED_WORK(&display->hotplug.reenable_work, in intel_hpd_init_early()
943 display->hotplug.hpd_storm_threshold = HPD_STORM_DEFAULT_THRESHOLD; in intel_hpd_init_early()
950 display->hotplug.hpd_short_storm_enabled = !HAS_DP_MST(display); in intel_hpd_init_early()
957 if (cancel_delayed_work_sync(&display->hotplug.hotplug_work)) in cancel_all_detection_work()
959 if (cancel_work_sync(&display->hotplug.poll_init_work)) in cancel_all_detection_work()
961 if (cancel_delayed_work_sync(&display->hotplug.reenable_work)) in cancel_all_detection_work()
976 display->hotplug.long_hpd_pin_mask = 0; in intel_hpd_cancel_work()
977 display->hotplug.short_hpd_pin_mask = 0; in intel_hpd_cancel_work()
978 display->hotplug.event_bits = 0; in intel_hpd_cancel_work()
979 display->hotplug.retry_bits = 0; in intel_hpd_cancel_work()
983 cancel_work_sync(&display->hotplug.dig_port_work); in intel_hpd_cancel_work()
995 struct intel_hotplug *hotplug = &display->hotplug; in queue_work_for_missed_irqs() local
1003 if ((hotplug->event_bits | hotplug->retry_bits) & ~blocked_hpd_pin_mask) in queue_work_for_missed_irqs()
1007 switch (display->hotplug.stats[pin].state) { in queue_work_for_missed_irqs()
1015 MISSING_CASE(display->hotplug.stats[pin].state); in queue_work_for_missed_irqs()
1019 if ((hotplug->long_hpd_pin_mask | hotplug->short_hpd_pin_mask) & ~blocked_hpd_pin_mask) in queue_work_for_missed_irqs()
1020 queue_work(hotplug->dp_wq, &hotplug->dig_port_work); in queue_work_for_missed_irqs()
1023 queue_delayed_detection_work(display, &display->hotplug.hotplug_work, 0); in queue_work_for_missed_irqs()
1028 struct intel_hotplug *hotplug = &display->hotplug; in block_hpd_pin() local
1032 hotplug->stats[pin].blocked_count++; in block_hpd_pin()
1034 return hotplug->stats[pin].blocked_count == 1; in block_hpd_pin()
1039 struct intel_hotplug *hotplug = &display->hotplug; in unblock_hpd_pin() local
1043 if (drm_WARN_ON(display->drm, hotplug->stats[pin].blocked_count == 0)) in unblock_hpd_pin()
1046 hotplug->stats[pin].blocked_count--; in unblock_hpd_pin()
1048 return hotplug->stats[pin].blocked_count == 0; in unblock_hpd_pin()
1078 struct intel_hotplug *hotplug = &display->hotplug; in intel_hpd_block() local
1092 flush_work(&hotplug->dig_port_work); in intel_hpd_block()
1130 struct intel_hotplug *hotplug = &display->hotplug; in intel_hpd_clear_and_unblock() local
1139 hotplug->event_bits &= ~BIT(pin); in intel_hpd_clear_and_unblock()
1140 hotplug->retry_bits &= ~BIT(pin); in intel_hpd_clear_and_unblock()
1141 hotplug->short_hpd_pin_mask &= ~BIT(pin); in intel_hpd_clear_and_unblock()
1142 hotplug->long_hpd_pin_mask &= ~BIT(pin); in intel_hpd_clear_and_unblock()
1151 display->hotplug.detection_work_enabled = true; in intel_hpd_enable_detection_work()
1159 display->hotplug.detection_work_enabled = false; in intel_hpd_disable_detection_work()
1171 ret = queue_delayed_detection_work(display, &display->hotplug.hotplug_work, 0); in intel_hpd_schedule_detection()
1181 struct intel_hotplug *hotplug = &display->hotplug; in i915_hpd_storm_ctl_show() local
1187 flush_work(&display->hotplug.dig_port_work); in i915_hpd_storm_ctl_show()
1188 flush_delayed_work(&display->hotplug.hotplug_work); in i915_hpd_storm_ctl_show()
1190 seq_printf(m, "Threshold: %d\n", hotplug->hpd_storm_threshold); in i915_hpd_storm_ctl_show()
1192 str_yes_no(delayed_work_pending(&hotplug->reenable_work))); in i915_hpd_storm_ctl_show()
1203 struct intel_hotplug *hotplug = &display->hotplug; in i915_hpd_storm_ctl_write() local
1235 hotplug->hpd_storm_threshold = new_threshold; in i915_hpd_storm_ctl_write()
1238 hotplug->stats[i].count = 0; in i915_hpd_storm_ctl_write()
1242 flush_delayed_work(&display->hotplug.reenable_work); in i915_hpd_storm_ctl_write()
1266 str_yes_no(display->hotplug.hpd_short_storm_enabled)); in i915_hpd_short_storm_ctl_show()
1284 struct intel_hotplug *hotplug = &display->hotplug; in i915_hpd_short_storm_ctl_write() local
1313 hotplug->hpd_short_storm_enabled = new_state; in i915_hpd_short_storm_ctl_write()
1316 hotplug->stats[i].count = 0; in i915_hpd_short_storm_ctl_write()
1320 flush_delayed_work(&display->hotplug.reenable_work); in i915_hpd_short_storm_ctl_write()
1343 &display->hotplug.ignore_long_hpd); in intel_hpd_debugfs_register()