drm/i915/psr: Begin to handle PSR/PSR2 errors set by sink
authorJosé Roberto de Souza <jose.souza@intel.com>
Tue, 26 Jun 2018 20:16:41 +0000 (13:16 -0700)
committerDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Wed, 27 Jun 2018 00:11:35 +0000 (17:11 -0700)
commitcc3054ff6214f6d14d35ffe629ff8d5032ace7f7
treebdde2cc24d694910e7727870bbadc32f6bdcfbcd
parent42f53ffcad7fcf11b5767767dd0c0ff607d99787
drm/i915/psr: Begin to handle PSR/PSR2 errors set by sink

eDP spec states that sink device will do a short pulse in HPD
line when there is a PSR/PSR2 error that needs to be handled by
source, this is handling the first and most simples error:
DP_PSR_SINK_INTERNAL_ERROR.

Here taking the safest approach and disabling PSR(at least until
the next modeset), to avoid multiple rendering issues due to
bad pannels.

v5:
added lockdep_assert in psr_disable and renamed psr_disable()
to intel_psr_disable_locked()

v4:
Using CAN_PSR instead of HAS_PSR in intel_psr_short_pulse

v3:
disabling PSR instead of exiting on error

Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180626201644.21932-2-jose.souza@intel.com
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_psr.c