]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915/icl+: Don't enable DDI IO power on a TypeC port in TBT mode
authorImre Deak <imre.deak@intel.com>
Mon, 30 Mar 2020 15:22:44 +0000 (18:22 +0300)
committerImre Deak <imre.deak@intel.com>
Tue, 31 Mar 2020 17:01:06 +0000 (20:01 +0300)
The DDI IO power well must not be enabled for a TypeC port in TBT mode,
ensure this during driver loading/system resume.

This gets rid of error messages like
[drm] *ERROR* power well DDI E TC2 IO state mismatch (refcount 1/enabled 0)

and avoids leaking the power ref when disabling the output.

Cc: <stable@vger.kernel.org> # v5.4+
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200330152244.11316-1-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_ddi.c

index 916a802af788c868bb0874914fd91b0a5bf184ea..654151d9a6db8b55e76aedae1af899058950bc85 100644 (file)
@@ -1899,7 +1899,11 @@ static void intel_ddi_get_power_domains(struct intel_encoder *encoder,
                return;
 
        dig_port = enc_to_dig_port(encoder);
-       intel_display_power_get(dev_priv, dig_port->ddi_io_power_domain);
+
+       if (!intel_phy_is_tc(dev_priv, phy) ||
+           dig_port->tc_mode != TC_PORT_TBT_ALT)
+               intel_display_power_get(dev_priv,
+                                       dig_port->ddi_io_power_domain);
 
        /*
         * AUX power is only needed for (e)DP mode, and for HDMI mode on TC