drm/i915: unconditionally unlock panel regs
Subsystems (2)
PATCH 1/1 drm/i915: unconditionally unlock panel regs
In the panel_on function we skip everything if the panel is already powered up. However, if it's powered up but not unlocked, subsequent register writes may fail.
So unlock the regs regardless of the panel state to allow other mode setting programming to occur normally.
[Still waiting to hear from bug reporters & testers on this one, but it does get my Vaio working again, with or without the eDP VBT patch reverted.]
drivers/gpu/drm/i915/intel_dp.c +5 -0
@@ -818,6 +818,11 @@ static bool ironlake_edp_panel_on (struct intel_dp *intel_dp)struct drm_i915_private *dev_priv = dev->dev_private;u32 pp, idle_on_mask =PP_ON |PP_SEQUENCE_STATE_ON_IDLE ; + pp =I915_READ (PCH_PP_CONTROL ); + pp |=PANEL_UNLOCK_REGS |POWER_TARGET_ON ; +I915_WRITE (PCH_PP_CONTROL , pp); +POSTING_READ (PCH_PP_CONTROL ); +if (I915_READ (PCH_PP_STATUS ) &PP_ON )return true;
Quoted 6 lines · Jesse Barnes
In the
panel_onfunction we skip everything if the panel is already powered up. However, if it's powered up but not unlocked, subsequent register writes may fail.So unlock the regs regardless of the panel state to allow other mode setting programming to occur normally.
That looks to be consistent with other [ab]users of PP_CONTROL. Can you tidy up the function to remove the duplicate code afterwards? -Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 11 lines · On Tue, 14 Dec 2010 20:45:14 +0000 Chris Wilson <[email protected]>…
Quoted 6 lines · Jesse Barnes
In the
panel_onfunction we skip everything if the panel is already powered up. However, if it's powered up but not unlocked, subsequent register writes may fail.So unlock the regs regardless of the panel state to allow other mode setting programming to occur normally.
That looks to be consistent with other [ab]users of
PP_CONTROL. Can you tidy up the function to remove the duplicate code afterwards? -Chris
Sure, her eyou go.
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
Quoted 1 line
From
78b4ed4faf42b62de6d8a23dda8120c410488c82Mon Sep 17 00:00:00 2001
From: Jesse Barnes <[email protected]>
Date: Tue, 14 Dec 2010 13:14:07 -0800
Subject: [PATCH] drm/i915: unconditionally unlock panel regs
In the panel_on function we skip everything if the panel is already powered up. However, if it's powered up but not unlocked, subsequent register writes may fail.
So unlock the regs regardless of the panel state to allow other mode setting programming to occur normally.
[Still waiting to hear from bug reporters & testers on this one, but it does get my Vaio working again, with or without the eDP VBT patch reverted.]
--- drivers/gpu/drm/i915/intel_dp.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +7 -3
@@ -818,17 +818,21 @@ static bool ironlake_edp_panel_on (struct intel_dp *intel_dp)struct drm_i915_private *dev_priv = dev->dev_private;u32 pp, idle_on_mask =PP_ON |PP_SEQUENCE_STATE_ON_IDLE ; +/* Always unlock the protected regs so other writes work */ + pp =I915_READ (PCH_PP_CONTROL ); + pp |=PANEL_UNLOCK_REGS ; +I915_WRITE (PCH_PP_CONTROL , pp); +POSTING_READ (PCH_PP_CONTROL ); +if (I915_READ (PCH_PP_STATUS ) &PP_ON )return true; - pp =I915_READ (PCH_PP_CONTROL ); -/* ILK workaround: disable reset around power sequence */ pp &= ~PANEL_POWER_RESET ;I915_WRITE (PCH_PP_CONTROL , pp);POSTING_READ (PCH_PP_CONTROL ); - pp |=PANEL_UNLOCK_REGS |POWER_TARGET_ON ; + pp |=POWER_TARGET_ON ;I915_WRITE (PCH_PP_CONTROL , pp);POSTING_READ (PCH_PP_CONTROL );
Signature · 1 line
1.7.0.4
Quoted 8 lines · Jesse Barnes
Quoted 5 lines · On Tue, 14 Dec 2010 20:45:14 +0000 Chris Wilson<[email protected]>…
Quoted 5 lines · Jesse Barnes
Quoted 4 lines
Quoted 4 lines
In the
panel_onfunction we skip everything if the panel is already powered up. However, if it's powered up but not unlocked, subsequent register writes may fail.
Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
So unlock the regs regardless of the panel state to allow other mode setting programming to occur normally.
That looks to be consistent with other [ab]users of
PP_CONTROL. Can you tidy up the function to remove the duplicate code afterwards? -ChrisSure, her eyou go.
Unfortunately, this patch does not seem to fix my intermittent boot problem on the HP 2540p. I sort of wonder if Airlied and I have different BIOS's; I got mine very early on, and have not updated its BIOS. This hypothesis would indicate some bit in some register isn't getting set.
- Jim
Quoted 31 lines
-- Jesse Barnes, Intel Open Source Technology Center >From
78b4ed4faf42b62de6d8a23dda8120c410488c82Mon Sep 17 00:00:00 2001 From:
Jesse Barnes <[email protected]> Date: Tue, 14 Dec 2010 13:14:07 -0800 Subject: [PATCH] drm/i915: unconditionally unlock panel regs In thepanel_onfunction we skip everything if the panel is already powered up. However, if it's powered up but not unlocked, subsequent register writes may fail. So unlock the regs regardless of the panel state to allow other mode setting programming to occur normally. [Still waiting to hear from bug reporters & testers on this one, but it does get my Vaio working again, with or without the eDP VBT patch reverted.]Signed-off-by Jesse Barnes <[email protected]> ---
drivers/gpu/drm/i915/intel_dp.c| 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --gita/drivers/gpu/drm/i915/intel_dp.cb/drivers/gpu/drm/i915/intel_dp.cindex f74a706..ddfd585 100644 ---a/drivers/gpu/drm/i915/intel_dp.c+++b/drivers/gpu/drm/i915/intel_dp.c@@ -818,17 +818,21 @@ static boolironlake_edp_panel_on(structintel_dp*intel_dp) structdrm_i915_private*dev_priv=dev->dev_private; u32 pp,idle_on_mask=PP_ON|PP_SEQUENCE_STATE_ON_IDLE; + /* Always unlock the protected regs so other writes work */ + pp =I915_READ(PCH_PP_CONTROL); + pp |=PANEL_UNLOCK_REGS; +I915_WRITE(PCH_PP_CONTROL, pp); +POSTING_READ(PCH_PP_CONTROL); + if (I915_READ(PCH_PP_STATUS)&PP_ON) return true; - pp =I915_READ(PCH_PP_CONTROL); - /* ILK workaround:
disable reset around power sequence */ pp &= ~PANEL_POWER_RESET;I915_WRITE(PCH_PP_CONTROL, pp);POSTING_READ(PCH_PP_CONTROL); - pp |=PANEL_UNLOCK_REGS|POWER_TARGET_ON; + pp |=POWER_TARGET_ON;I915_WRITE(PCH_PP_CONTROL, pp);POSTING_READ(PCH_PP_CONTROL); -- 1.7.0.4 _______________________________________________ Intel-gfx mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 10 lines · Jesse Barnes
In the
panel_onfunction we skip everything if the panel is already powered up. However, if it's powered up but not unlocked, subsequent register writes may fail.So unlock the regs regardless of the panel state to allow other mode setting programming to occur normally.
[Still waiting to hear from bug reporters & testers on this one, but it does get my Vaio working again, with or without the eDP VBT patch reverted.]
My Vaio VPCZ1 works with your patch in addition to the eDP VBT patch (or rather the revert reverted). It does not work without the eDP VBT patch.
The above is true for drm-intel-next and drm-intel-fixes.
-jhz
Signature · 1 line
http://jhz.name/blog
Quoted 5 lines · Jan-Hendrik Zab
My Vaio VPCZ1 works with your patch in addition to the eDP VBT patch (or rather the revert reverted). It does not work without the eDP VBT patch.
The above is true for drm-intel-next and drm-intel-fixes.
This kills the hope of a quick fix for .37. Hopefully, Jesse will find a way to make all eDP laptops behave; I believe he is just waiting for a couple of more test machines.
How many of these troublesome machines use SSC and so might be affected by 448f53a1ede54eb854d036abf54573281412d650 (drm/i915/bios: Reverse order of 100/120 Mhz SSC clocks)?
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre