From: Ville Syrjälä Date: Thu, 16 Oct 2014 18:27:28 +0000 (+0300) Subject: drm/i915: Warn if stealing power sequencer from an active eDP port X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=034e43c6c0dc7e70a6edc96987758237cb92f0cd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/i915: Warn if stealing power sequencer from an active eDP port eDP ports need the power seqeuncer whenever the port is active. Warn if we accidentally steal the power sequener from an active eDP port. This should not happen unless there's a bug somewhere else, but it's best to scream loudly if it happens to help with debugging. Note that this only checks for active pipes and not for enabled pipes which are turned off with dpms. Which means we might run the risk that the pps might get stolen and we can't reacquire one when enabling the pipe again with dpms on. But on current platforms that's impossible since we only support two edp ports with just two panel power sequencers. So a more elaborate scheme which reserves the pps even when the pipe is inactive isn't required. Signed-off-by: Ville Syrjälä Reviewed-by: Imre Deak [danvet: Summarize my discussion with Ville about dpms on/off issues.] Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 9db977b475f8..90d752d5d6ea 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -2728,6 +2728,10 @@ static void vlv_steal_power_sequencer(struct drm_device *dev, DRM_DEBUG_KMS("stealing pipe %c power sequencer from port %c\n", pipe_name(pipe), port_name(port)); + WARN(encoder->connectors_active, + "stealing pipe %c power sequencer from active eDP port %c\n", + pipe_name(pipe), port_name(port)); + /* make sure vdd is off before we steal it */ vlv_detach_power_sequencer(intel_dp); }