drm/i915: Init lspcon after HPD in intel_dp_detect()
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Wed, 10 Jun 2020 07:55:10 +0000 (15:55 +0800)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 1 Oct 2020 16:22:10 +0000 (19:22 +0300)
commitf542d671ffcec772a561cd41c7e2394392d9dafb
treeb60cdebde43109a43a519e661e0483edc1189b77
parentef79fafe9dae31037c48bd11676746315725452d
drm/i915: Init lspcon after HPD in intel_dp_detect()

On HP 800 G4 DM, if HDMI cable isn't plugged before boot, the HDMI port
becomes useless and never responds to cable hotplugging:
[    3.031904] [drm:lspcon_init [i915]] *ERROR* Failed to probe lspcon
[    3.031945] [drm:intel_ddi_init [i915]] *ERROR* LSPCON init failed on port D

Seems like the lspcon chip on the system only gets powered after the
cable is plugged.

Consilidate lspcon_init() into lspcon_resume() to dynamically init
lspcon chip, and make HDMI port work.

v6:
 - Rebase on latest for-linux-next.
v5:
 - Consolidate lspcon_resume() with lspcon_init().
 - Move more logic into lspcon code.
v4:
 - Trust VBT in intel_infoframe_init().
 - Init lspcon in intel_dp_detect().
v3:
 - Make sure it's handled under long HPD case.
v2:
 - Move lspcon_init() inside of intel_dp_hpd_pulse().

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/203
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200610075542.12882-1-kai.heng.feng@canonical.com
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_hdmi.c
drivers/gpu/drm/i915/display/intel_lspcon.c
drivers/gpu/drm/i915/display/intel_lspcon.h