]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/ehl: Check PHY type before reading DPLL frequency
authorMatt Roper <matthew.d.roper@intel.com>
Tue, 3 Mar 2020 19:50:43 +0000 (11:50 -0800)
committerMatt Roper <matthew.d.roper@intel.com>
Wed, 4 Mar 2020 14:00:16 +0000 (06:00 -0800)
commite97d66bd0c620e390961b36d93e5a9f8e5de70d0
treeca7120266f9acf4f497b7e5f750a9e0ba9e5c000
parent3c7c0aedd741ecbd1bc7d313914c6da7d7f9e0c0
drm/i915/ehl: Check PHY type before reading DPLL frequency

intel_ddi_clock_get() tests the DPLL ID against DPLL_ID_ICL_TBTPLL (2)
to determine whether to try to descend into a TBT-specific handler.
However this test will also be true when DPLL4 on EHL is used since that
shares the same DPLL ID (2).

Add an extra check to ensure the PHY is actually a Type-C PHY before
descending into the TBT handling.  This should ensure EHL still takes
the correct code path and somewhat future-proof the code as well.

v2: Drop the gen+ check since only gen11+ platforms can have Type-C
    outputs.  (Imre)

Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Closes: https://gitlab.freedesktop.org/drm/intel/issues/1369
Fixes: 154f9e5cd802 ("drm/i915: Move DPLL frequency calculation to intel_dpll_mgr.c")
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200303195043.959913-1-matthew.d.roper@intel.com
drivers/gpu/drm/i915/display/intel_ddi.c