OSDN Git Service

drm/i915/icl: Add fallback detection method for TypeC legacy ports
authorImre Deak <imre.deak@intel.com>
Fri, 14 Dec 2018 18:27:03 +0000 (20:27 +0200)
committerImre Deak <imre.deak@intel.com>
Tue, 18 Dec 2018 15:00:38 +0000 (17:00 +0200)
commit2a041c97c3bceab8b7f133658c22659e4a81bd75
tree603c608c09cab9778dbbbcaddc951e19bef12deb
parentf6bff60e927b2f1e2bc87a6b7f412b87bf289712
drm/i915/icl: Add fallback detection method for TypeC legacy ports

Add a fallback detection method for TypeC legacy ports in case the
VBT port information used to detect normally such ports is
incorrect.

For the fallback method we use the TypeC legacy mode specific HPD
interrupt flag which should only be raised for a legacy port.

WARN if the VBT port info is incorrect.

In a case where we'd detect the port in a contradicting way both as a
legacy and also as a USB DP and/or TBT alternate port treat the port
as legacy (by also emitting a WARN from icl_update_tc_port_type).

v2:
- Repurpose the detection as a fallback method instead of using
  it only for the DP legacy case. By now we should normally use VBT to
  detect DP legacy ports as well.

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (v1)
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181214182703.18865-5-imre.deak@intel.com
drivers/gpu/drm/i915/intel_dp.c