drm/i915: vlv: fix DP PHY lockup due to invalid PP sequencer setup
Subsystems (2)
PATCH 1/1 drm/i915: vlv: fix DP PHY lockup due to invalid PP sequencer setup
Atm we setup the HW panel power sequencer logic both for eDP and DP ports. On eDP we then go on and start the power on sequence and commence with link training when it's ready. On DP we don't do the power on sequencing but do the link training immediately. At this point the DP PHY block gets stuck, since - supposedly - it is waiting for the power on sequence to finish. The actual register write that seems to hold off the PHY is PIPEX_PP_ON_DELAYS[Panel Control Port Select]. Writing here a non-0 value eventually sets PIPEX_PP_STATUS[Require Asset Status] to 1 and blocks the PHY until the panel power on is ready.
Fix this by not doing any PP sequencing setup for DP ports.
Thanks to Ville Syrjälä, Jesse Barnes and Todd Previte for the help in tracking this down.
--- drivers/gpu/drm/i915/intel_dp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +6 -4
@@ -1933,10 +1933,12 @@ static void vlv_pre_enable_dp(struct intel_encoder *encoder)mutex_unlock (&dev_priv->dpio_lock); -/* init power sequencer on this pipe and port */ -intel_dp_init_panel_power_sequencer (dev, intel_dp, &power_seq); -intel_dp_init_panel_power_sequencer_registers (dev, intel_dp, - &power_seq); +if (is_edp (intel_dp)) { +/* init power sequencer on this pipe and port */ +intel_dp_init_panel_power_sequencer (dev, intel_dp, &power_seq); +intel_dp_init_panel_power_sequencer_registers (dev, intel_dp, + &power_seq); + }intel_enable_dp (encoder);
Signature · 6 lines
1.8.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 10 lines · Imre Deak
Atm we setup the HW panel power sequencer logic both for eDP and DP ports. On eDP we then go on and start the power on sequence and commence with link training when it's ready. On DP we don't do the power on sequencing but do the link training immediately. At this point the DP PHY block gets stuck, since - supposedly - it is waiting for the power on sequence to finish. The actual register write that seems to hold off the PHY is PIPEX_PP_ON_DELAYS[Panel Control Port Select]. Writing here a non-0 value eventually sets PIPEX_PP_STATUS[Require Asset Status] to 1 and blocks the PHY until the panel power on is ready.
Quoted 6 lines
Fix this by not doing any PP sequencing setup for DP ports.
Thanks to Ville Syrjälä, Jesse Barnes and Todd Previte for the help in tracking this down.
Signed-off-by Imre Deak <[email protected]>
Ah, the infamous ABCD hack we're using all over the place in intel_lvds.c. On edp we didn't have a need for it thus far since the "require asset status" checks have all been fused of, with the PP being on the PCH and the edp port on the north display block. If this is really all we need to appease the hardware then I'm heavily in favour of it as opposed to resurrect the ABCD hack for intel_dp.c.
One thing though: Should we add a check for the "Required Asset Status" bit somewhere? I don't really have a good idea for a spot to put this into, hence the question.
-Daniel
Quoted 32 lines
--- drivers/gpu/drm/i915/intel_dp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_dp.c +6
-4@@ -1933,10 +1933,12 @@ static void vlv_pre_enable_dp(struct intel_encoder *encoder)mutex_unlock (&dev_priv->dpio_lock); -/* init power sequencer on this pipe and port */ -intel_dp_init_panel_power_sequencer (dev, intel_dp, &power_seq); -intel_dp_init_panel_power_sequencer_registers (dev, intel_dp, - &power_seq); +if (is_edp (intel_dp)) { +/* init power sequencer on this pipe and port */ +intel_dp_init_panel_power_sequencer (dev, intel_dp, &power_seq); +intel_dp_init_panel_power_sequencer_registers (dev, intel_dp, + &power_seq); + }intel_enable_dp (encoder);Signature · 6 lines
1.8.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 25 lines · Daniel Vetter
Quoted 10 lines · Imre Deak
Atm we setup the HW panel power sequencer logic both for eDP and DP ports. On eDP we then go on and start the power on sequence and commence with link training when it's ready. On DP we don't do the power on sequencing but do the link training immediately. At this point the DP PHY block gets stuck, since - supposedly - it is waiting for the power on sequence to finish. The actual register write that seems to hold off the PHY is PIPEX_PP_ON_DELAYS[Panel Control Port Select]. Writing here a non-0 value eventually sets PIPEX_PP_STATUS[Require Asset Status] to 1 and blocks the PHY until the panel power on is ready.
Quoted 6 lines
Fix this by not doing any PP sequencing setup for DP ports.
Thanks to Ville Syrjälä, Jesse Barnes and Todd Previte for the help in tracking this down.
Signed-off-by Imre Deak <[email protected]>Ah, the infamous ABCD hack we're using all over the place in
intel_lvds.c. On edp we didn't have a need for it thus far since the "require asset status" checks have all been fused of, with the PP being on the PCH and the edp port on the north display block. If this is really all we need to appease the hardware then I'm heavily in favour of it as opposed to resurrect the ABCD hack forintel_dp.c.
Quoted 3 lines
One thing though: Should we add a check for the "Required Asset Status" bit somewhere? I don't really have a good idea for a spot to put this into, hence the question.
Also: Picked up for -fixes, thanks for the patch.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 16 lines · Daniel Vetter
Quoted 15 lines · Imre Deak
Atm we setup the HW panel power sequencer logic both for eDP and DP ports. On eDP we then go on and start the power on sequence and commence with link training when it's ready. On DP we don't do the power on sequencing but do the link training immediately. At this point the DP PHY block gets stuck, since - supposedly - it is waiting for the power on sequence to finish. The actual register write that seems to hold off the PHY is PIPEX_PP_ON_DELAYS[Panel Control Port Select]. Writing here a non-0 value eventually sets PIPEX_PP_STATUS[Require Asset Status] to 1 and blocks the PHY until the panel power on is ready.
Fix this by not doing any PP sequencing setup for DP ports.
Thanks to Ville Syrjälä, Jesse Barnes and Todd Previte for the help in tracking this down.
Quoted 8 lines
Quoted 1 line
Signed-off-by Imre Deak <[email protected]>Ah, the infamous ABCD hack we're using all over the place in
intel_lvds.c. On edp we didn't have a need for it thus far since the "require asset status" checks have all been fused of, with the PP being on the PCH and the edp port on the north display block. If this is really all we need to appease the hardware then I'm heavily in favour of it as opposed to resurrect the ABCD hack forintel_dp.c.
Yea, it seems it's not needed on BYT, since even with the PP_CONTROL being all 0 (and not doing any further PP sequencing setup) things work fine.
Quoted 3 lines
One thing though: Should we add a check for the "Required Asset Status" bit somewhere? I don't really have a good idea for a spot to put this into, hence the question.
We could add it for eDP, but I guess based on the above for DP we don't need to check it.
--Imre
Quoted 27 lines
-Daniel
Quoted 25 lines
--- drivers/gpu/drm/i915/intel_dp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_dp.c +6
-4@@ -1933,10 +1933,12 @@ static void vlv_pre_enable_dp(struct intel_encoder *encoder)mutex_unlock (&dev_priv->dpio_lock); -/* init power sequencer on this pipe and port */ -intel_dp_init_panel_power_sequencer (dev, intel_dp, &power_seq); -intel_dp_init_panel_power_sequencer_registers (dev, intel_dp, - &power_seq); +if (is_edp (intel_dp)) { +/* init power sequencer on this pipe and port */ +intel_dp_init_panel_power_sequencer (dev, intel_dp, &power_seq); +intel_dp_init_panel_power_sequencer_registers (dev, intel_dp, + &power_seq); + }intel_enable_dp (encoder);
Quoted 8 lines
Quoted 7 lines
Signature · 6 lines
1.8.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 25 lines · Daniel Vetter
Quoted 10 lines · Imre Deak
Atm we setup the HW panel power sequencer logic both for eDP and DP ports. On eDP we then go on and start the power on sequence and commence with link training when it's ready. On DP we don't do the power on sequencing but do the link training immediately. At this point the DP PHY block gets stuck, since - supposedly - it is waiting for the power on sequence to finish. The actual register write that seems to hold off the PHY is PIPEX_PP_ON_DELAYS[Panel Control Port Select]. Writing here a non-0 value eventually sets PIPEX_PP_STATUS[Require Asset Status] to 1 and blocks the PHY until the panel power on is ready.
Quoted 6 lines
Fix this by not doing any PP sequencing setup for DP ports.
Thanks to Ville Syrjälä, Jesse Barnes and Todd Previte for the help in tracking this down.
Signed-off-by Imre Deak <[email protected]>Ah, the infamous ABCD hack we're using all over the place in
intel_lvds.c. On edp we didn't have a need for it thus far since the "require asset status" checks have all been fused of, with the PP being on the PCH and the edp port on the north display block. If this is really all we need to appease the hardware then I'm heavily in favour of it as opposed to resurrect the ABCD hack forintel_dp.c.
Quoted 3 lines
One thing though: Should we add a check for the "Required Asset Status" bit somewhere? I don't really have a good idea for a spot to put this into, hence the question.
Don't know about the asset status stuff, but I know it was me who screwed this up in
commit bf13e81b904a37d94d83dd6c3b53a147719a3ead
Author: Jani Nikula <[email protected]> Date: Fri Sep 6 07:40:05 2013 +0300
drm/i915: add support for per-pipe power sequencing on vlv
We need to make sure the PP registers are set up correctly on the pipe being enabled, which might be different from the last time. But only for eDP.
I'm a bit surprised this hasn't been bisected to.
BR,
Jani.
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 37 lines · Jani Nikula
Quoted 25 lines · Daniel Vetter
Quoted 10 lines · Imre Deak
Atm we setup the HW panel power sequencer logic both for eDP and DP ports. On eDP we then go on and start the power on sequence and commence with link training when it's ready. On DP we don't do the power on sequencing but do the link training immediately. At this point the DP PHY block gets stuck, since - supposedly - it is waiting for the power on sequence to finish. The actual register write that seems to hold off the PHY is PIPEX_PP_ON_DELAYS[Panel Control Port Select]. Writing here a non-0 value eventually sets PIPEX_PP_STATUS[Require Asset Status] to 1 and blocks the PHY until the panel power on is ready.
Quoted 6 lines
Fix this by not doing any PP sequencing setup for DP ports.
Thanks to Ville Syrjälä, Jesse Barnes and Todd Previte for the help in tracking this down.
Signed-off-by Imre Deak <[email protected]>Ah, the infamous ABCD hack we're using all over the place in
intel_lvds.c. On edp we didn't have a need for it thus far since the "require asset status" checks have all been fused of, with the PP being on the PCH and the edp port on the north display block. If this is really all we need to appease the hardware then I'm heavily in favour of it as opposed to resurrect the ABCD hack forintel_dp.c.Quoted 3 lines
One thing though: Should we add a check for the "Required Asset Status" bit somewhere? I don't really have a good idea for a spot to put this into, hence the question.
Don't know about the asset status stuff, but I know it was me who screwed this up in
commit
bf13e81b904a37d94d83dd6c3b53a147719a3eadAuthor: Jani Nikula <[email protected]> Date: Fri Sep 6 07:40:05 2013 +0300
Quoted 7 lines
drm/i915: add support for per-pipe power sequencing on vlv
We need to make sure the PP registers are set up correctly on the pipe being enabled, which might be different from the last time. But only for eDP.
I'm a bit surprised this hasn't been bisected to.
One thing making that more difficult is buggy VBTs. If that reports the DP port being eDP, like in my case, you won't see the problem.
--Imre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx