drm/i915: Warn if panel power is already on when enabling it
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 16 Oct 2014 18:30:07 +0000 (21:30 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 4 Nov 2014 22:22:05 +0000 (23:22 +0100)
We should never enable the panel power twice. That would indicate a bug
somewhere else as we would need to enable the port twice without
disabling it in between. Also print the port name.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_dp.c

index 21fb42241b2f1f165a73ad31278b5886dc53b586..9db977b475f8e42b71d9292c6969ba436c9b5d56 100644 (file)
@@ -1629,10 +1629,10 @@ static void edp_panel_on(struct intel_dp *intel_dp)
        DRM_DEBUG_KMS("Turn eDP port %c panel power on\n",
                      port_name(dp_to_dig_port(intel_dp)->port));
 
-       if (edp_have_panel_power(intel_dp)) {
-               DRM_DEBUG_KMS("eDP power already on\n");
+       if (WARN(edp_have_panel_power(intel_dp),
+                "eDP port %c panel power already on\n",
+                port_name(dp_to_dig_port(intel_dp)->port)))
                return;
-       }
 
        wait_panel_power_cycle(intel_dp);