All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4.11] drm/i915: Do .init_clock_gating() earlier	to avoid it clobbering watermarks
Date: Thu, 16 Mar 2017 10:06:15 +0200	[thread overview]
Message-ID: <87r31xd4so.fsf@intel.com> (raw)
In-Reply-To: <20170315143158.31780-1-ville.syrjala@linux.intel.com>

On Wed, 15 Mar 2017, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Currently ILK-BDW explicitly disable LP1+ watermarks from their
> .init_clock_gating() hooks. Unfortunately that hook gets called way too
> late since by that time we've already initialized all the watermark
> state tracking which then gets out of sync with the hardware state.
>
> We may eventually want to consider killing off the explicit LP1+
> disable from .init_clock_gating(). In the meantime however, we can
> avoid the problem by reordering the init sequence such that
> intel_modeset_init_hw()->intel_init_clock_gating() gets called
> prior to the hardware state takeover.
>
> I suppose prior to the two stage watermark programming we were
> magically saved by something that forced the watermarks to be
> reprogrammed fully after .init_clock_gating() got called. But
> now that no longer happens.
>
> Note that the diff might look a bit odd as it kills off one
> call of intel_update_cdclk(), but that's fine because
> intel_modeset_init_hw() does the exact same thing. Previously
> we just did it twice.
>
> Actually even this new init sequence is pretty bogus as
> .init_clock_gating() really should be called before any gem
> hardware init since it can  configure various clock gating
> workarounds and whatnot that affect the GT side as well. Also
> intel_modeset_init() really should get split up into better
> defined init stages. Another "fun" detail is that
> intel_modeset_gem_init() is where RPS/RC6 gets configured.
> Why that is done from the display code is beyond me. I've
> decided to leave all this be for now, and just try to fix
> the init sequence enough for watermarks to work.
>
> Cc: stable@vger.kernel.org
> Cc: Gabriele Mazzotta <gabriele.mzt@gmail.com>
> Cc: David Purton <dcpurton@marshwiggle.net>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Reported-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
> Reported-by: David Purton <dcpurton@marshwiggle.net>
> Tested-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96645
> Fixes: ed4a6a7ca853 ("drm/i915: Add two-stage ILK-style watermark programming (v11)")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Link: http://patchwork.freedesktop.org/patch/msgid/20170220140443.30891-1-ville.syrjala@linux.intel.com
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Thanks, pushed to drm-intel-fixes.

BR,
Jani.


> ---
>  drivers/gpu/drm/i915/intel_display.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 01341670738f..70be773b3e70 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -16696,12 +16696,11 @@ int intel_modeset_init(struct drm_device *dev)
>  		}
>  	}
>  
> -	intel_update_czclk(dev_priv);
> -	intel_update_cdclk(dev_priv);
> -	dev_priv->atomic_cdclk_freq = dev_priv->cdclk_freq;
> -
>  	intel_shared_dpll_init(dev);
>  
> +	intel_update_czclk(dev_priv);
> +	intel_modeset_init_hw(dev);
> +
>  	if (dev_priv->max_cdclk_freq == 0)
>  		intel_update_max_cdclk(dev_priv);
>  
> @@ -17258,8 +17257,6 @@ void intel_modeset_gem_init(struct drm_device *dev)
>  
>  	intel_init_gt_powersave(dev_priv);
>  
> -	intel_modeset_init_hw(dev);
> -
>  	intel_setup_overlay(dev_priv);
>  }

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-03-16  8:06 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-13 16:14 Fixes that failed to backport to v4.11-rc1 Jani Nikula
2017-03-13 16:59 ` [PATCH 1/2] drm/i915: Split GEM resetting into 3 phases Chris Wilson
2017-03-13 16:59   ` [PATCH 2/2] drm/i915: Disable engine->irq_tasklet around resets Chris Wilson
2017-03-13 17:02 ` [PATCH] drm/i915: Only enable hotplug interrupts if the display interrupts are enabled Chris Wilson
2017-03-13 17:02   ` Chris Wilson
2017-03-15 20:39   ` Lyude Paul
2017-03-15 20:39     ` Lyude Paul
2017-03-13 17:04 ` [PATCH] drm/i915: Drop support for I915_EXEC_CONSTANTS_* execbuf parameters Chris Wilson
2017-03-13 17:06 ` [PATCH] drm/i915: Stop using RP_DOWN_EI on Baytrail Chris Wilson
2017-03-13 21:23 ` Fixes that failed to backport to v4.11-rc1 Chris Wilson
2017-03-14  7:41   ` Jani Nikula
2017-03-14 10:56     ` Jani Nikula
2017-03-15  9:24   ` Jani Nikula
2017-03-15  9:57     ` [PATCH] drm/i915/glk: Remove MODULE_FIRMWARE() tag from Geminilake's DMC Ander Conselvan de Oliveira
2017-03-15 10:44       ` Jani Nikula
2017-03-15 11:04     ` Fixes that failed to backport to v4.11-rc1 Ville Syrjälä
2017-03-15 14:31 ` [PATCH 4.11] drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks ville.syrjala
2017-03-16  8:06   ` Jani Nikula [this message]
2017-03-21 14:23 ` Fixes that failed to backport to v4.11-rc1 Jani Nikula
2017-03-21 14:45   ` [PATCH] drm/i915: Avoid rcu_barrier() from reclaim paths (shrinker) Chris Wilson
2017-03-21 14:47   ` [PATCH] drm/i915: make context status notifier head be per engine Chris Wilson
2017-03-21 14:48   ` Fixes that failed to backport to v4.11-rc1 Chris Wilson
2017-03-21 15:02     ` Jani Nikula
2017-03-29 10:45   ` Jani Nikula
2017-03-29 12:13     ` [PATCH] drm/i915/execlists: Wrap tail pointer after reset tweaking Chris Wilson
2017-03-29 12:13     ` Fixes that failed to backport to v4.11-rc1 Chris Wilson
2017-03-29 12:49       ` Jani Nikula
2017-04-11 12:21     ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r31xd4so.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.