From: Ben Widawsky <benjamin.widaw...@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 <jbar...@virtuousgeek.org> Signed-off-by: Ben Widawsky <b...@bwidawsk.net> Signed-off-by: Wayne Boyer <wayne.bo...@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 <adur...@chromium.org> Tested-by: Wayne Boyer <wayne.bo...@intel.com> Commit-Queue: Wayne Boyer <wayne.bo...@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 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx