drm/i915: Exorcise ilk underruns
Subsystems (2)
cover drm/i915: Exorcise ilk underruns
From: Ville Syrjälä <[email protected]>
With this series I seem to have succeeded in eliminating all the underruns from my ILK. Let's hope it's as effective for others as well.
Ville Syrjälä (3):
drm/i915: Try to shut up more ILK underruns
drm/i915: Make sure LP1+ watermarks levels are preserved when going
from 1 to 2 pipes
drm/i915: Replace ILK eDP underrun suppression with something better
drivers/gpu/drm/i915/intel_display.c | 45 ++++++++++++++++----------------- drivers/gpu/drm/i915/intel_dp.c | 48 +++++++----------------------------- drivers/gpu/drm/i915/intel_pm.c | 2 +- 3 files changed, 33 insertions(+), 62 deletions(-)
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/3 drm/i915: Try to shut up more ILK underruns
From: Ville Syrjälä <[email protected]>
Take a bigger hammer to the underrun suppression on ILK. Instead of trying to suppress them at specific points in the modeset sequence just silence them across the entire sequence. This gets rid of some underruns at least on my ILK. Note that this changes SNB and IVB to follow the same approach just to keep the code less convoluted. The difference is that on those platforms we won't suppress CPU underruns for port A since it doesn't seem to be necessary.
My ILK has port A eDP and two PCH HDMI ports, so I can't be sure this is as effective on other PCH port types. Perhaps we still need some of Daniel's extra vblank waits [2]?
I've still been able to trigger an underrun on the other pipe, but fixing that perhaps needs the LP1+ disable trick I implemented here [1] which never got merged.
A few details which hamper stress testing on my ILK are that sometimes the PCH transcoder gets messed up and refuses to shut down, and sometimes even the panel power sequencer apparently gets stuck on the always on position.
[1] https://lists.freedesktop.org/archives/intel-gfx/2014-March/041317.html
[2] https://lists.freedesktop.org/archives/intel-gfx/2016-January/086397.html
v2: Add a note that we also get underruns when enabling PCH ports
--- drivers/gpu/drm/i915/intel_display.c | 45 ++++++++++++++++++------------------ drivers/gpu/drm/i915/intel_dp.c | 12 ---------- 2 files changed, 23 insertions(+), 34 deletions(-)
drivers/gpu/drm/i915/intel_display.c +23 -22
@@ -4083,12 +4083,6 @@ static void ironlake_pch_enable(struct drm_crtc *crtc)I915_WRITE (FDI_RX_TUSIZE1 (pipe),I915_READ (PIPE_DATA_M1 (pipe)) &TU_SIZE_MASK ); -/* -* Sometimes spurious CPU pipe underruns happen during FDI -* training, at least with VGA+HDMI cloning. Suppress them. -*/ -intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, false); -/* For PCH output, training FDI link */ dev_priv->display.fdi_link_train (crtc);
@@ -4123,8 +4117,6 @@ static void ironlake_pch_enable(struct drm_crtc *crtc)intel_fdi_normal_train (crtc); -intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, true); -/* For PCH DP, enable TRANS_DP_CTL */ if (HAS_PCH_CPT (dev) && intel_crtc->config->has_dp_encoder) { const struct drm_display_mode *adjusted_mode =
@@ -4727,6 +4719,18 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)if (WARN_ON (intel_crtc->active))return ; +/* +* Sometimes spurious CPU pipe underruns happen during FDI +* training, at least with VGA+HDMI cloning. Suppress them. +* +* On ILK we get an occasional spurious CPU pipe underruns +* between eDP port A enable and vdd enable. Also PCH port +* enable seems to result in the occasional CPU pipe underrun. +* +* Spurious PCH underruns also occur during PCH enabling. +*/ +if (intel_crtc->config->has_pch_encoder ||IS_GEN5 (dev_priv)) +intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, false);if (intel_crtc->config->has_pch_encoder)intel_set_pch_fifo_underrun_reporting (dev_priv, pipe, false);
@@ -4748,8 +4752,6 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc) intel_crtc->active = true; -intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, true); -for_each_encoder_on_crtc (dev, crtc, encoder)if (encoder->pre_enable) encoder->pre_enable (encoder);
@@ -4791,6 +4793,7 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)/* Must wait for vblank to avoid spurious PCH FIFO underruns */ if (intel_crtc->config->has_pch_encoder)intel_wait_for_vblank (dev, pipe); +intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, true);intel_set_pch_fifo_underrun_reporting (dev_priv, pipe, true); }
@@ -4943,8 +4946,15 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)struct intel_encoder *encoder;int pipe = intel_crtc->pipe; -if (intel_crtc->config->has_pch_encoder) +/* +* Sometimes spurious CPU pipe underruns happen when the +* pipe is already disabled, but FDI RX/TX is still enabled. +* Happens at least with VGA+HDMI cloning. Suppress them. +*/ +if (intel_crtc->config->has_pch_encoder) { +intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, false);intel_set_pch_fifo_underrun_reporting (dev_priv, pipe, false); + }for_each_encoder_on_crtc (dev, crtc, encoder) encoder->disable (encoder);
@@ -4952,22 +4962,12 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)drm_crtc_vblank_off (crtc);assert_vblank_disabled (crtc); -/* -* Sometimes spurious CPU pipe underruns happen when the -* pipe is already disabled, but FDI RX/TX is still enabled. -* Happens at least with VGA+HDMI cloning. Suppress them. -*/ -if (intel_crtc->config->has_pch_encoder) -intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, false); -intel_disable_pipe (intel_crtc);ironlake_pfit_disable (intel_crtc, false); -if (intel_crtc->config->has_pch_encoder) { +if (intel_crtc->config->has_pch_encoder)ironlake_fdi_disable (crtc); -intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, true); - }for_each_encoder_on_crtc (dev, crtc, encoder)if (encoder->post_disable)
@@ -4997,6 +4997,7 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)ironlake_fdi_pll_disable (intel_crtc); } +intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, true);intel_set_pch_fifo_underrun_reporting (dev_priv, pipe, true); }
drivers/gpu/drm/i915/intel_dp.c +0 -12
@@ -2641,15 +2641,6 @@ static void intel_enable_dp(struct intel_encoder *encoder)if (IS_VALLEYVIEW (dev) ||IS_CHERRYVIEW (dev))vlv_init_panel_power_sequencer (intel_dp); -/* -* We get an occasional spurious underrun between the port -* enable and vdd enable, when enabling port A eDP. -* -* FIXME: Not sure if this applies to (PCH) port D eDP as well -*/ -if (port ==PORT_A ) -intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, false); -intel_dp_enable_port (intel_dp);if (port ==PORT_A &&IS_GEN5 (dev_priv)) {
@@ -2667,9 +2658,6 @@ static void intel_enable_dp(struct intel_encoder *encoder)edp_panel_on (intel_dp);edp_panel_vdd_off (intel_dp, true); -if (port ==PORT_A ) -intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, true); -pps_unlock (intel_dp);if (IS_VALLEYVIEW (dev) ||IS_CHERRYVIEW (dev)) {
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 1/3] drm/i915: Try to shut up more ILK underruns
Quoted 23 lines · On Fri, Apr 01, 2016 at 09:53:17PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Take a bigger hammer to the underrun suppression on ILK. Instead of trying to suppress them at specific points in the modeset sequence just silence them across the entire sequence. This gets rid of some underruns at least on my ILK. Note that this changes SNB and IVB to follow the same approach just to keep the code less convoluted. The difference is that on those platforms we won't suppress CPU underruns for port A since it doesn't seem to be necessary.
My ILK has port A eDP and two PCH HDMI ports, so I can't be sure this is as effective on other PCH port types. Perhaps we still need some of Daniel's extra vblank waits [2]?
I've still been able to trigger an underrun on the other pipe, but fixing that perhaps needs the LP1+ disable trick I implemented here [1] which never got merged.
A few details which hamper stress testing on my ILK are that sometimes the PCH transcoder gets messed up and refuses to shut down, and sometimes even the panel power sequencer apparently gets stuck on the always on position.
Quoted 8 lines
[1] https://lists.freedesktop.org/archives/intel-gfx/2014-March/041317.html
[2] https://lists.freedesktop.org/archives/intel-gfx/2016-January/086397.htmlv2: Add a note that we also get underruns when enabling PCH ports
Cc Daniel Vetter <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>Reviewed-by Daniel Vetter <[email protected]> (v1)
I've not been able to find any additional ILK hardware to test this on but LGTM
Quoted 153 lines
--- drivers/gpu/drm/i915/intel_display.c | 45 ++++++++++++++++++------------------ drivers/gpu/drm/i915/intel_dp.c | 12 ---------- 2 files changed, 23 insertions(+), 34 deletions(-)drivers/gpu/drm/i915/intel_display.c +23
-22@@ -4083,12 +4083,6 @@ static void ironlake_pch_enable(struct drm_crtc *crtc)I915_WRITE (FDI_RX_TUSIZE1 (pipe),I915_READ (PIPE_DATA_M1 (pipe)) &TU_SIZE_MASK ); -/* -* Sometimes spurious CPU pipe underruns happen during FDI -* training, at least with VGA+HDMI cloning. Suppress them. -*/ -intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, false); -/* For PCH output, training FDI link */ dev_priv->display.fdi_link_train (crtc);@@ -4123,8 +4117,6 @@ static void ironlake_pch_enable(struct drm_crtc *crtc)intel_fdi_normal_train (crtc); -intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, true); -/* For PCH DP, enable TRANS_DP_CTL */ if (HAS_PCH_CPT (dev) && intel_crtc->config->has_dp_encoder) { const struct drm_display_mode *adjusted_mode =@@ -4727,6 +4719,18 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)if (WARN_ON (intel_crtc->active))return ; +/* +* Sometimes spurious CPU pipe underruns happen during FDI +* training, at least with VGA+HDMI cloning. Suppress them. +* +* On ILK we get an occasional spurious CPU pipe underruns +* between eDP port A enable and vdd enable. Also PCH port +* enable seems to result in the occasional CPU pipe underrun. +* +* Spurious PCH underruns also occur during PCH enabling. +*/ +if (intel_crtc->config->has_pch_encoder ||IS_GEN5 (dev_priv)) +intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, false);if (intel_crtc->config->has_pch_encoder)intel_set_pch_fifo_underrun_reporting (dev_priv, pipe, false);@@ -4748,8 +4752,6 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc) intel_crtc->active = true; -intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, true); -for_each_encoder_on_crtc (dev, crtc, encoder)if (encoder->pre_enable) encoder->pre_enable (encoder);@@ -4791,6 +4793,7 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)/* Must wait for vblank to avoid spurious PCH FIFO underruns */ if (intel_crtc->config->has_pch_encoder)intel_wait_for_vblank (dev, pipe); +intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, true);intel_set_pch_fifo_underrun_reporting (dev_priv, pipe, true); }@@ -4943,8 +4946,15 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)struct intel_encoder *encoder;int pipe = intel_crtc->pipe; -if (intel_crtc->config->has_pch_encoder) +/* +* Sometimes spurious CPU pipe underruns happen when the +* pipe is already disabled, but FDI RX/TX is still enabled. +* Happens at least with VGA+HDMI cloning. Suppress them. +*/ +if (intel_crtc->config->has_pch_encoder) { +intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, false);intel_set_pch_fifo_underrun_reporting (dev_priv, pipe, false); + }for_each_encoder_on_crtc (dev, crtc, encoder) encoder->disable (encoder);@@ -4952,22 +4962,12 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)drm_crtc_vblank_off (crtc);assert_vblank_disabled (crtc); -/* -* Sometimes spurious CPU pipe underruns happen when the -* pipe is already disabled, but FDI RX/TX is still enabled. -* Happens at least with VGA+HDMI cloning. Suppress them. -*/ -if (intel_crtc->config->has_pch_encoder) -intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, false); -intel_disable_pipe (intel_crtc);ironlake_pfit_disable (intel_crtc, false); -if (intel_crtc->config->has_pch_encoder) { +if (intel_crtc->config->has_pch_encoder)ironlake_fdi_disable (crtc); -intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, true); - }for_each_encoder_on_crtc (dev, crtc, encoder)if (encoder->post_disable)@@ -4997,6 +4997,7 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)ironlake_fdi_pll_disable (intel_crtc); } +intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, true);intel_set_pch_fifo_underrun_reporting (dev_priv, pipe, true); }drivers/gpu/drm/i915/intel_dp.c +0
-12@@ -2641,15 +2641,6 @@ static void intel_enable_dp(struct intel_encoder *encoder)if (IS_VALLEYVIEW (dev) ||IS_CHERRYVIEW (dev))vlv_init_panel_power_sequencer (intel_dp); -/* -* We get an occasional spurious underrun between the port -* enable and vdd enable, when enabling port A eDP. -* -* FIXME: Not sure if this applies to (PCH) port D eDP as well -*/ -if (port ==PORT_A ) -intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, false); -intel_dp_enable_port (intel_dp);if (port ==PORT_A &&IS_GEN5 (dev_priv)) {@@ -2667,9 +2658,6 @@ static void intel_enable_dp(struct intel_encoder *encoder)edp_panel_on (intel_dp);edp_panel_vdd_off (intel_dp, true); -if (port ==PORT_A ) -intel_set_cpu_fifo_underrun_reporting (dev_priv, pipe, true); -pps_unlock (intel_dp);if (IS_VALLEYVIEW (dev) ||IS_CHERRYVIEW (dev)) {Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Intel Sweden AB Registered Office: Knarrarnasgatan 15, 164 40 Kista, Stockholm, Sweden Registration Number: 556189-6027 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 drm/i915: Make sure LP1+ watermarks levels are preserved when going from 1 to 2 pipes
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Once again ILK is unhappy if we clear out the LP1+ watermark levels outright, and instead we must disable the levels we don't want while still leaving the actual programmed watermark levels intact.
Fixes underruns on the already enabled pipe when programming watermarks while enabling the second pipe.
Cc: Daniel Vetter <[email protected]>
Cc: Matt Roper <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93787
--- drivers/gpu/drm/i915/intel_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +1 -1
@@ -2483,7 +2483,7 @@ static void ilk_wm_merge(struct drm_device *dev,/* ILK/SNB/IVB: LP1+ watermarks only w/ single pipe */ if ((INTEL_INFO (dev)->gen <=6 ||IS_IVYBRIDGE (dev)) && config->num_pipes_active >1 ) -return ; + last_enabled_level =0 ;/* ILK: FBC WM must be disabled always */ merged->fbc_wm_enabled =INTEL_INFO (dev)->gen >=6 ;
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/3] drm/i915: Make sure LP1+ watermarks levels are preserved when going from 1 to 2 pipes
Quoted 6 lines · On Fri, Apr 01, 2016 at 09:53:18PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Once again ILK is unhappy if we clear out the LP1+ watermark levels outright, and instead we must disable the levels we don't want while still leaving the actual programmed watermark levels intact.
Quoted 7 lines
Fixes underruns on the already enabled pipe when programming watermarks while enabling the second pipe.
Cc: Daniel Vetter <[email protected]>
Cc: Matt Roper <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93787Signed-off-by Ville Syrjälä <[email protected]>
Quoted 24 lines
--- drivers/gpu/drm/i915/intel_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_pm.c +1
-1@@ -2483,7 +2483,7 @@ static void ilk_wm_merge(struct drm_device *dev,/* ILK/SNB/IVB: LP1+ watermarks only w/ single pipe */ if ((INTEL_INFO (dev)->gen <=6 ||IS_IVYBRIDGE (dev)) && config->num_pipes_active >1 ) -return ; + last_enabled_level =0 ;/* ILK: FBC WM must be disabled always */ merged->fbc_wm_enabled =INTEL_INFO (dev)->gen >=6 ;Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Intel Sweden AB Registered Office: Knarrarnasgatan 15, 164 40 Kista, Stockholm, Sweden Registration Number: 556189-6027 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 drm/i915: Replace ILK eDP underrun suppression with something better
In reply to [email protected]From: Ville Syrjälä <[email protected]>
The underruns we were seeing when enabling eDP port A on ILK seem to have been caused by prematurely clearing the LP1+ watermark values when disabling LP1+ watermarks. Now that the watermarks are handled properly, we can rip out the underrun suppression around the port A enable.
We still need to worry about the underruns on FDI when enabling the eDP PLL. But as Bspec tells us, we can avoid that by a vblank wait on the pipe driving FDI just prior to enabling the eDP PLL.
--- drivers/gpu/drm/i915/intel_dp.c | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +9 -27
@@ -2215,6 +2215,15 @@ static void ironlake_edp_pll_on(struct intel_dp *intel_dp)POSTING_READ (DP_A );udelay (500 ); +/* +* [DevILK] Work around required when enabling DP PLL +* while a pipe is enabled going to FDI: +* 1. Wait for the start of vertical blank on the enabled pipe going to FDI +* 2. Program DP PLL enable +*/ +if (IS_GEN5 (dev_priv)) +intel_wait_for_vblank_if_active (dev_priv->dev, !crtc->pipe); + intel_dp->DP |=DP_PLL_ENABLE ;I915_WRITE (DP_A , intel_dp->DP);
@@ -2630,7 +2639,6 @@ static void intel_enable_dp(struct intel_encoder *encoder)struct drm_i915_private *dev_priv = dev->dev_private;struct intel_crtc *crtc =to_intel_crtc (encoder->base.crtc);uint32_t dp_reg =I915_READ (intel_dp->output_reg); -enum port port =dp_to_dig_port (intel_dp)->port;enum pipe pipe = crtc->pipe;if (WARN_ON (dp_reg &DP_PORT_EN ))
@@ -2643,17 +2651,6 @@ static void intel_enable_dp(struct intel_encoder *encoder)intel_dp_enable_port (intel_dp); -if (port ==PORT_A &&IS_GEN5 (dev_priv)) { -/* -* Underrun reporting for the other pipe was disabled in -* g4x_pre_enable_dp(). The eDP PLL and port have now been -* enabled, so it's now safe to re-enable underrun reporting. -*/ -intel_wait_for_vblank_if_active (dev_priv->dev, !pipe); -intel_set_cpu_fifo_underrun_reporting (dev_priv, !pipe, true); -intel_set_pch_fifo_underrun_reporting (dev_priv, !pipe, true); - } -edp_panel_vdd_on (intel_dp);edp_panel_on (intel_dp);edp_panel_vdd_off (intel_dp, true);
@@ -2699,26 +2696,11 @@ static void vlv_enable_dp(struct intel_encoder *encoder)static void g4x_pre_enable_dp (struct intel_encoder *encoder) { -struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);struct intel_dp *intel_dp =enc_to_intel_dp (&encoder->base);enum port port =dp_to_dig_port (intel_dp)->port; -enum pipe pipe =to_intel_crtc (encoder->base.crtc)->pipe;intel_dp_prepare (encoder); -if (port ==PORT_A &&IS_GEN5 (dev_priv)) { -/* -* We get FIFO underruns on the other pipe when -* enabling the CPU eDP PLL, and when enabling CPU -* eDP port. We could potentially avoid the PLL -* underrun with a vblank wait just prior to enabling -* the PLL, but that doesn't appear to help the port -* enable case. Just sweep it all under the rug. -*/ -intel_set_cpu_fifo_underrun_reporting (dev_priv, !pipe, false); -intel_set_pch_fifo_underrun_reporting (dev_priv, !pipe, false); - } -/* Only ilk+ has port A */ if (port ==PORT_A )ironlake_edp_pll_on (intel_dp);
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915: Replace ILK eDP underrun suppression with something better
Quoted 8 lines · On Fri, Apr 01, 2016 at 09:53:19PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
The underruns we were seeing when enabling eDP port A on ILK seem to have been caused by prematurely clearing the LP1+ watermark values when disabling LP1+ watermarks. Now that the watermarks are handled properly, we can rip out the underrun suppression around the port A enable.
Quoted 6 lines
We still need to worry about the underruns on FDI when enabling the eDP PLL. But as Bspec tells us, we can avoid that by a vblank wait on the pipe driving FDI just prior to enabling the eDP PLL.
Cc Daniel Vetter <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>
Quoted 84 lines
--- drivers/gpu/drm/i915/intel_dp.c | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-)drivers/gpu/drm/i915/intel_dp.c +9
-27@@ -2215,6 +2215,15 @@ static void ironlake_edp_pll_on(struct intel_dp *intel_dp)POSTING_READ (DP_A );udelay (500 ); +/* +* [DevILK] Work around required when enabling DP PLL +* while a pipe is enabled going to FDI: +* 1. Wait for the start of vertical blank on the enabled pipe going to FDI +* 2. Program DP PLL enable +*/ +if (IS_GEN5 (dev_priv)) +intel_wait_for_vblank_if_active (dev_priv->dev, !crtc->pipe); + intel_dp->DP |=DP_PLL_ENABLE ;I915_WRITE (DP_A , intel_dp->DP);@@ -2630,7 +2639,6 @@ static void intel_enable_dp(struct intel_encoder *encoder)struct drm_i915_private *dev_priv = dev->dev_private;struct intel_crtc *crtc =to_intel_crtc (encoder->base.crtc);uint32_t dp_reg =I915_READ (intel_dp->output_reg); -enum port port =dp_to_dig_port (intel_dp)->port;enum pipe pipe = crtc->pipe;if (WARN_ON (dp_reg &DP_PORT_EN ))@@ -2643,17 +2651,6 @@ static void intel_enable_dp(struct intel_encoder *encoder)intel_dp_enable_port (intel_dp); -if (port ==PORT_A &&IS_GEN5 (dev_priv)) { -/* -* Underrun reporting for the other pipe was disabled in -* g4x_pre_enable_dp(). The eDP PLL and port have now been -* enabled, so it's now safe to re-enable underrun reporting. -*/ -intel_wait_for_vblank_if_active (dev_priv->dev, !pipe); -intel_set_cpu_fifo_underrun_reporting (dev_priv, !pipe, true); -intel_set_pch_fifo_underrun_reporting (dev_priv, !pipe, true); - } -edp_panel_vdd_on (intel_dp);edp_panel_on (intel_dp);edp_panel_vdd_off (intel_dp, true);@@ -2699,26 +2696,11 @@ static void vlv_enable_dp(struct intel_encoder *encoder)static void g4x_pre_enable_dp (struct intel_encoder *encoder) { -struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);struct intel_dp *intel_dp =enc_to_intel_dp (&encoder->base);enum port port =dp_to_dig_port (intel_dp)->port; -enum pipe pipe =to_intel_crtc (encoder->base.crtc)->pipe;intel_dp_prepare (encoder); -if (port ==PORT_A &&IS_GEN5 (dev_priv)) { -/* -* We get FIFO underruns on the other pipe when -* enabling the CPU eDP PLL, and when enabling CPU -* eDP port. We could potentially avoid the PLL -* underrun with a vblank wait just prior to enabling -* the PLL, but that doesn't appear to help the port -* enable case. Just sweep it all under the rug. -*/ -intel_set_cpu_fifo_underrun_reporting (dev_priv, !pipe, false); -intel_set_pch_fifo_underrun_reporting (dev_priv, !pipe, false); - } -/* Only ilk+ has port A */ if (port ==PORT_A )ironlake_edp_pll_on (intel_dp);Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Intel Sweden AB Registered Office: Knarrarnasgatan 15, 164 40 Kista, Stockholm, Sweden Registration Number: 556189-6027 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915: Replace ILK eDP underrun suppression with something better
Quoted 9 lines · Patrik Jakobsson
Quoted 8 lines · On Fri, Apr 01, 2016 at 09:53:19PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
The underruns we were seeing when enabling eDP port A on ILK seem to have been caused by prematurely clearing the LP1+ watermark values when disabling LP1+ watermarks. Now that the watermarks are handled properly, we can rip out the underrun suppression around the port A enable.
Quoted 8 lines
Quoted 6 lines
We still need to worry about the underruns on FDI when enabling the eDP PLL. But as Bspec tells us, we can avoid that by a vblank wait on the pipe driving FDI just prior to enabling the eDP PLL.
Cc Daniel Vetter <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>Reviewed-by Patrik Jakobsson <[email protected]>
Series pushed to dinq. Thanks for the reviews.
Quoted 88 lines
Quoted 85 lines
--- drivers/gpu/drm/i915/intel_dp.c | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-)drivers/gpu/drm/i915/intel_dp.c +9
-27@@ -2215,6 +2215,15 @@ static void ironlake_edp_pll_on(struct intel_dp *intel_dp)POSTING_READ (DP_A );udelay (500 ); +/* +* [DevILK] Work around required when enabling DP PLL +* while a pipe is enabled going to FDI: +* 1. Wait for the start of vertical blank on the enabled pipe going to FDI +* 2. Program DP PLL enable +*/ +if (IS_GEN5 (dev_priv)) +intel_wait_for_vblank_if_active (dev_priv->dev, !crtc->pipe); + intel_dp->DP |=DP_PLL_ENABLE ;I915_WRITE (DP_A , intel_dp->DP);@@ -2630,7 +2639,6 @@ static void intel_enable_dp(struct intel_encoder *encoder)struct drm_i915_private *dev_priv = dev->dev_private;struct intel_crtc *crtc =to_intel_crtc (encoder->base.crtc);uint32_t dp_reg =I915_READ (intel_dp->output_reg); -enum port port =dp_to_dig_port (intel_dp)->port;enum pipe pipe = crtc->pipe;if (WARN_ON (dp_reg &DP_PORT_EN ))@@ -2643,17 +2651,6 @@ static void intel_enable_dp(struct intel_encoder *encoder)intel_dp_enable_port (intel_dp); -if (port ==PORT_A &&IS_GEN5 (dev_priv)) { -/* -* Underrun reporting for the other pipe was disabled in -* g4x_pre_enable_dp(). The eDP PLL and port have now been -* enabled, so it's now safe to re-enable underrun reporting. -*/ -intel_wait_for_vblank_if_active (dev_priv->dev, !pipe); -intel_set_cpu_fifo_underrun_reporting (dev_priv, !pipe, true); -intel_set_pch_fifo_underrun_reporting (dev_priv, !pipe, true); - } -edp_panel_vdd_on (intel_dp);edp_panel_on (intel_dp);edp_panel_vdd_off (intel_dp, true);@@ -2699,26 +2696,11 @@ static void vlv_enable_dp(struct intel_encoder *encoder)static void g4x_pre_enable_dp (struct intel_encoder *encoder) { -struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);struct intel_dp *intel_dp =enc_to_intel_dp (&encoder->base);enum port port =dp_to_dig_port (intel_dp)->port; -enum pipe pipe =to_intel_crtc (encoder->base.crtc)->pipe;intel_dp_prepare (encoder); -if (port ==PORT_A &&IS_GEN5 (dev_priv)) { -/* -* We get FIFO underruns on the other pipe when -* enabling the CPU eDP PLL, and when enabling CPU -* eDP port. We could potentially avoid the PLL -* underrun with a vblank wait just prior to enabling -* the PLL, but that doesn't appear to help the port -* enable case. Just sweep it all under the rug. -*/ -intel_set_cpu_fifo_underrun_reporting (dev_priv, !pipe, false); -intel_set_pch_fifo_underrun_reporting (dev_priv, !pipe, false); - } -/* Only ilk+ has port A */ if (port ==PORT_A )ironlake_edp_pll_on (intel_dp);Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 1 line
Intel Sweden AB Registered Office: Knarrarnasgatan 15, 164 40 Kista, Stockholm, Sweden Registration Number: 556189-6027
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: Exorcise ilk underruns
In reply to [email protected]== Series Details ==
== Series Details ==
Series: drm/i915: Exorcise ilk underruns
URL : https://patchwork.freedesktop.org/series/5193/
State : success
== Summary ==
Series 5193v1 drm/i915: Exorcise ilk underruns
http://patchwork.freedesktop.org/api/1.0/series/5193/revisions/1/mbox/
Test kms_flip:
Subgroup basic-flip-vs-wf_vblank:
fail -> PASS (snb-x220t)
fail -> PASS (ilk-hp8440p) UNSTABLEbdw-nuci7 total:196 pass:184 dwarn:0 dfail:0 fail:0 skip:12 bdw-ultra total:196 pass:175 dwarn:0 dfail:0 fail:0 skip:21 bsw-nuc-2 total:196 pass:159 dwarn:0 dfail:0 fail:0 skip:37 byt-nuc total:196 pass:161 dwarn:0 dfail:0 fail:0 skip:35 hsw-brixbox total:196 pass:174 dwarn:0 dfail:0 fail:0 skip:22 ilk-hp8440p total:196 pass:132 dwarn:0 dfail:0 fail:0 skip:64 ivb-t430s total:196 pass:171 dwarn:0 dfail:0 fail:0 skip:25 snb-dellxps total:196 pass:162 dwarn:0 dfail:0 fail:0 skip:34 snb-x220t total:196 pass:162 dwarn:0 dfail:0 fail:1 skip:33
Results at /archive/results/CI_IGT_test/Patchwork_1780/
ce3f49e2a53a54308ed171613c2567f04fab8228 drm-intel-nightly: 2016y-04m-01d-20h-30m-13s UTC integration manifest 8701c68b5638647e2dbd4664d76e52e78e5e16fb drm/i915: Replace ILK eDP underrun suppression with something better 167cd07c5de09ae92f0d7856c9c0ce9afde601b8 drm/i915: Make sure LP1+ watermarks levels are preserved when going from 1 to 2 pipes 5c2946c3a3fae641dc9460b231f533f8e7e562d3 drm/i915: Try to shut up more ILK underruns
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx