aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_ddi.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_ddi.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_ddi.c')
-rw-r--r--drivers/gpu/drm/i915/intel_ddi.c54
1 files changed, 48 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 044fe1fb9872..32838ed89ee7 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1069,6 +1069,7 @@ static uint32_t icl_pll_to_ddi_pll_sel(struct intel_encoder *encoder,
1069 switch (id) { 1069 switch (id) {
1070 default: 1070 default:
1071 MISSING_CASE(id); 1071 MISSING_CASE(id);
1072 /* fall through */
1072 case DPLL_ID_ICL_DPLL0: 1073 case DPLL_ID_ICL_DPLL0:
1073 case DPLL_ID_ICL_DPLL1: 1074 case DPLL_ID_ICL_DPLL1:
1074 return DDI_CLK_SEL_NONE; 1075 return DDI_CLK_SEL_NONE;
@@ -1983,15 +1984,50 @@ out:
1983 return ret; 1984 return ret;
1984} 1985}
1985 1986
1986static u64 intel_ddi_get_power_domains(struct intel_encoder *encoder) 1987static inline enum intel_display_power_domain
1988intel_ddi_main_link_aux_domain(struct intel_dp *intel_dp)
1989{
1990 /* CNL HW requires corresponding AUX IOs to be powered up for PSR with
1991 * DC states enabled at the same time, while for driver initiated AUX
1992 * transfers we need the same AUX IOs to be powered but with DC states
1993 * disabled. Accordingly use the AUX power domain here which leaves DC
1994 * states enabled.
1995 * However, for non-A AUX ports the corresponding non-EDP transcoders
1996 * would have already enabled power well 2 and DC_OFF. This means we can
1997 * acquire a wider POWER_DOMAIN_AUX_{B,C,D,F} reference instead of a
1998 * specific AUX_IO reference without powering up any extra wells.
1999 * Note that PSR is enabled only on Port A even though this function
2000 * returns the correct domain for other ports too.
2001 */
2002 return intel_dp->aux_ch == AUX_CH_A ? POWER_DOMAIN_AUX_IO_A :
2003 intel_dp->aux_power_domain;
2004}
2005
2006static u64 intel_ddi_get_power_domains(struct intel_encoder *encoder,
2007 struct intel_crtc_state *crtc_state)
1987{ 2008{
1988 struct intel_digital_port *dig_port = enc_to_dig_port(&encoder->base); 2009 struct intel_digital_port *dig_port;
1989 enum pipe pipe; 2010 u64 domains;
1990 2011
1991 if (intel_ddi_get_hw_state(encoder, &pipe)) 2012 /*
1992 return BIT_ULL(dig_port->ddi_io_power_domain); 2013 * TODO: Add support for MST encoders. Atm, the following should never
2014 * happen since fake-MST encoders don't set their get_power_domains()
2015 * hook.
2016 */
2017 if (WARN_ON(intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST)))
2018 return 0;
1993 2019
1994 return 0; 2020 dig_port = enc_to_dig_port(&encoder->base);
2021 domains = BIT_ULL(dig_port->ddi_io_power_domain);
2022
2023 /* AUX power is only needed for (e)DP mode, not for HDMI. */
2024 if (intel_crtc_has_dp_encoder(crtc_state)) {
2025 struct intel_dp *intel_dp = &dig_port->dp;
2026
2027 domains |= BIT_ULL(intel_ddi_main_link_aux_domain(intel_dp));
2028 }
2029
2030 return domains;
1995} 2031}
1996 2032
1997void intel_ddi_enable_pipe_clock(const struct intel_crtc_state *crtc_state) 2033void intel_ddi_enable_pipe_clock(const struct intel_crtc_state *crtc_state)
@@ -2631,6 +2667,9 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,
2631 2667
2632 WARN_ON(is_mst && (port == PORT_A || port == PORT_E)); 2668 WARN_ON(is_mst && (port == PORT_A || port == PORT_E));
2633 2669
2670 intel_display_power_get(dev_priv,
2671 intel_ddi_main_link_aux_domain(intel_dp));
2672
2634 intel_dp_set_link_params(intel_dp, crtc_state->port_clock, 2673 intel_dp_set_link_params(intel_dp, crtc_state->port_clock,
2635 crtc_state->lane_count, is_mst); 2674 crtc_state->lane_count, is_mst);
2636 2675
@@ -2775,6 +2814,9 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder,
2775 intel_display_power_put(dev_priv, dig_port->ddi_io_power_domain); 2814 intel_display_power_put(dev_priv, dig_port->ddi_io_power_domain);
2776 2815
2777 intel_ddi_clk_disable(encoder); 2816 intel_ddi_clk_disable(encoder);
2817
2818 intel_display_power_put(dev_priv,
2819 intel_ddi_main_link_aux_domain(intel_dp));
2778} 2820}
2779 2821
2780static void intel_ddi_post_disable_hdmi(struct intel_encoder *encoder, 2822static void intel_ddi_post_disable_hdmi(struct intel_encoder *encoder,