drm/i915: Unify some modeset sequences v2
Subsystems (2)
cover drm/i915: Unify some modeset sequences v2
Reposting the whole set for clarity.
Changes from v1:
- Rebasing due to other changes
- Fixed sprite disable in ironlake_crtc_disable()
- Improved some commit messages
- More asserts
PATCH v2 1/9 drm/i915: Always load the display palette before enabling the pipe
From: Ville Syrjälä <[email protected]>
Loading the palette after the planes are enabled can risk showing incorrect colors. ILK+ already load the palette before even the pipe is enabled. Just follow the same order for gen2-4 and VLV.
According to BSpec the requirements for palette access are display core clock and display PLL running. In certain platforms just the core clock may be enough. But we definitely should have both running when this gets called during the modeset.
v2: Amend the commit message with some display PLL/core clock info
--- drivers/gpu/drm/i915/intel_display.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +4 -2
@@ -3615,10 +3615,11 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)/* Enable panel fitting for eDP */ i9xx_pfit_enable (intel_crtc); +intel_crtc_load_lut (crtc); +intel_enable_pipe (dev_priv, pipe, false);intel_enable_plane (dev_priv, plane, pipe); -intel_crtc_load_lut (crtc);intel_update_fbc (dev);/* Give the overlay scaler a chance to enable if it's on this pipe */
@@ -3654,12 +3655,13 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)/* Enable panel fitting for LVDS */ i9xx_pfit_enable (intel_crtc); +intel_crtc_load_lut (crtc); +intel_enable_pipe (dev_priv, pipe, false);intel_enable_plane (dev_priv, plane, pipe);if (IS_G4X (dev))g4x_fixup_plane (dev_priv, pipe); -intel_crtc_load_lut (crtc);intel_update_fbc (dev);/* Give the overlay scaler a chance to enable if it's on this pipe */
Signature · 6 lines
1.8.1.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v2 1/9] drm/i915: Always load the display palette before enabling the pipe
Quoted 57 lines · On Tue, Jun 4, 2013 at 7:48 AM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
Loading the palette after the planes are enabled can risk showing incorrect colors. ILK+ already load the palette before even the pipe is enabled. Just follow the same order for gen2-4 and VLV.
According to BSpec the requirements for palette access are display core clock and display PLL running. In certain platforms just the core clock may be enough. But we definitely should have both running when this gets called during the modeset.
v2: Amend the commit message with some display PLL/core clock info
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_display.c +4
-3@@ -3615,10 +3615,11 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)/* Enable panel fitting for eDP */ i9xx_pfit_enable (intel_crtc); +intel_crtc_load_lut (crtc); +intel_enable_pipe (dev_priv, pipe, false);intel_enable_plane (dev_priv, plane, pipe); -intel_crtc_load_lut (crtc);intel_update_fbc (dev);/* Give the overlay scaler a chance to enable if it's on this pipe */ @@ -3654,12 +3655,13 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)/* Enable panel fitting for LVDS */ i9xx_pfit_enable (intel_crtc); +intel_crtc_load_lut (crtc); +intel_enable_pipe (dev_priv, pipe, false);intel_enable_plane (dev_priv, plane, pipe);if (IS_G4X (dev))g4x_fixup_plane (dev_priv, pipe); -intel_crtc_load_lut (crtc);intel_update_fbc (dev);/* Give the overlay scaler a chance to enable if it's on this pipe */ --1.8.1.5
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
PATCH 2/9 drm/i915: Always enable the cursor right after the primary plane
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Follow the same sequence when enabling the cursor plane during modeset. No point in doing this stuff in different order on different generations.
This should also avoid a needless wait for vblank for the g4x cursor workaround when the cursor gets enabled anyway.
--- drivers/gpu/drm/i915/intel_display.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_display.c +4 -6
@@ -3216,6 +3216,7 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)intel_enable_pipe (dev_priv, pipe, intel_crtc->config.has_pch_encoder);intel_enable_plane (dev_priv, plane, pipe); +intel_crtc_update_cursor (crtc, true);if (intel_crtc->config.has_pch_encoder)ironlake_pch_enable (crtc);
@@ -3224,8 +3225,6 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)intel_update_fbc (dev);mutex_unlock (&dev->struct_mutex); -intel_crtc_update_cursor (crtc, true); -for_each_encoder_on_crtc (dev, crtc, encoder) encoder->enable (encoder);
@@ -3325,6 +3324,7 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)intel_enable_pipe (dev_priv, pipe, intel_crtc->config.has_pch_encoder);intel_enable_plane (dev_priv, plane, pipe); +intel_crtc_update_cursor (crtc, true);hsw_enable_ips (intel_crtc);
@@ -3335,8 +3335,6 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)intel_update_fbc (dev);mutex_unlock (&dev->struct_mutex); -intel_crtc_update_cursor (crtc, true); -for_each_encoder_on_crtc (dev, crtc, encoder) encoder->enable (encoder);
@@ -3619,12 +3617,12 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)intel_enable_pipe (dev_priv, pipe, false);intel_enable_plane (dev_priv, plane, pipe); +intel_crtc_update_cursor (crtc, true);intel_update_fbc (dev);/* Give the overlay scaler a chance to enable if it's on this pipe */ intel_crtc_dpms_overlay (intel_crtc, true); -intel_crtc_update_cursor (crtc, true);mutex_unlock (&dev_priv->dpio_lock); }
@@ -3659,6 +3657,7 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)intel_enable_pipe (dev_priv, pipe, false);intel_enable_plane (dev_priv, plane, pipe); +intel_crtc_update_cursor (crtc, true);if (IS_G4X (dev))g4x_fixup_plane (dev_priv, pipe);
@@ -3666,7 +3665,6 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)/* Give the overlay scaler a chance to enable if it's on this pipe */ intel_crtc_dpms_overlay (intel_crtc, true); -intel_crtc_update_cursor (crtc, true);for_each_encoder_on_crtc (dev, crtc, encoder) encoder->enable (encoder);
Signature · 6 lines
1.8.1.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/9] drm/i915: Always enable the cursor right after the primary plane
Quoted 90 lines · On Tue, Jun 4, 2013 at 7:49 AM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
Follow the same sequence when enabling the cursor plane during modeset. No point in doing this stuff in different order on different generations.
This should also avoid a needless wait for vblank for the g4x cursor workaround when the cursor gets enabled anyway.
Acked-by Egbert Eich <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/intel_display.c +4
-7@@ -3216,6 +3216,7 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)intel_enable_pipe (dev_priv, pipe, intel_crtc->config.has_pch_encoder);intel_enable_plane (dev_priv, plane, pipe); +intel_crtc_update_cursor (crtc, true);if (intel_crtc->config.has_pch_encoder)ironlake_pch_enable (crtc);@@ -3224,8 +3225,6 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)intel_update_fbc (dev);mutex_unlock (&dev->struct_mutex); -intel_crtc_update_cursor (crtc, true); -for_each_encoder_on_crtc (dev, crtc, encoder) encoder->enable (encoder);@@ -3325,6 +3324,7 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)intel_enable_pipe (dev_priv, pipe, intel_crtc->config.has_pch_encoder);intel_enable_plane (dev_priv, plane, pipe); +intel_crtc_update_cursor (crtc, true);hsw_enable_ips (intel_crtc);@@ -3335,8 +3335,6 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)intel_update_fbc (dev);mutex_unlock (&dev->struct_mutex); -intel_crtc_update_cursor (crtc, true); -for_each_encoder_on_crtc (dev, crtc, encoder) encoder->enable (encoder);@@ -3619,12 +3617,12 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)intel_enable_pipe (dev_priv, pipe, false);intel_enable_plane (dev_priv, plane, pipe); +intel_crtc_update_cursor (crtc, true);intel_update_fbc (dev);/* Give the overlay scaler a chance to enable if it's on this pipe */ intel_crtc_dpms_overlay (intel_crtc, true); -intel_crtc_update_cursor (crtc, true);mutex_unlock (&dev_priv->dpio_lock); }@@ -3659,6 +3657,7 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)intel_enable_pipe (dev_priv, pipe, false);intel_enable_plane (dev_priv, plane, pipe); +intel_crtc_update_cursor (crtc, true);if (IS_G4X (dev))g4x_fixup_plane (dev_priv, pipe);@@ -3666,7 +3665,6 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)/* Give the overlay scaler a chance to enable if it's on this pipe */ intel_crtc_dpms_overlay (intel_crtc, true); -intel_crtc_update_cursor (crtc, true);for_each_encoder_on_crtc (dev, crtc, encoder) encoder->enable (encoder); --1.8.1.5
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
PATCH 3/9 drm/i915: Enable the overlay right after primary and cursor planes
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Again follow the same sequence for all generations, because doing otherwise just doesn't make sense.
--- drivers/gpu/drm/i915/intel_display.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_display.c +4 -4
@@ -3619,11 +3619,11 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)intel_enable_plane (dev_priv, plane, pipe);intel_crtc_update_cursor (crtc, true); -intel_update_fbc (dev); -/* Give the overlay scaler a chance to enable if it's on this pipe */ intel_crtc_dpms_overlay (intel_crtc, true); +intel_update_fbc (dev); +mutex_unlock (&dev_priv->dpio_lock); }
@@ -3661,11 +3661,11 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)if (IS_G4X (dev))g4x_fixup_plane (dev_priv, pipe); -intel_update_fbc (dev); -/* Give the overlay scaler a chance to enable if it's on this pipe */ intel_crtc_dpms_overlay (intel_crtc, true); +intel_update_fbc (dev); +for_each_encoder_on_crtc (dev, crtc, encoder) encoder->enable (encoder); }
Signature · 6 lines
1.8.1.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/9] drm/i915: Enable the overlay right after primary and cursor planes
Quoted 49 lines · On Tue, Jun 4, 2013 at 7:49 AM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
Again follow the same sequence for all generations, because doing otherwise just doesn't make sense.
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_display.c +4
-5@@ -3619,11 +3619,11 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)intel_enable_plane (dev_priv, plane, pipe);intel_crtc_update_cursor (crtc, true); -intel_update_fbc (dev); -/* Give the overlay scaler a chance to enable if it's on this pipe */ intel_crtc_dpms_overlay (intel_crtc, true); +intel_update_fbc (dev); +mutex_unlock (&dev_priv->dpio_lock); }@@ -3661,11 +3661,11 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)if (IS_G4X (dev))g4x_fixup_plane (dev_priv, pipe); -intel_update_fbc (dev); -/* Give the overlay scaler a chance to enable if it's on this pipe */ intel_crtc_dpms_overlay (intel_crtc, true); +intel_update_fbc (dev); +for_each_encoder_on_crtc (dev, crtc, encoder) encoder->enable (encoder); } --1.8.1.5
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
PATCH v2 4/9 drm/i915: Follow the same sequence when disabling planes
In reply to [email protected]From: Ville Syrjälä <[email protected]>
First disable FBC, then IPS, then disable all planes, and finally disable the pipe.
v2: Mention IPS in the commit message
--- drivers/gpu/drm/i915/intel_display.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_display.c +7 -6
@@ -3383,13 +3383,13 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)intel_crtc_wait_for_pending_flips (crtc);drm_vblank_off (dev, pipe); -intel_crtc_update_cursor (crtc, false); - -intel_disable_plane (dev_priv, plane, pipe);if (dev_priv->cfb_plane == plane)intel_disable_fbc (dev); +intel_crtc_update_cursor (crtc, false); +intel_disable_plane (dev_priv, plane, pipe); +intel_set_pch_fifo_underrun_reporting (dev, pipe, false);intel_disable_pipe (dev_priv, pipe);
@@ -3462,7 +3462,6 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)intel_crtc_wait_for_pending_flips (crtc);drm_vblank_off (dev, pipe); -intel_crtc_update_cursor (crtc, false);/* FBC must be disabled before disabling the plane on HSW. */ if (dev_priv->cfb_plane == plane)
@@ -3470,6 +3469,7 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)hsw_disable_ips (intel_crtc); +intel_crtc_update_cursor (crtc, false);intel_disable_plane (dev_priv, plane, pipe);if (intel_crtc->config.has_pch_encoder)
@@ -3703,13 +3703,14 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)/* Give the overlay scaler a chance to disable if it's on this pipe */ intel_crtc_wait_for_pending_flips (crtc);drm_vblank_off (dev, pipe); -intel_crtc_dpms_overlay (intel_crtc, false); -intel_crtc_update_cursor (crtc, false);if (dev_priv->cfb_plane == plane)intel_disable_fbc (dev); +intel_crtc_dpms_overlay (intel_crtc, false); +intel_crtc_update_cursor (crtc, false);intel_disable_plane (dev_priv, plane, pipe); +intel_disable_pipe (dev_priv, pipe);i9xx_pfit_disable (intel_crtc);
Signature · 6 lines
1.8.1.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v2 4/9] drm/i915: Follow the same sequence when disabling planes
Quoted 73 lines · On Tue, Jun 4, 2013 at 7:49 AM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
First disable FBC, then IPS, then disable all planes, and finally disable the pipe.
v2: Mention IPS in the commit message
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/intel_display.c +7
-7@@ -3383,13 +3383,13 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)intel_crtc_wait_for_pending_flips (crtc);drm_vblank_off (dev, pipe); -intel_crtc_update_cursor (crtc, false); - -intel_disable_plane (dev_priv, plane, pipe);if (dev_priv->cfb_plane == plane)intel_disable_fbc (dev); +intel_crtc_update_cursor (crtc, false); +intel_disable_plane (dev_priv, plane, pipe); +intel_set_pch_fifo_underrun_reporting (dev, pipe, false);intel_disable_pipe (dev_priv, pipe);@@ -3462,7 +3462,6 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)intel_crtc_wait_for_pending_flips (crtc);drm_vblank_off (dev, pipe); -intel_crtc_update_cursor (crtc, false);/* FBC must be disabled before disabling the plane on HSW. */ if (dev_priv->cfb_plane == plane)@@ -3470,6 +3469,7 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)hsw_disable_ips (intel_crtc); +intel_crtc_update_cursor (crtc, false);intel_disable_plane (dev_priv, plane, pipe);if (intel_crtc->config.has_pch_encoder)@@ -3703,13 +3703,14 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)/* Give the overlay scaler a chance to disable if it's on this pipe */ intel_crtc_wait_for_pending_flips (crtc);drm_vblank_off (dev, pipe); -intel_crtc_dpms_overlay (intel_crtc, false); -intel_crtc_update_cursor (crtc, false);if (dev_priv->cfb_plane == plane)intel_disable_fbc (dev); +intel_crtc_dpms_overlay (intel_crtc, false); +intel_crtc_update_cursor (crtc, false);intel_disable_plane (dev_priv, plane, pipe); +intel_disable_pipe (dev_priv, pipe);i9xx_pfit_disable (intel_crtc); --1.8.1.5
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
PATCH 5/9 drm/i915: Drop overlay DPMS call from valleyview_crtc_enable
In reply to [email protected]From: Ville Syrjälä <[email protected]>
VLV doesn't have the old video overlay.
--- drivers/gpu/drm/i915/intel_display.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/i915/intel_display.c +0 -3
@@ -3619,9 +3619,6 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)intel_enable_plane (dev_priv, plane, pipe);intel_crtc_update_cursor (crtc, true); -/* Give the overlay scaler a chance to enable if it's on this pipe */ -intel_crtc_dpms_overlay (intel_crtc, true); -intel_update_fbc (dev);mutex_unlock (&dev_priv->dpio_lock);
Signature · 6 lines
1.8.1.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 5/9] drm/i915: Drop overlay DPMS call from valleyview_crtc_enable
just curious/trying to learn more: how do you know it doesn't have?
but if it doesn't feel free to use:
Quoted 30 lines · On Tue, Jun 4, 2013 at 7:49 AM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
VLV doesn't have the old video overlay.
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 3 --- 1 file changed, 3 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-4@@ -3619,9 +3619,6 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)intel_enable_plane (dev_priv, plane, pipe);intel_crtc_update_cursor (crtc, true); -/* Give the overlay scaler a chance to enable if it's on this pipe */ -intel_crtc_dpms_overlay (intel_crtc, true); -intel_update_fbc (dev);mutex_unlock (&dev_priv->dpio_lock); --1.8.1.5
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
Re: [PATCH 5/9] drm/i915: Drop overlay DPMS call from valleyview_crtc_enable
Quoted 1 line · Rodrigo Vivi
just curious/trying to learn more: how do you know it doesn't have?
Because the hardware designers hate me and don't want to give me nice toys :)
Seriously though, the spec doesn't have it so I have to assume it's really gone. And we got the sprite planes in exchange. Not the best trade in my opinion, but what can you do.
Quoted 41 lines
but if it doesn't feel free to use:
Reviewed-by Rodrigo Vivi <[email protected]>Quoted 30 lines · On Tue, Jun 4, 2013 at 7:49 AM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
VLV doesn't have the old video overlay.
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 3 --- 1 file changed, 3 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-4@@ -3619,9 +3619,6 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)intel_enable_plane (dev_priv, plane, pipe);intel_crtc_update_cursor (crtc, true); -/* Give the overlay scaler a chance to enable if it's on this pipe */ -intel_crtc_dpms_overlay (intel_crtc, true); -intel_update_fbc (dev);mutex_unlock (&dev_priv->dpio_lock); --1.8.1.5
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
Signature · 2 lines
Ville Syrjälä Intel OTC
PATCH v2 6/9 drm/i915: Disable/restore all sprite planes around modeset
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Disable/restore sprite planes around mode-set just like we do for the primary and cursor planes. Now that we have working sprite clipping, this actually works quite decently.
Previosuly we didn't even bother to disable sprites when changing mode, which could lead to a corrupted sprite appearing on the screen after a modeset (at least on my IVB). Not sure if all hardware generations would be so forgiving when enabled sprites end up outside the pipe dimensons.
v2: Disable rather than enable sprites in ironlake_crtc_disable()
--- drivers/gpu/drm/i915/intel_display.c | 29 +++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_sprite.c | 8 ++++++++ 3 files changed, 38 insertions(+)
drivers/gpu/drm/i915/intel_display.c +29 -0
@@ -3161,6 +3161,28 @@ static void ironlake_pfit_enable(struct intel_crtc *crtc) } } +static void intel_enable_planes (struct drm_crtc *crtc) +{ +struct drm_device *dev = crtc->dev; +enum pipe pipe =to_intel_crtc (crtc)->pipe; +struct intel_plane *intel_plane; + +list_for_each_entry (intel_plane, &dev->mode_config.plane_list, base.head) +if (intel_plane->pipe == pipe) +intel_plane_restore (&intel_plane->base); +} + +static void intel_disable_planes (struct drm_crtc *crtc) +{ +struct drm_device *dev = crtc->dev; +enum pipe pipe =to_intel_crtc (crtc)->pipe; +struct intel_plane *intel_plane; + +list_for_each_entry (intel_plane, &dev->mode_config.plane_list, base.head) +if (intel_plane->pipe == pipe) +intel_plane_disable (&intel_plane->base); +} +static void ironlake_crtc_enable (struct drm_crtc *crtc) {struct drm_device *dev = crtc->dev;
@@ -3216,6 +3238,7 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)intel_enable_pipe (dev_priv, pipe, intel_crtc->config.has_pch_encoder);intel_enable_plane (dev_priv, plane, pipe); +intel_enable_planes (crtc);intel_crtc_update_cursor (crtc, true);if (intel_crtc->config.has_pch_encoder)
@@ -3324,6 +3347,7 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)intel_enable_pipe (dev_priv, pipe, intel_crtc->config.has_pch_encoder);intel_enable_plane (dev_priv, plane, pipe); +intel_enable_planes (crtc);intel_crtc_update_cursor (crtc, true);hsw_enable_ips (intel_crtc);
@@ -3388,6 +3412,7 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)intel_disable_fbc (dev);intel_crtc_update_cursor (crtc, false); +intel_disable_planes (crtc);intel_disable_plane (dev_priv, plane, pipe);intel_set_pch_fifo_underrun_reporting (dev, pipe, false);
@@ -3470,6 +3495,7 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)hsw_disable_ips (intel_crtc);intel_crtc_update_cursor (crtc, false); +intel_disable_planes (crtc);intel_disable_plane (dev_priv, plane, pipe);if (intel_crtc->config.has_pch_encoder)
@@ -3617,6 +3643,7 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)intel_enable_pipe (dev_priv, pipe, false);intel_enable_plane (dev_priv, plane, pipe); +intel_enable_planes (crtc);intel_crtc_update_cursor (crtc, true);intel_update_fbc (dev);
@@ -3654,6 +3681,7 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)intel_enable_pipe (dev_priv, pipe, false);intel_enable_plane (dev_priv, plane, pipe); +intel_enable_planes (crtc);intel_crtc_update_cursor (crtc, true);if (IS_G4X (dev))g4x_fixup_plane (dev_priv, pipe);
@@ -3706,6 +3734,7 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)intel_crtc_dpms_overlay (intel_crtc, false);intel_crtc_update_cursor (crtc, false); +intel_disable_planes (crtc);intel_disable_plane (dev_priv, plane, pipe);intel_disable_pipe (dev_priv, pipe);
drivers/gpu/drm/i915/intel_drv.h +1 -0
@@ -633,6 +633,7 @@ extern void intel_connector_dpms(struct drm_connector *, int mode);extern bool intel_connector_get_hw_state (struct intel_connector *connector);extern void intel_modeset_check_state (struct drm_device *dev);extern void intel_plane_restore (struct drm_plane *plane); +extern void intel_plane_disable (struct drm_plane *plane);static inline struct intel_encoder *intel_attached_encoder (struct drm_connector *connector)
drivers/gpu/drm/i915/intel_sprite.c +8 -0
@@ -957,6 +957,14 @@ void intel_plane_restore(struct drm_plane *plane) intel_plane->src_w, intel_plane->src_h); } +void intel_plane_disable (struct drm_plane *plane) +{ +if (!plane->crtc || !plane->fb) +return ; + +intel_disable_plane (plane); +} +static const struct drm_plane_funcs intel_plane_funcs = { .update_plane = intel_update_plane, .disable_plane = intel_disable_plane,
Signature · 6 lines
1.8.1.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v2 6/9] drm/i915: Disable/restore all sprite planes around modeset
Quoted 147 lines · On Tue, Jun 4, 2013 at 7:49 AM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
Disable/restore sprite planes around mode-set just like we do for the primary and cursor planes. Now that we have working sprite clipping, this actually works quite decently.
Previosuly we didn't even bother to disable sprites when changing mode, which could lead to a corrupted sprite appearing on the screen after a modeset (at least on my IVB). Not sure if all hardware generations would be so forgiving when enabled sprites end up outside the pipe dimensons.
v2: Disable rather than enable sprites in
ironlake_crtc_disable()Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 29 +++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_sprite.c | 8 ++++++++ 3 files changed, 38 insertions(+)drivers/gpu/drm/i915/intel_display.c +29
-0@@ -3161,6 +3161,28 @@ static void ironlake_pfit_enable(struct intel_crtc *crtc) } } +static void intel_enable_planes (struct drm_crtc *crtc) +{ +struct drm_device *dev = crtc->dev; +enum pipe pipe =to_intel_crtc (crtc)->pipe; +struct intel_plane *intel_plane; + +list_for_each_entry (intel_plane, &dev->mode_config.plane_list, base.head) +if (intel_plane->pipe == pipe) +intel_plane_restore (&intel_plane->base); +} + +static void intel_disable_planes (struct drm_crtc *crtc) +{ +struct drm_device *dev = crtc->dev; +enum pipe pipe =to_intel_crtc (crtc)->pipe; +struct intel_plane *intel_plane; + +list_for_each_entry (intel_plane, &dev->mode_config.plane_list, base.head) +if (intel_plane->pipe == pipe) +intel_plane_disable (&intel_plane->base); +} +static void ironlake_crtc_enable (struct drm_crtc *crtc) {struct drm_device *dev = crtc->dev;@@ -3216,6 +3238,7 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)intel_enable_pipe (dev_priv, pipe, intel_crtc->config.has_pch_encoder);intel_enable_plane (dev_priv, plane, pipe); +intel_enable_planes (crtc);intel_crtc_update_cursor (crtc, true);if (intel_crtc->config.has_pch_encoder)@@ -3324,6 +3347,7 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)intel_enable_pipe (dev_priv, pipe, intel_crtc->config.has_pch_encoder);intel_enable_plane (dev_priv, plane, pipe); +intel_enable_planes (crtc);intel_crtc_update_cursor (crtc, true);hsw_enable_ips (intel_crtc);@@ -3388,6 +3412,7 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)intel_disable_fbc (dev);intel_crtc_update_cursor (crtc, false); +intel_disable_planes (crtc);intel_disable_plane (dev_priv, plane, pipe);intel_set_pch_fifo_underrun_reporting (dev, pipe, false);@@ -3470,6 +3495,7 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)hsw_disable_ips (intel_crtc);intel_crtc_update_cursor (crtc, false); +intel_disable_planes (crtc);intel_disable_plane (dev_priv, plane, pipe);if (intel_crtc->config.has_pch_encoder)@@ -3617,6 +3643,7 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc)intel_enable_pipe (dev_priv, pipe, false);intel_enable_plane (dev_priv, plane, pipe); +intel_enable_planes (crtc);intel_crtc_update_cursor (crtc, true);intel_update_fbc (dev);@@ -3654,6 +3681,7 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)intel_enable_pipe (dev_priv, pipe, false);intel_enable_plane (dev_priv, plane, pipe); +intel_enable_planes (crtc);intel_crtc_update_cursor (crtc, true);if (IS_G4X (dev))g4x_fixup_plane (dev_priv, pipe);@@ -3706,6 +3734,7 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)intel_crtc_dpms_overlay (intel_crtc, false);intel_crtc_update_cursor (crtc, false); +intel_disable_planes (crtc);intel_disable_plane (dev_priv, plane, pipe);intel_disable_pipe (dev_priv, pipe);drivers/gpu/drm/i915/intel_drv.h +1
-0@@ -633,6 +633,7 @@ extern void intel_connector_dpms(struct drm_connector *, int mode);extern bool intel_connector_get_hw_state (struct intel_connector *connector);extern void intel_modeset_check_state (struct drm_device *dev);extern void intel_plane_restore (struct drm_plane *plane); +extern void intel_plane_disable (struct drm_plane *plane);static inline struct intel_encoder *intel_attached_encoder (struct drm_connector *connector)drivers/gpu/drm/i915/intel_sprite.c +8
-1@@ -957,6 +957,14 @@ void intel_plane_restore(struct drm_plane *plane) intel_plane->src_w, intel_plane->src_h); } +void intel_plane_disable (struct drm_plane *plane) +{ +if (!plane->crtc || !plane->fb) +return ; + +intel_disable_plane (plane); +} +static const struct drm_plane_funcs intel_plane_funcs = { .update_plane = intel_update_plane, .disable_plane = intel_disable_plane, --1.8.1.5
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
PATCH 7/9 drm/i915: Improve assert_planes_disabled()
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Ever since gen4 primary planes were fixed to pipes.
And for gen2-3, don't check plane B if it doesn't exist.
--- drivers/gpu/drm/i915/intel_display.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_display.c +4 -3
@@ -1102,12 +1102,13 @@ static void assert_plane(struct drm_i915_private *dev_priv,static void assert_planes_disabled (struct drm_i915_private *dev_priv,enum pipe pipe) { +struct drm_device *dev = dev_priv->dev;int reg, i;u32 val;int cur_pipe; -/* Planes are fixed to pipes on ILK+ */ -if (HAS_PCH_SPLIT (dev_priv->dev) ||IS_VALLEYVIEW (dev_priv->dev)) { +/* Primary planes are fixed to pipes on gen4+ */ +if (INTEL_INFO (dev)->gen >=4 ) { reg =DSPCNTR (pipe); val =I915_READ (reg); WARN((val & DISPLAY_PLANE_ENABLE),
@@ -1117,7 +1118,7 @@ static void assert_planes_disabled(struct drm_i915_private *dev_priv, }/* Need to check both planes against the pipe */ -for (i =0 ; i <2 ; i++) { +for (i =0 ; i <INTEL_INFO (dev)->num_pipes; i++) { reg =DSPCNTR (i); val =I915_READ (reg); cur_pipe = (val & DISPPLANE_SEL_PIPE_MASK) >>
Signature · 6 lines
1.8.1.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 7/9] drm/i915: Improve assert_planes_disabled()
Quoted 47 lines · On Tue, Jun 4, 2013 at 7:49 AM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
Ever since gen4 primary planes were fixed to pipes.
And for gen2-3, don't check plane B if it doesn't exist.
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_display.c +4
-4@@ -1102,12 +1102,13 @@ static void assert_plane(struct drm_i915_private *dev_priv,static void assert_planes_disabled (struct drm_i915_private *dev_priv,enum pipe pipe) { +struct drm_device *dev = dev_priv->dev;int reg, i;u32 val;int cur_pipe; -/* Planes are fixed to pipes on ILK+ */ -if (HAS_PCH_SPLIT (dev_priv->dev) ||IS_VALLEYVIEW (dev_priv->dev)) { +/* Primary planes are fixed to pipes on gen4+ */ +if (INTEL_INFO (dev)->gen >=4 ) { reg =DSPCNTR (pipe); val =I915_READ (reg); WARN((val & DISPLAY_PLANE_ENABLE),@@ -1117,7 +1118,7 @@ static void assert_planes_disabled(struct drm_i915_private *dev_priv, }/* Need to check both planes against the pipe */ -for (i =0 ; i <2 ; i++) { +for (i =0 ; i <INTEL_INFO (dev)->num_pipes; i++) { reg =DSPCNTR (i); val =I915_READ (reg); cur_pipe = (val & DISPPLANE_SEL_PIPE_MASK) >> --1.8.1.5
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
PATCH 8/9 drm/i915: Spruce up assert_sprites_disabled()
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Make assert_sprites_disabled() operational on all platforms where we currently have sprite support enabled.
--- drivers/gpu/drm/i915/intel_display.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/intel_display.c +19 -8
@@ -1132,19 +1132,30 @@ static void assert_planes_disabled(struct drm_i915_private *dev_priv,static void assert_sprites_disabled (struct drm_i915_private *dev_priv,enum pipe pipe) { +struct drm_device *dev = dev_priv->dev;int reg, i;u32 val; -if (!IS_VALLEYVIEW (dev_priv->dev)) -return ; - -/* Need to check both planes against the pipe */ -for (i =0 ; i < dev_priv->num_plane; i++) { - reg =SPCNTR (pipe, i); +if (IS_VALLEYVIEW (dev)) { +for (i =0 ; i < dev_priv->num_plane; i++) { + reg =SPCNTR (pipe, i); + val =I915_READ (reg); +WARN ((val &SP_ENABLE ), +"sprite %c assertion failure, should be off on pipe %c but is still active\n" , +sprite_name (pipe, i),pipe_name (pipe)); + } + }else if (INTEL_INFO (dev)->gen >=7 ) { + reg =SPRCTL (pipe); + val =I915_READ (reg); +WARN ((val &SPRITE_ENABLE ), +"sprite %c assertion failure, should be off on pipe %c but is still active\n" , +plane_name (pipe),pipe_name (pipe)); + }else if (INTEL_INFO (dev)->gen >=5 ) { + reg =DVSCNTR (pipe); val =I915_READ (reg); -WARN ((val &SP_ENABLE ), +WARN ((val &DVS_ENABLE ),"sprite %c assertion failure, should be off on pipe %c but is still active\n" , -sprite_name (pipe, i),pipe_name (pipe)); +plane_name (pipe),pipe_name (pipe)); } }
Signature · 6 lines
1.8.1.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 8/9] drm/i915: Spruce up assert_sprites_disabled()
Quoted 60 lines · On Tue, Jun 4, 2013 at 7:49 AM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
Make
assert_sprites_disabled()operational on all platforms where we currently have sprite support enabled.Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/intel_display.c +19
-9@@ -1132,19 +1132,30 @@ static void assert_planes_disabled(struct drm_i915_private *dev_priv,static void assert_sprites_disabled (struct drm_i915_private *dev_priv,enum pipe pipe) { +struct drm_device *dev = dev_priv->dev;int reg, i;u32 val; -if (!IS_VALLEYVIEW (dev_priv->dev)) -return ; - -/* Need to check both planes against the pipe */ -for (i =0 ; i < dev_priv->num_plane; i++) { - reg =SPCNTR (pipe, i); +if (IS_VALLEYVIEW (dev)) { +for (i =0 ; i < dev_priv->num_plane; i++) { + reg =SPCNTR (pipe, i); + val =I915_READ (reg); +WARN ((val &SP_ENABLE ), +"sprite %c assertion failure, should be off on pipe %c but is still active\n" , +sprite_name (pipe, i),pipe_name (pipe)); + } + }else if (INTEL_INFO (dev)->gen >=7 ) { + reg =SPRCTL (pipe); + val =I915_READ (reg); +WARN ((val &SPRITE_ENABLE ), +"sprite %c assertion failure, should be off on pipe %c but is still active\n" , +plane_name (pipe),pipe_name (pipe)); + }else if (INTEL_INFO (dev)->gen >=5 ) { + reg =DVSCNTR (pipe); val =I915_READ (reg); -WARN ((val &SP_ENABLE ), +WARN ((val &DVS_ENABLE ),"sprite %c assertion failure, should be off on pipe %c but is still active\n" , -sprite_name (pipe, i),pipe_name (pipe)); +plane_name (pipe),pipe_name (pipe)); } } --1.8.1.5
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
Re: [PATCH 8/9] drm/i915: Spruce up assert_sprites_disabled()
Quoted 9 lines · Rodrigo Vivi
Reviewed-by Rodrigo Vivi <[email protected]>Quoted 6 lines · On Tue, Jun 4, 2013 at 7:49 AM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
Make
assert_sprites_disabled()operational on all platforms where we currently have sprite support enabled.Signed-off-by Ville Syrjälä <[email protected]>
I guess we eventually need some more abstract hw state readout for planes, similar to what we have on the output routing side. But this is good enough for now, so merged.
-Daniel
Quoted 64 lines
Quoted 54 lines
--- drivers/gpu/drm/i915/intel_display.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/intel_display.c +19
-9@@ -1132,19 +1132,30 @@ static void assert_planes_disabled(struct drm_i915_private *dev_priv,static void assert_sprites_disabled (struct drm_i915_private *dev_priv,enum pipe pipe) { +struct drm_device *dev = dev_priv->dev;int reg, i;u32 val; -if (!IS_VALLEYVIEW (dev_priv->dev)) -return ; - -/* Need to check both planes against the pipe */ -for (i =0 ; i < dev_priv->num_plane; i++) { - reg =SPCNTR (pipe, i); +if (IS_VALLEYVIEW (dev)) { +for (i =0 ; i < dev_priv->num_plane; i++) { + reg =SPCNTR (pipe, i); + val =I915_READ (reg); +WARN ((val &SP_ENABLE ), +"sprite %c assertion failure, should be off on pipe %c but is still active\n" , +sprite_name (pipe, i),pipe_name (pipe)); + } + }else if (INTEL_INFO (dev)->gen >=7 ) { + reg =SPRCTL (pipe); + val =I915_READ (reg); +WARN ((val &SPRITE_ENABLE ), +"sprite %c assertion failure, should be off on pipe %c but is still active\n" , +plane_name (pipe),pipe_name (pipe)); + }else if (INTEL_INFO (dev)->gen >=5 ) { + reg =DVSCNTR (pipe); val =I915_READ (reg); -WARN ((val &SP_ENABLE ), +WARN ((val &DVS_ENABLE ),"sprite %c assertion failure, should be off on pipe %c but is still active\n" , -sprite_name (pipe, i),pipe_name (pipe)); +plane_name (pipe),pipe_name (pipe)); } } --1.8.1.5
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 6 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br _______________________________________________ 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
PATCH 9/9 drm/i915: Assert dpll running in intel_crtc_load_lut() on pre-PCH platforms
In reply to [email protected]From: Ville Syrjälä <[email protected]>
--- drivers/gpu/drm/i915/intel_display.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/intel_display.c +3 -0
@@ -6340,6 +6340,9 @@ void intel_crtc_load_lut(struct drm_crtc *crtc)if (!crtc->enabled || !intel_crtc->active)return ; +if (!HAS_PCH_SPLIT (dev_priv->dev)) +assert_pll_enabled (dev_priv, pipe); +/* use legacy palette for Ironlake */ if (HAS_PCH_SPLIT (dev)) palreg =LGC_PALETTE (pipe);
Signature · 6 lines
1.8.1.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 9/9] drm/i915: Assert dpll running in intel_crtc_load_lut() on pre-PCH platforms
why is this needed?
anyways: Reviewed-by: Rodrigo Vivi <[email protected]>
Quoted 28 lines · On Tue, Jun 4, 2013 at 7:49 AM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/i915/intel_display.c +3
-1@@ -6340,6 +6340,9 @@ void intel_crtc_load_lut(struct drm_crtc *crtc)if (!crtc->enabled || !intel_crtc->active)return ; +if (!HAS_PCH_SPLIT (dev_priv->dev)) +assert_pll_enabled (dev_priv, pipe); +/* use legacy palette for Ironlake */ if (HAS_PCH_SPLIT (dev)) palreg =LGC_PALETTE (pipe); --1.8.1.5
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
Re: [PATCH 9/9] drm/i915: Assert dpll running in intel_crtc_load_lut() on pre-PCH platforms
Quoted 1 line · Rodrigo Vivi
why is this needed?
The spec says that on some hardware you need to PLL running before you can poke at the palette registers. I didn't actually try to anger the hardware so I'm not really sure what would happen otherwise, but IIRC Jesse said something about a hard system hang...
Quoted 37 lines
anyways: Reviewed-by: Rodrigo Vivi <[email protected]>
Quoted 28 lines · On Tue, Jun 4, 2013 at 7:49 AM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/i915/intel_display.c +3
-1@@ -6340,6 +6340,9 @@ void intel_crtc_load_lut(struct drm_crtc *crtc)if (!crtc->enabled || !intel_crtc->active)return ; +if (!HAS_PCH_SPLIT (dev_priv->dev)) +assert_pll_enabled (dev_priv, pipe); +/* use legacy palette for Ironlake */ if (HAS_PCH_SPLIT (dev)) palreg =LGC_PALETTE (pipe); --1.8.1.5
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
Signature · 2 lines
Ville Syrjälä Intel OTC
Re: [PATCH 9/9] drm/i915: Assert dpll running in intel_crtc_load_lut() on pre-PCH platforms
Quoted 7 lines · Ville Syrjälä
Quoted 1 line · Rodrigo Vivi
why is this needed?
The spec says that on some hardware you need to PLL running before you can poke at the palette registers. I didn't actually try to anger the hardware so I'm not really sure what would happen otherwise, but IIRC Jesse said something about a hard system hang...
I've added this to the commit message and merged the entire pile. Thanks for patches&review.
-Daniel
Quoted 46 lines
Quoted 38 lines
anyways: Reviewed-by: Rodrigo Vivi <[email protected]>
Quoted 28 lines · On Tue, Jun 4, 2013 at 7:49 AM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/i915/intel_display.c +3
-1@@ -6340,6 +6340,9 @@ void intel_crtc_load_lut(struct drm_crtc *crtc)if (!crtc->enabled || !intel_crtc->active)return ; +if (!HAS_PCH_SPLIT (dev_priv->dev)) +assert_pll_enabled (dev_priv, pipe); +/* use legacy palette for Ironlake */ if (HAS_PCH_SPLIT (dev)) palreg =LGC_PALETTE (pipe); --1.8.1.5
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.brSignature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ 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
Re: [PATCH 9/9] drm/i915: Assert dpll running in intel_crtc_load_lut() on pre-PCH platforms
In reply to Rodrigo ViviQuoted 2 lines · Rodrigo Vivi
why is this needed?
anyways: Reviewed-by: Rodrigo Vivi <[email protected]>
An r-b is a formal statement like a s-o-b. From
Documentaion/SubmittingPatches:
Reviewer's statement of oversight
By offering my Reviewed-by: tag, I state that:
(a) I have carried out a technical review of this patch to evaluate its appropriateness and readiness for inclusion into the mainline kernel.
(b) Any problems, concerns, or questions relating to the patch have been communicated back to the submitter. I am satisfied with the submitter's response to my comments.
(c) While there may be things that could be improved with this submission, I believe that it is, at this time, (1) a worthwhile modification to the kernel, and (2) free of known issues which would argue against its inclusion.
(d) While I have reviewed the patch and believe it to be sound, I do not (unless explicitly stated elsewhere) make any warranties or guarantees that it will achieve its stated purpose or function properly in any given situation.
If you're asking "why is this needed?" it does _not_ deserve an r-b on a pretty fundamental level since it clearly violates c) 1) above.
Please don't just go through the motions when doing review.
Thanks, Daniel
Quoted 40 lines · On Tue, Jun 4, 2013 at 7:49 AM, <[email protected]> wrote:
Quoted 28 lines
From: Ville Syrjälä <[email protected]>
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/i915/intel_display.c +3
-1@@ -6340,6 +6340,9 @@ void intel_crtc_load_lut(struct drm_crtc *crtc)if (!crtc->enabled || !intel_crtc->active)return ; +if (!HAS_PCH_SPLIT (dev_priv->dev)) +assert_pll_enabled (dev_priv, pipe); +/* use legacy palette for Ironlake */ if (HAS_PCH_SPLIT (dev)) palreg =LGC_PALETTE (pipe); --1.8.1.5
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 6 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br _______________________________________________ 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