Lines Matching full:i915
392 static u32 intel_hpd_hotplug_mask(struct drm_i915_private *i915, in intel_hpd_hotplug_mask() argument
404 static u32 intel_hpd_hotplug_enables(struct drm_i915_private *i915, in intel_hpd_hotplug_enables() argument
410 for_each_intel_encoder(&i915->drm, encoder) in intel_hpd_hotplug_enables()
515 void xelpdp_pica_irq_handler(struct drm_i915_private *i915, u32 iir) in xelpdp_pica_irq_handler() argument
517 struct intel_display *display = &i915->display; in xelpdp_pica_irq_handler()
523 if (DISPLAY_VER(i915) >= 20) in xelpdp_pica_irq_handler()
529 if (!(i915->display.hotplug.hpd[pin] & hotplug_trigger)) in xelpdp_pica_irq_handler()
534 val = intel_de_read(i915, XELPDP_PORT_HOTPLUG_CTL(pin)); in xelpdp_pica_irq_handler()
535 intel_de_write(i915, XELPDP_PORT_HOTPLUG_CTL(pin), val); in xelpdp_pica_irq_handler()
542 drm_dbg(&i915->drm, in xelpdp_pica_irq_handler()
546 intel_hpd_irq_handler(i915, pin_mask, long_mask); in xelpdp_pica_irq_handler()
553 drm_err(&i915->drm, in xelpdp_pica_irq_handler()
714 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in ibx_hotplug_enables() local
722 return HAS_PCH_LPT_LP(i915) ? in ibx_hotplug_enables()
752 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in ibx_hpd_enable_detection() local
754 intel_uncore_rmw(&i915->uncore, PCH_PORT_HOTPLUG, in ibx_hpd_enable_detection()
818 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icp_ddi_hpd_enable_detection() local
820 intel_uncore_rmw(&i915->uncore, SHOTPLUG_CTL_DDI, in icp_ddi_hpd_enable_detection()
834 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icp_tc_hpd_enable_detection() local
836 intel_uncore_rmw(&i915->uncore, SHOTPLUG_CTL_TC, in icp_tc_hpd_enable_detection()
886 static void dg1_hpd_invert(struct drm_i915_private *i915) in dg1_hpd_invert() argument
892 intel_uncore_rmw(&i915->uncore, SOUTH_CHICKEN1, 0, val); in dg1_hpd_invert()
897 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in dg1_hpd_enable_detection() local
899 dg1_hpd_invert(i915); in dg1_hpd_enable_detection()
918 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in gen11_tc_hpd_enable_detection() local
920 intel_uncore_rmw(&i915->uncore, GEN11_TC_HOTPLUG_CTL, in gen11_tc_hpd_enable_detection()
934 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in gen11_tbt_hpd_enable_detection() local
936 intel_uncore_rmw(&i915->uncore, GEN11_TBT_HOTPLUG_CTL, in gen11_tbt_hpd_enable_detection()
943 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in gen11_hpd_enable_detection() local
948 if (INTEL_PCH_TYPE(i915) >= PCH_ICP) in gen11_hpd_enable_detection()
1004 static void mtp_ddi_hpd_detection_setup(struct drm_i915_private *i915) in mtp_ddi_hpd_detection_setup() argument
1006 intel_de_rmw(i915, SHOTPLUG_CTL_DDI, in mtp_ddi_hpd_detection_setup()
1007 intel_hpd_hotplug_mask(i915, mtp_ddi_hotplug_mask), in mtp_ddi_hpd_detection_setup()
1008 intel_hpd_hotplug_enables(i915, mtp_ddi_hotplug_enables)); in mtp_ddi_hpd_detection_setup()
1013 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in mtp_ddi_hpd_enable_detection() local
1015 intel_de_rmw(i915, SHOTPLUG_CTL_DDI, in mtp_ddi_hpd_enable_detection()
1020 static void mtp_tc_hpd_detection_setup(struct drm_i915_private *i915) in mtp_tc_hpd_detection_setup() argument
1022 intel_de_rmw(i915, SHOTPLUG_CTL_TC, in mtp_tc_hpd_detection_setup()
1023 intel_hpd_hotplug_mask(i915, mtp_tc_hotplug_mask), in mtp_tc_hpd_detection_setup()
1024 intel_hpd_hotplug_enables(i915, mtp_tc_hotplug_enables)); in mtp_tc_hpd_detection_setup()
1029 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in mtp_tc_hpd_enable_detection() local
1031 intel_de_rmw(i915, SHOTPLUG_CTL_DDI, in mtp_tc_hpd_enable_detection()
1036 static void mtp_hpd_invert(struct drm_i915_private *i915) in mtp_hpd_invert() argument
1047 intel_de_rmw(i915, SOUTH_CHICKEN1, 0, val); in mtp_hpd_invert()
1052 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in mtp_hpd_enable_detection() local
1054 mtp_hpd_invert(i915); in mtp_hpd_enable_detection()
1059 static void mtp_hpd_irq_setup(struct drm_i915_private *i915) in mtp_hpd_irq_setup() argument
1063 enabled_irqs = intel_hpd_enabled_irqs(i915, i915->display.hotplug.pch_hpd); in mtp_hpd_irq_setup()
1064 hotplug_irqs = intel_hpd_hotplug_irqs(i915, i915->display.hotplug.pch_hpd); in mtp_hpd_irq_setup()
1070 intel_de_write(i915, SHPD_FILTER_CNT, SHPD_FILTER_CNT_250); in mtp_hpd_irq_setup()
1072 mtp_hpd_invert(i915); in mtp_hpd_irq_setup()
1073 ibx_display_interrupt_update(i915, hotplug_irqs, enabled_irqs); in mtp_hpd_irq_setup()
1075 mtp_ddi_hpd_detection_setup(i915); in mtp_hpd_irq_setup()
1076 mtp_tc_hpd_detection_setup(i915); in mtp_hpd_irq_setup()
1079 static void xe2lpd_sde_hpd_irq_setup(struct drm_i915_private *i915) in xe2lpd_sde_hpd_irq_setup() argument
1083 enabled_irqs = intel_hpd_enabled_irqs(i915, i915->display.hotplug.pch_hpd); in xe2lpd_sde_hpd_irq_setup()
1084 hotplug_irqs = intel_hpd_hotplug_irqs(i915, i915->display.hotplug.pch_hpd); in xe2lpd_sde_hpd_irq_setup()
1086 ibx_display_interrupt_update(i915, hotplug_irqs, enabled_irqs); in xe2lpd_sde_hpd_irq_setup()
1088 mtp_ddi_hpd_detection_setup(i915); in xe2lpd_sde_hpd_irq_setup()
1089 mtp_tc_hpd_detection_setup(i915); in xe2lpd_sde_hpd_irq_setup()
1097 static void _xelpdp_pica_hpd_detection_setup(struct drm_i915_private *i915, in _xelpdp_pica_hpd_detection_setup() argument
1106 intel_de_rmw(i915, XELPDP_PORT_HOTPLUG_CTL(hpd_pin), in _xelpdp_pica_hpd_detection_setup()
1112 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in xelpdp_pica_hpd_enable_detection() local
1114 _xelpdp_pica_hpd_detection_setup(i915, encoder->hpd_pin, true); in xelpdp_pica_hpd_enable_detection()
1117 static void xelpdp_pica_hpd_detection_setup(struct drm_i915_private *i915) in xelpdp_pica_hpd_detection_setup() argument
1125 for_each_intel_encoder(&i915->drm, encoder) in xelpdp_pica_hpd_detection_setup()
1129 _xelpdp_pica_hpd_detection_setup(i915, pin, available_pins & BIT(pin)); in xelpdp_pica_hpd_detection_setup()
1138 static void xelpdp_hpd_irq_setup(struct drm_i915_private *i915) in xelpdp_hpd_irq_setup() argument
1142 enabled_irqs = intel_hpd_enabled_irqs(i915, i915->display.hotplug.hpd); in xelpdp_hpd_irq_setup()
1143 hotplug_irqs = intel_hpd_hotplug_irqs(i915, i915->display.hotplug.hpd); in xelpdp_hpd_irq_setup()
1145 intel_de_rmw(i915, PICAINTERRUPT_IMR, hotplug_irqs, in xelpdp_hpd_irq_setup()
1147 intel_uncore_posting_read(&i915->uncore, PICAINTERRUPT_IMR); in xelpdp_hpd_irq_setup()
1149 xelpdp_pica_hpd_detection_setup(i915); in xelpdp_hpd_irq_setup()
1151 if (INTEL_PCH_TYPE(i915) >= PCH_LNL) in xelpdp_hpd_irq_setup()
1152 xe2lpd_sde_hpd_irq_setup(i915); in xelpdp_hpd_irq_setup()
1153 else if (INTEL_PCH_TYPE(i915) >= PCH_MTL) in xelpdp_hpd_irq_setup()
1154 mtp_hpd_irq_setup(i915); in xelpdp_hpd_irq_setup()
1213 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in spt_hpd_enable_detection() local
1216 if (HAS_PCH_CNP(i915)) { in spt_hpd_enable_detection()
1217 intel_uncore_rmw(&i915->uncore, SOUTH_CHICKEN1, in spt_hpd_enable_detection()
1222 intel_uncore_rmw(&i915->uncore, PCH_PORT_HOTPLUG, in spt_hpd_enable_detection()
1226 intel_uncore_rmw(&i915->uncore, PCH_PORT_HOTPLUG2, in spt_hpd_enable_detection()
1282 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in ilk_hpd_enable_detection() local
1284 intel_uncore_rmw(&i915->uncore, DIGITAL_PORT_HOTPLUG_CNTRL, in ilk_hpd_enable_detection()
1356 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in bxt_hpd_enable_detection() local
1358 intel_uncore_rmw(&i915->uncore, PCH_PORT_HOTPLUG, in bxt_hpd_enable_detection()
1375 static void g45_hpd_peg_band_gap_wa(struct drm_i915_private *i915) in g45_hpd_peg_band_gap_wa() argument
1382 intel_de_rmw(i915, PEG_BAND_GAP_DATA, 0xf, 0xd); in g45_hpd_peg_band_gap_wa()
1387 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in i915_hpd_enable_detection() local
1390 if (IS_G45(i915)) in i915_hpd_enable_detection()
1391 g45_hpd_peg_band_gap_wa(i915); in i915_hpd_enable_detection()
1394 i915_hotplug_interrupt_update(i915, hotplug_en, hotplug_en); in i915_hpd_enable_detection()
1429 void (*hpd_irq_setup)(struct drm_i915_private *i915);
1440 HPD_FUNCS(i915);
1452 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_hpd_enable_detection() local
1454 if (i915->display.funcs.hotplug) in intel_hpd_enable_detection()
1455 i915->display.funcs.hotplug->hpd_enable_detection(encoder); in intel_hpd_enable_detection()
1458 void intel_hpd_irq_setup(struct drm_i915_private *i915) in intel_hpd_irq_setup() argument
1460 if ((IS_VALLEYVIEW(i915) || IS_CHERRYVIEW(i915)) && in intel_hpd_irq_setup()
1461 !i915->display.irq.vlv_display_irqs_enabled) in intel_hpd_irq_setup()
1464 if (i915->display.funcs.hotplug) in intel_hpd_irq_setup()
1465 i915->display.funcs.hotplug->hpd_irq_setup(i915); in intel_hpd_irq_setup()
1468 void intel_hotplug_irq_init(struct drm_i915_private *i915) in intel_hotplug_irq_init() argument
1470 intel_hpd_init_pins(i915); in intel_hotplug_irq_init()
1472 intel_hpd_init_early(i915); in intel_hotplug_irq_init()
1474 if (HAS_GMCH(i915)) { in intel_hotplug_irq_init()
1475 if (I915_HAS_HOTPLUG(i915)) in intel_hotplug_irq_init()
1476 i915->display.funcs.hotplug = &i915_hpd_funcs; in intel_hotplug_irq_init()
1478 if (HAS_PCH_DG2(i915)) in intel_hotplug_irq_init()
1479 i915->display.funcs.hotplug = &icp_hpd_funcs; in intel_hotplug_irq_init()
1480 else if (HAS_PCH_DG1(i915)) in intel_hotplug_irq_init()
1481 i915->display.funcs.hotplug = &dg1_hpd_funcs; in intel_hotplug_irq_init()
1482 else if (DISPLAY_VER(i915) >= 14) in intel_hotplug_irq_init()
1483 i915->display.funcs.hotplug = &xelpdp_hpd_funcs; in intel_hotplug_irq_init()
1484 else if (DISPLAY_VER(i915) >= 11) in intel_hotplug_irq_init()
1485 i915->display.funcs.hotplug = &gen11_hpd_funcs; in intel_hotplug_irq_init()
1486 else if (IS_GEMINILAKE(i915) || IS_BROXTON(i915)) in intel_hotplug_irq_init()
1487 i915->display.funcs.hotplug = &bxt_hpd_funcs; in intel_hotplug_irq_init()
1488 else if (INTEL_PCH_TYPE(i915) >= PCH_ICP) in intel_hotplug_irq_init()
1489 i915->display.funcs.hotplug = &icp_hpd_funcs; in intel_hotplug_irq_init()
1490 else if (INTEL_PCH_TYPE(i915) >= PCH_SPT) in intel_hotplug_irq_init()
1491 i915->display.funcs.hotplug = &spt_hpd_funcs; in intel_hotplug_irq_init()
1493 i915->display.funcs.hotplug = &ilk_hpd_funcs; in intel_hotplug_irq_init()