aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_runtime_pm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-07-18 15:46:24 -0400
committerDave Airlie <airlied@redhat.com>2018-07-18 15:46:30 -0400
commit539c475dadc430bd0f1601902fcacc1e55ffe85a (patch)
tree6dc3e9ca56165cb46baa84febcb885ed52452cf2 /drivers/gpu/drm/i915/intel_runtime_pm.c
parent0c2fd59ae315e28f8868edf80df21a502f933fec (diff)
parent82edc7e8b8c06151bdc653935bc13b83e2f0fcfa (diff)
Merge tag 'drm-intel-next-2018-07-09' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
Higlights here goes to many PSR fixes and improvements; to the Ice lake work with power well support and begin of DSI support addition. Also there were many improvements on execlists and interrupts for minimal latency on command submission; and many fixes on selftests, mostly caught by our CI. General driver: - Clean-up on aux irq (Lucas) - Mark expected switch fall-through for dealing with static analysis tools (Gustavo) Gem: - Different fixes for GuC (Chris, Anusha, Michal) - Avoid self-relocation BIAS if no relocation (Chris) - Improve debugging cases in on EINVAL return and vma allocation (Chris) - Fixes and improvements on context destroying and freeing (Chris) - Wait for engines to idle before retiring (Chris) - Many improvements on execlists and interrupts for minimal latency on command submission (Chris) - Many fixes in selftests, specially on cases highlighted on CI (Chris) - Other fixes and improvements around GGTT (Chris) - Prevent background reaping of active objects (Chris) Display: - Parallel modeset cleanup to fix driver reset (Chris) - Get AUX power domain for DP main link (Imre) - Clean-up on PSR unused func pointers (Rodrigo) - Many PSR/PSR2 fixes and improvements (DK, Jose, Tarun) - Add a PSR1 live status (Vathsala) - Replace old drm_*_{un/reference} with put,get functions (Thomas) - FBC fixes (Maarten) - Abstract and document the usage of picking macros (Jani) - Remove unnecessary check for unsupported modifiers for NV12. (DK) - Interrupt fixes for display (Ville) - Clean up on sdvo code (Ville) - Clean up on current DSI code (Jani) - Remove support for legacy debugfs crc interface (Maarten) - Simplify get_encoder_power_domains (Imre) Icelake: - MG PLL fixes (Imre) - Add hw workaround for alpha blending (Vandita) - Add power well support (Imre) - Add Interrupt Support (Anusha) - Start to add support for DSI on Ice Lake (Madhav) Signed-off-by: Dave Airlie <airlied@redhat.com> # gpg: Signature made Tue 10 Jul 2018 08:41:37 AM AEST # gpg: using RSA key FA625F640EEB13CA # gpg: Good signature from "Rodrigo Vivi <rodrigo.vivi@intel.com>" # gpg: aka "Rodrigo Vivi <rodrigo.vivi@gmail.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 6D20 7068 EEDD 6509 1C2C E2A3 FA62 5F64 0EEB 13CA Link: https://patchwork.freedesktop.org/patch/msgid/20180710234349.GA16562@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_runtime_pm.c')
-rw-r--r--drivers/gpu/drm/i915/intel_runtime_pm.c331
1 files changed, 324 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index de3a81034f77..6b5aa3b074ec 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -134,6 +134,14 @@ intel_display_power_domain_str(enum intel_display_power_domain domain)
134 return "AUX_F"; 134 return "AUX_F";
135 case POWER_DOMAIN_AUX_IO_A: 135 case POWER_DOMAIN_AUX_IO_A:
136 return "AUX_IO_A"; 136 return "AUX_IO_A";
137 case POWER_DOMAIN_AUX_TBT1:
138 return "AUX_TBT1";
139 case POWER_DOMAIN_AUX_TBT2:
140 return "AUX_TBT2";
141 case POWER_DOMAIN_AUX_TBT3:
142 return "AUX_TBT3";
143 case POWER_DOMAIN_AUX_TBT4:
144 return "AUX_TBT4";
137 case POWER_DOMAIN_GMBUS: 145 case POWER_DOMAIN_GMBUS:
138 return "GMBUS"; 146 return "GMBUS";
139 case POWER_DOMAIN_INIT: 147 case POWER_DOMAIN_INIT:
@@ -384,7 +392,8 @@ static void hsw_power_well_enable(struct drm_i915_private *dev_priv,
384 u32 val; 392 u32 val;
385 393
386 if (wait_fuses) { 394 if (wait_fuses) {
387 pg = SKL_PW_TO_PG(id); 395 pg = INTEL_GEN(dev_priv) >= 11 ? ICL_PW_TO_PG(id) :
396 SKL_PW_TO_PG(id);
388 /* 397 /*
389 * For PW1 we have to wait both for the PW0/PG0 fuse state 398 * For PW1 we have to wait both for the PW0/PG0 fuse state
390 * before enabling the power well and PW1/PG1's own fuse 399 * before enabling the power well and PW1/PG1's own fuse
@@ -430,6 +439,43 @@ static void hsw_power_well_disable(struct drm_i915_private *dev_priv,
430 hsw_wait_for_power_well_disable(dev_priv, power_well); 439 hsw_wait_for_power_well_disable(dev_priv, power_well);
431} 440}
432 441
442#define ICL_AUX_PW_TO_PORT(pw) ((pw) - ICL_DISP_PW_AUX_A)
443
444static void
445icl_combo_phy_aux_power_well_enable(struct drm_i915_private *dev_priv,
446 struct i915_power_well *power_well)
447{
448 enum i915_power_well_id id = power_well->id;
449 enum port port = ICL_AUX_PW_TO_PORT(id);
450 u32 val;
451
452 val = I915_READ(HSW_PWR_WELL_CTL_DRIVER(id));
453 I915_WRITE(HSW_PWR_WELL_CTL_DRIVER(id), val | HSW_PWR_WELL_CTL_REQ(id));
454
455 val = I915_READ(ICL_PORT_CL_DW12(port));
456 I915_WRITE(ICL_PORT_CL_DW12(port), val | ICL_LANE_ENABLE_AUX);
457
458 hsw_wait_for_power_well_enable(dev_priv, power_well);
459}
460
461static void
462icl_combo_phy_aux_power_well_disable(struct drm_i915_private *dev_priv,
463 struct i915_power_well *power_well)
464{
465 enum i915_power_well_id id = power_well->id;
466 enum port port = ICL_AUX_PW_TO_PORT(id);
467 u32 val;
468
469 val = I915_READ(ICL_PORT_CL_DW12(port));
470 I915_WRITE(ICL_PORT_CL_DW12(port), val & ~ICL_LANE_ENABLE_AUX);
471
472 val = I915_READ(HSW_PWR_WELL_CTL_DRIVER(id));
473 I915_WRITE(HSW_PWR_WELL_CTL_DRIVER(id),
474 val & ~HSW_PWR_WELL_CTL_REQ(id));
475
476 hsw_wait_for_power_well_disable(dev_priv, power_well);
477}
478
433/* 479/*
434 * We should only use the power well if we explicitly asked the hardware to 480 * We should only use the power well if we explicitly asked the hardware to
435 * enable it, so check if it's enabled and also check if we've requested it to 481 * enable it, so check if it's enabled and also check if we've requested it to
@@ -1824,6 +1870,7 @@ void intel_display_power_put(struct drm_i915_private *dev_priv,
1824 BIT_ULL(POWER_DOMAIN_INIT)) 1870 BIT_ULL(POWER_DOMAIN_INIT))
1825#define GLK_DISPLAY_AUX_A_POWER_DOMAINS ( \ 1871#define GLK_DISPLAY_AUX_A_POWER_DOMAINS ( \
1826 BIT_ULL(POWER_DOMAIN_AUX_A) | \ 1872 BIT_ULL(POWER_DOMAIN_AUX_A) | \
1873 BIT_ULL(POWER_DOMAIN_AUX_IO_A) | \
1827 BIT_ULL(POWER_DOMAIN_INIT)) 1874 BIT_ULL(POWER_DOMAIN_INIT))
1828#define GLK_DISPLAY_AUX_B_POWER_DOMAINS ( \ 1875#define GLK_DISPLAY_AUX_B_POWER_DOMAINS ( \
1829 BIT_ULL(POWER_DOMAIN_AUX_B) | \ 1876 BIT_ULL(POWER_DOMAIN_AUX_B) | \
@@ -1896,6 +1943,105 @@ void intel_display_power_put(struct drm_i915_private *dev_priv,
1896 BIT_ULL(POWER_DOMAIN_AUX_A) | \ 1943 BIT_ULL(POWER_DOMAIN_AUX_A) | \
1897 BIT_ULL(POWER_DOMAIN_INIT)) 1944 BIT_ULL(POWER_DOMAIN_INIT))
1898 1945
1946/*
1947 * ICL PW_0/PG_0 domains (HW/DMC control):
1948 * - PCI
1949 * - clocks except port PLL
1950 * - central power except FBC
1951 * - shared functions except pipe interrupts, pipe MBUS, DBUF registers
1952 * ICL PW_1/PG_1 domains (HW/DMC control):
1953 * - DBUF function
1954 * - PIPE_A and its planes, except VGA
1955 * - transcoder EDP + PSR
1956 * - transcoder DSI
1957 * - DDI_A
1958 * - FBC
1959 */
1960#define ICL_PW_4_POWER_DOMAINS ( \
1961 BIT_ULL(POWER_DOMAIN_PIPE_C) | \
1962 BIT_ULL(POWER_DOMAIN_PIPE_C_PANEL_FITTER) | \
1963 BIT_ULL(POWER_DOMAIN_INIT))
1964 /* VDSC/joining */
1965#define ICL_PW_3_POWER_DOMAINS ( \
1966 ICL_PW_4_POWER_DOMAINS | \
1967 BIT_ULL(POWER_DOMAIN_PIPE_B) | \
1968 BIT_ULL(POWER_DOMAIN_TRANSCODER_A) | \
1969 BIT_ULL(POWER_DOMAIN_TRANSCODER_B) | \
1970 BIT_ULL(POWER_DOMAIN_TRANSCODER_C) | \
1971 BIT_ULL(POWER_DOMAIN_PIPE_B_PANEL_FITTER) | \
1972 BIT_ULL(POWER_DOMAIN_PORT_DDI_B_LANES) | \
1973 BIT_ULL(POWER_DOMAIN_PORT_DDI_B_IO) | \
1974 BIT_ULL(POWER_DOMAIN_PORT_DDI_C_LANES) | \
1975 BIT_ULL(POWER_DOMAIN_PORT_DDI_C_IO) | \
1976 BIT_ULL(POWER_DOMAIN_PORT_DDI_D_LANES) | \
1977 BIT_ULL(POWER_DOMAIN_PORT_DDI_D_IO) | \
1978 BIT_ULL(POWER_DOMAIN_PORT_DDI_E_LANES) | \
1979 BIT_ULL(POWER_DOMAIN_PORT_DDI_E_IO) | \
1980 BIT_ULL(POWER_DOMAIN_PORT_DDI_F_LANES) | \
1981 BIT_ULL(POWER_DOMAIN_PORT_DDI_F_IO) | \
1982 BIT_ULL(POWER_DOMAIN_AUX_B) | \
1983 BIT_ULL(POWER_DOMAIN_AUX_C) | \
1984 BIT_ULL(POWER_DOMAIN_AUX_D) | \
1985 BIT_ULL(POWER_DOMAIN_AUX_E) | \
1986 BIT_ULL(POWER_DOMAIN_AUX_F) | \
1987 BIT_ULL(POWER_DOMAIN_AUX_TBT1) | \
1988 BIT_ULL(POWER_DOMAIN_AUX_TBT2) | \
1989 BIT_ULL(POWER_DOMAIN_AUX_TBT3) | \
1990 BIT_ULL(POWER_DOMAIN_AUX_TBT4) | \
1991 BIT_ULL(POWER_DOMAIN_VGA) | \
1992 BIT_ULL(POWER_DOMAIN_AUDIO) | \
1993 BIT_ULL(POWER_DOMAIN_INIT))
1994 /*
1995 * - transcoder WD
1996 * - KVMR (HW control)
1997 */
1998#define ICL_PW_2_POWER_DOMAINS ( \
1999 ICL_PW_3_POWER_DOMAINS | \
2000 BIT_ULL(POWER_DOMAIN_INIT))
2001 /*
2002 * - eDP/DSI VDSC
2003 * - KVMR (HW control)
2004 */
2005#define ICL_DISPLAY_DC_OFF_POWER_DOMAINS ( \
2006 ICL_PW_2_POWER_DOMAINS | \
2007 BIT_ULL(POWER_DOMAIN_MODESET) | \
2008 BIT_ULL(POWER_DOMAIN_AUX_A) | \
2009 BIT_ULL(POWER_DOMAIN_INIT))
2010
2011#define ICL_DDI_IO_A_POWER_DOMAINS ( \
2012 BIT_ULL(POWER_DOMAIN_PORT_DDI_A_IO))
2013#define ICL_DDI_IO_B_POWER_DOMAINS ( \
2014 BIT_ULL(POWER_DOMAIN_PORT_DDI_B_IO))
2015#define ICL_DDI_IO_C_POWER_DOMAINS ( \
2016 BIT_ULL(POWER_DOMAIN_PORT_DDI_C_IO))
2017#define ICL_DDI_IO_D_POWER_DOMAINS ( \
2018 BIT_ULL(POWER_DOMAIN_PORT_DDI_D_IO))
2019#define ICL_DDI_IO_E_POWER_DOMAINS ( \
2020 BIT_ULL(POWER_DOMAIN_PORT_DDI_E_IO))
2021#define ICL_DDI_IO_F_POWER_DOMAINS ( \
2022 BIT_ULL(POWER_DOMAIN_PORT_DDI_F_IO))
2023
2024#define ICL_AUX_A_IO_POWER_DOMAINS ( \
2025 BIT_ULL(POWER_DOMAIN_AUX_A))
2026#define ICL_AUX_B_IO_POWER_DOMAINS ( \
2027 BIT_ULL(POWER_DOMAIN_AUX_B))
2028#define ICL_AUX_C_IO_POWER_DOMAINS ( \
2029 BIT_ULL(POWER_DOMAIN_AUX_C))
2030#define ICL_AUX_D_IO_POWER_DOMAINS ( \
2031 BIT_ULL(POWER_DOMAIN_AUX_D))
2032#define ICL_AUX_E_IO_POWER_DOMAINS ( \
2033 BIT_ULL(POWER_DOMAIN_AUX_E))
2034#define ICL_AUX_F_IO_POWER_DOMAINS ( \
2035 BIT_ULL(POWER_DOMAIN_AUX_F))
2036#define ICL_AUX_TBT1_IO_POWER_DOMAINS ( \
2037 BIT_ULL(POWER_DOMAIN_AUX_TBT1))
2038#define ICL_AUX_TBT2_IO_POWER_DOMAINS ( \
2039 BIT_ULL(POWER_DOMAIN_AUX_TBT2))
2040#define ICL_AUX_TBT3_IO_POWER_DOMAINS ( \
2041 BIT_ULL(POWER_DOMAIN_AUX_TBT3))
2042#define ICL_AUX_TBT4_IO_POWER_DOMAINS ( \
2043 BIT_ULL(POWER_DOMAIN_AUX_TBT4))
2044
1899static const struct i915_power_well_ops i9xx_always_on_power_well_ops = { 2045static const struct i915_power_well_ops i9xx_always_on_power_well_ops = {
1900 .sync_hw = i9xx_power_well_sync_hw_noop, 2046 .sync_hw = i9xx_power_well_sync_hw_noop,
1901 .enable = i9xx_always_on_power_well_noop, 2047 .enable = i9xx_always_on_power_well_noop,
@@ -2453,6 +2599,157 @@ static struct i915_power_well cnl_power_wells[] = {
2453 }, 2599 },
2454}; 2600};
2455 2601
2602static const struct i915_power_well_ops icl_combo_phy_aux_power_well_ops = {
2603 .sync_hw = hsw_power_well_sync_hw,
2604 .enable = icl_combo_phy_aux_power_well_enable,
2605 .disable = icl_combo_phy_aux_power_well_disable,
2606 .is_enabled = hsw_power_well_enabled,
2607};
2608
2609static struct i915_power_well icl_power_wells[] = {
2610 {
2611 .name = "always-on",
2612 .always_on = 1,
2613 .domains = POWER_DOMAIN_MASK,
2614 .ops = &i9xx_always_on_power_well_ops,
2615 .id = I915_DISP_PW_ALWAYS_ON,
2616 },
2617 {
2618 .name = "power well 1",
2619 /* Handled by the DMC firmware */
2620 .domains = 0,
2621 .ops = &hsw_power_well_ops,
2622 .id = ICL_DISP_PW_1,
2623 .hsw.has_fuses = true,
2624 },
2625 {
2626 .name = "power well 2",
2627 .domains = ICL_PW_2_POWER_DOMAINS,
2628 .ops = &hsw_power_well_ops,
2629 .id = ICL_DISP_PW_2,
2630 .hsw.has_fuses = true,
2631 },
2632 {
2633 .name = "DC off",
2634 .domains = ICL_DISPLAY_DC_OFF_POWER_DOMAINS,
2635 .ops = &gen9_dc_off_power_well_ops,
2636 .id = SKL_DISP_PW_DC_OFF,
2637 },
2638 {
2639 .name = "power well 3",
2640 .domains = ICL_PW_3_POWER_DOMAINS,
2641 .ops = &hsw_power_well_ops,
2642 .id = ICL_DISP_PW_3,
2643 .hsw.irq_pipe_mask = BIT(PIPE_B),
2644 .hsw.has_vga = true,
2645 .hsw.has_fuses = true,
2646 },
2647 {
2648 .name = "DDI A IO",
2649 .domains = ICL_DDI_IO_A_POWER_DOMAINS,
2650 .ops = &hsw_power_well_ops,
2651 .id = ICL_DISP_PW_DDI_A,
2652 },
2653 {
2654 .name = "DDI B IO",
2655 .domains = ICL_DDI_IO_B_POWER_DOMAINS,
2656 .ops = &hsw_power_well_ops,
2657 .id = ICL_DISP_PW_DDI_B,
2658 },
2659 {
2660 .name = "DDI C IO",
2661 .domains = ICL_DDI_IO_C_POWER_DOMAINS,
2662 .ops = &hsw_power_well_ops,
2663 .id = ICL_DISP_PW_DDI_C,
2664 },
2665 {
2666 .name = "DDI D IO",
2667 .domains = ICL_DDI_IO_D_POWER_DOMAINS,
2668 .ops = &hsw_power_well_ops,
2669 .id = ICL_DISP_PW_DDI_D,
2670 },
2671 {
2672 .name = "DDI E IO",
2673 .domains = ICL_DDI_IO_E_POWER_DOMAINS,
2674 .ops = &hsw_power_well_ops,
2675 .id = ICL_DISP_PW_DDI_E,
2676 },
2677 {
2678 .name = "DDI F IO",
2679 .domains = ICL_DDI_IO_F_POWER_DOMAINS,
2680 .ops = &hsw_power_well_ops,
2681 .id = ICL_DISP_PW_DDI_F,
2682 },
2683 {
2684 .name = "AUX A",
2685 .domains = ICL_AUX_A_IO_POWER_DOMAINS,
2686 .ops = &icl_combo_phy_aux_power_well_ops,
2687 .id = ICL_DISP_PW_AUX_A,
2688 },
2689 {
2690 .name = "AUX B",
2691 .domains = ICL_AUX_B_IO_POWER_DOMAINS,
2692 .ops = &icl_combo_phy_aux_power_well_ops,
2693 .id = ICL_DISP_PW_AUX_B,
2694 },
2695 {
2696 .name = "AUX C",
2697 .domains = ICL_AUX_C_IO_POWER_DOMAINS,
2698 .ops = &hsw_power_well_ops,
2699 .id = ICL_DISP_PW_AUX_C,
2700 },
2701 {
2702 .name = "AUX D",
2703 .domains = ICL_AUX_D_IO_POWER_DOMAINS,
2704 .ops = &hsw_power_well_ops,
2705 .id = ICL_DISP_PW_AUX_D,
2706 },
2707 {
2708 .name = "AUX E",
2709 .domains = ICL_AUX_E_IO_POWER_DOMAINS,
2710 .ops = &hsw_power_well_ops,
2711 .id = ICL_DISP_PW_AUX_E,
2712 },
2713 {
2714 .name = "AUX F",
2715 .domains = ICL_AUX_F_IO_POWER_DOMAINS,
2716 .ops = &hsw_power_well_ops,
2717 .id = ICL_DISP_PW_AUX_F,
2718 },
2719 {
2720 .name = "AUX TBT1",
2721 .domains = ICL_AUX_TBT1_IO_POWER_DOMAINS,
2722 .ops = &hsw_power_well_ops,
2723 .id = ICL_DISP_PW_AUX_TBT1,
2724 },
2725 {
2726 .name = "AUX TBT2",
2727 .domains = ICL_AUX_TBT2_IO_POWER_DOMAINS,
2728 .ops = &hsw_power_well_ops,
2729 .id = ICL_DISP_PW_AUX_TBT2,
2730 },
2731 {
2732 .name = "AUX TBT3",
2733 .domains = ICL_AUX_TBT3_IO_POWER_DOMAINS,
2734 .ops = &hsw_power_well_ops,
2735 .id = ICL_DISP_PW_AUX_TBT3,
2736 },
2737 {
2738 .name = "AUX TBT4",
2739 .domains = ICL_AUX_TBT4_IO_POWER_DOMAINS,
2740 .ops = &hsw_power_well_ops,
2741 .id = ICL_DISP_PW_AUX_TBT4,
2742 },
2743 {
2744 .name = "power well 4",
2745 .domains = ICL_PW_4_POWER_DOMAINS,
2746 .ops = &hsw_power_well_ops,
2747 .id = ICL_DISP_PW_4,
2748 .hsw.has_fuses = true,
2749 .hsw.irq_pipe_mask = BIT(PIPE_C),
2750 },
2751};
2752
2456static int 2753static int
2457sanitize_disable_power_well_option(const struct drm_i915_private *dev_priv, 2754sanitize_disable_power_well_option(const struct drm_i915_private *dev_priv,
2458 int disable_power_well) 2755 int disable_power_well)
@@ -2470,7 +2767,7 @@ static uint32_t get_allowed_dc_mask(const struct drm_i915_private *dev_priv,
2470 int requested_dc; 2767 int requested_dc;
2471 int max_dc; 2768 int max_dc;
2472 2769
2473 if (IS_GEN9_BC(dev_priv) || IS_CANNONLAKE(dev_priv)) { 2770 if (IS_GEN9_BC(dev_priv) || INTEL_INFO(dev_priv)->gen >= 10) {
2474 max_dc = 2; 2771 max_dc = 2;
2475 mask = 0; 2772 mask = 0;
2476 } else if (IS_GEN9_LP(dev_priv)) { 2773 } else if (IS_GEN9_LP(dev_priv)) {
@@ -2558,7 +2855,9 @@ int intel_power_domains_init(struct drm_i915_private *dev_priv)
2558 * The enabling order will be from lower to higher indexed wells, 2855 * The enabling order will be from lower to higher indexed wells,
2559 * the disabling order is reversed. 2856 * the disabling order is reversed.
2560 */ 2857 */
2561 if (IS_HASWELL(dev_priv)) { 2858 if (IS_ICELAKE(dev_priv)) {
2859 set_power_wells(power_domains, icl_power_wells);
2860 } else if (IS_HASWELL(dev_priv)) {
2562 set_power_wells(power_domains, hsw_power_wells); 2861 set_power_wells(power_domains, hsw_power_wells);
2563 } else if (IS_BROADWELL(dev_priv)) { 2862 } else if (IS_BROADWELL(dev_priv)) {
2564 set_power_wells(power_domains, bdw_power_wells); 2863 set_power_wells(power_domains, bdw_power_wells);
@@ -2913,6 +3212,7 @@ static void cnl_set_procmon_ref_values(struct drm_i915_private *dev_priv,
2913 switch (val & (PROCESS_INFO_MASK | VOLTAGE_INFO_MASK)) { 3212 switch (val & (PROCESS_INFO_MASK | VOLTAGE_INFO_MASK)) {
2914 default: 3213 default:
2915 MISSING_CASE(val); 3214 MISSING_CASE(val);
3215 /* fall through */
2916 case VOLTAGE_INFO_0_85V | PROCESS_INFO_DOT_0: 3216 case VOLTAGE_INFO_0_85V | PROCESS_INFO_DOT_0:
2917 procmon = &cnl_procmon_values[PROCMON_0_85V_DOT_0]; 3217 procmon = &cnl_procmon_values[PROCMON_0_85V_DOT_0];
2918 break; 3218 break;
@@ -3025,6 +3325,8 @@ static void cnl_display_core_uninit(struct drm_i915_private *dev_priv)
3025static void icl_display_core_init(struct drm_i915_private *dev_priv, 3325static void icl_display_core_init(struct drm_i915_private *dev_priv,
3026 bool resume) 3326 bool resume)
3027{ 3327{
3328 struct i915_power_domains *power_domains = &dev_priv->power_domains;
3329 struct i915_power_well *well;
3028 enum port port; 3330 enum port port;
3029 u32 val; 3331 u32 val;
3030 3332
@@ -3053,8 +3355,14 @@ static void icl_display_core_init(struct drm_i915_private *dev_priv,
3053 I915_WRITE(ICL_PORT_CL_DW5(port), val); 3355 I915_WRITE(ICL_PORT_CL_DW5(port), val);
3054 } 3356 }
3055 3357
3056 /* 4. Enable power well 1 (PG1) and aux IO power. */ 3358 /*
3057 /* FIXME: ICL power wells code not here yet. */ 3359 * 4. Enable Power Well 1 (PG1).
3360 * The AUX IO power wells will be enabled on demand.
3361 */
3362 mutex_lock(&power_domains->lock);
3363 well = lookup_power_well(dev_priv, ICL_DISP_PW_1);
3364 intel_power_well_enable(dev_priv, well);
3365 mutex_unlock(&power_domains->lock);
3058 3366
3059 /* 5. Enable CDCLK. */ 3367 /* 5. Enable CDCLK. */
3060 icl_init_cdclk(dev_priv); 3368 icl_init_cdclk(dev_priv);
@@ -3072,6 +3380,8 @@ static void icl_display_core_init(struct drm_i915_private *dev_priv,
3072 3380
3073static void icl_display_core_uninit(struct drm_i915_private *dev_priv) 3381static void icl_display_core_uninit(struct drm_i915_private *dev_priv)
3074{ 3382{
3383 struct i915_power_domains *power_domains = &dev_priv->power_domains;
3384 struct i915_power_well *well;
3075 enum port port; 3385 enum port port;
3076 u32 val; 3386 u32 val;
3077 3387
@@ -3085,8 +3395,15 @@ static void icl_display_core_uninit(struct drm_i915_private *dev_priv)
3085 /* 3. Disable CD clock */ 3395 /* 3. Disable CD clock */
3086 icl_uninit_cdclk(dev_priv); 3396 icl_uninit_cdclk(dev_priv);
3087 3397
3088 /* 4. Disable Power Well 1 (PG1) and Aux IO Power */ 3398 /*
3089 /* FIXME: ICL power wells code not here yet. */ 3399 * 4. Disable Power Well 1 (PG1).
3400 * The AUX IO power wells are toggled on demand, so they are already
3401 * disabled at this point.
3402 */
3403 mutex_lock(&power_domains->lock);
3404 well = lookup_power_well(dev_priv, ICL_DISP_PW_1);
3405 intel_power_well_disable(dev_priv, well);
3406 mutex_unlock(&power_domains->lock);
3090 3407
3091 /* 5. Disable Comp */ 3408 /* 5. Disable Comp */
3092 for (port = PORT_A; port <= PORT_B; port++) { 3409 for (port = PORT_A; port <= PORT_B; port++) {