[Intel-gfx] [PATCH 2/5] drm/i915: Wait for vblank in hsw_enable_ips()
Rodrigo Vivi
rodrigo.vivi at gmail.com
Wed May 21 02:41:13 CEST 2014
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at gmail.com>
On Tue, Apr 15, 2014 at 11:41 AM, <ville.syrjala at linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Now that the vblank wait is gone from intel_enable_primary_plane(),
> hsw_enable_ips() needs to do the vblank wait itself.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 12 ++++++------
> drivers/gpu/drm/i915/intel_sprite.c | 5 +----
> 2 files changed, 7 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_display.c
> index 32c6c16..33d21bf 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3543,17 +3543,17 @@ static void intel_disable_planes(struct drm_crtc
> *crtc)
>
> void hsw_enable_ips(struct intel_crtc *crtc)
> {
> - struct drm_i915_private *dev_priv = crtc->base.dev->dev_private;
> + struct drm_device *dev = crtc->base.dev;
> + struct drm_i915_private *dev_priv = dev->dev_private;
>
> if (!crtc->config.ips_enabled)
> return;
>
> - /* We can only enable IPS after we enable a plane and wait for a
> vblank.
> - * We guarantee that the plane is enabled by calling
> intel_enable_ips
> - * only after intel_enable_plane. And intel_enable_plane already
> waits
> - * for a vblank, so all we need to do here is to enable the IPS
> bit. */
> + /* We can only enable IPS after we enable a plane and wait for a
> vblank */
> + intel_wait_for_vblank(dev, crtc->pipe);
> +
> assert_plane_enabled(dev_priv, crtc->plane);
> - if (IS_BROADWELL(crtc->base.dev)) {
> + if (IS_BROADWELL(dev)) {
> mutex_lock(&dev_priv->rps.hw_lock);
> WARN_ON(sandybridge_pcode_write(dev_priv,
> DISPLAY_IPS_CONTROL, 0xc0000000));
> mutex_unlock(&dev_priv->rps.hw_lock);
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c
> b/drivers/gpu/drm/i915/intel_sprite.c
> index 336ae6c..4df7245 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -540,10 +540,7 @@ intel_enable_primary(struct drm_crtc *crtc)
> * when going from primary only to sprite only and vice
> * versa.
> */
> - if (intel_crtc->config.ips_enabled) {
> - intel_wait_for_vblank(dev, intel_crtc->pipe);
> - hsw_enable_ips(intel_crtc);
> - }
> + hsw_enable_ips(intel_crtc);
>
> mutex_lock(&dev->struct_mutex);
> intel_update_fbc(dev);
> --
> 1.8.3.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
--
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20140520/c08de95e/attachment.html>
More information about the Intel-gfx
mailing list