[Intel-gfx] [PATCH 08/11] CHROMIUM: drm/i915/vlv: Check BLC enable for pwm invariant

clinton.a.taylor at intel.com clinton.a.taylor at intel.com
Wed Jul 16 23:49:44 CEST 2014


From: Ben Widawsky <benjamin.widawsky at intel.com>

The new assertion code mandates that backlight should be disabled.
Since we've just bent over backwards over the last few patches to make
sure we don't program a 0 into duty cycle, we need some additional
checks to see if the panel is on. This can easily be accomplished by
checking the enable bit in the adjacent control register.

Based off of a patch originally written by Jesse.

Cc: Jesse Barnes <jbarnes at virtuousgeek.org>
Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
Signed-off-by: Wayne Boyer <wayne.boyer at intel.com>

BUG=chrome-os-partner:25159
TEST=suspend/resume test on instrumented system shows correct
signaling on oscope.  Manual brightness checks.

Change-Id: I0aed561451ab6432c7b4d358821347189eece966
Reviewed-on: https://chromium-review.googlesource.com/196620
Reviewed-by: Aaron Durbin <adurbin at chromium.org>
Tested-by: Wayne Boyer <wayne.boyer at intel.com>
Commit-Queue: Wayne Boyer <wayne.boyer at intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index e036da4..4f0fc11 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -373,9 +373,14 @@ static void assert_pwm(struct drm_i915_private *dev_priv,
 		       struct intel_connector *connector,
 		       bool expected_state)
 {
+	enum pipe pipe = intel_get_pipe_from_connector(connector);
 	bool state;
 
-	state = intel_panel_get_backlight(connector);
+	if (IS_VALLEYVIEW(dev_priv->dev) &&
+	    !(I915_READ(VLV_BLC_PWM_CTL2(pipe) & BLM_PWM_ENABLE)))
+		state = false;
+	else
+		state = (intel_panel_get_backlight(connector) != 0);
 
 	WARN(state != expected_state, "pwm state failure, expected %d, found "
 	     "%d\n", expected_state, state);
-- 
1.7.9.5




More information about the Intel-gfx mailing list