* [PATCH] drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks
@ 2017-02-20 14:04 ville.syrjala
2017-02-20 16:22 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-03-02 20:22 ` Ville Syrjälä
0 siblings, 2 replies; 4+ messages in thread
From: ville.syrjala @ 2017-02-20 14:04 UTC (permalink / raw)
To: intel-gfx
Cc: stable, Gabriele Mazzotta, David Purton, Matt Roper,
Maarten Lankhorst
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>
---
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 730aee755c80..0466db16f193 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15028,12 +15028,11 @@ int intel_modeset_init(struct drm_device *dev)
}
}
- intel_update_czclk(dev_priv);
- intel_update_cdclk(dev_priv);
- dev_priv->cdclk.logical = dev_priv->cdclk.actual = dev_priv->cdclk.hw;
-
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);
@@ -15591,8 +15590,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);
}
--
2.10.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks
2017-02-20 14:04 [PATCH] drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks ville.syrjala
@ 2017-02-20 16:22 ` Patchwork
2017-03-02 20:22 ` Ville Syrjälä
1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-02-20 16:22 UTC (permalink / raw)
To: ville.syrjala; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks
URL : https://patchwork.freedesktop.org/series/19953/
State : success
== Summary ==
Series 19953v1 drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks
https://patchwork.freedesktop.org/api/1.0/series/19953/revisions/1/mbox/
fi-bdw-5557u total:253 pass:242 dwarn:0 dfail:0 fail:0 skip:11
fi-bsw-n3050 total:253 pass:214 dwarn:0 dfail:0 fail:0 skip:39
fi-bxt-j4205 total:253 pass:234 dwarn:0 dfail:0 fail:0 skip:19
fi-bxt-t5700 total:83 pass:70 dwarn:0 dfail:0 fail:0 skip:12
fi-byt-j1900 total:253 pass:226 dwarn:0 dfail:0 fail:0 skip:27
fi-byt-n2820 total:253 pass:222 dwarn:0 dfail:0 fail:0 skip:31
fi-hsw-4770 total:253 pass:237 dwarn:0 dfail:0 fail:0 skip:16
fi-hsw-4770r total:253 pass:237 dwarn:0 dfail:0 fail:0 skip:16
fi-ilk-650 total:253 pass:203 dwarn:0 dfail:0 fail:0 skip:50
fi-ivb-3520m total:253 pass:235 dwarn:0 dfail:0 fail:0 skip:18
fi-ivb-3770 total:253 pass:235 dwarn:0 dfail:0 fail:0 skip:18
fi-kbl-7500u total:253 pass:235 dwarn:0 dfail:0 fail:0 skip:18
fi-skl-6260u total:253 pass:243 dwarn:0 dfail:0 fail:0 skip:10
fi-skl-6700hq total:253 pass:236 dwarn:0 dfail:0 fail:0 skip:17
fi-skl-6700k total:253 pass:231 dwarn:4 dfail:0 fail:0 skip:18
fi-skl-6770hq total:253 pass:243 dwarn:0 dfail:0 fail:0 skip:10
fi-snb-2520m total:253 pass:225 dwarn:0 dfail:0 fail:0 skip:28
fi-snb-2600 total:253 pass:224 dwarn:0 dfail:0 fail:0 skip:29
9cdbb2744ab120d339614f41acb1ff3a2fbd8f80 drm-tip: 2017y-02m-20d-14h-54m-11s UTC integration manifest
935e08b drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3901/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks
2017-02-20 14:04 [PATCH] drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks ville.syrjala
@ 2017-03-02 20:22 ` Ville Syrjälä
2017-03-02 20:22 ` Ville Syrjälä
1 sibling, 0 replies; 4+ messages in thread
From: Ville Syrjälä @ 2017-03-02 20:22 UTC (permalink / raw)
To: intel-gfx; +Cc: Gabriele Mazzotta, David Purton, stable
On Mon, Feb 20, 2017 at 04:04:43PM +0200, 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>
Pushed to dinq with Daniel's irc r-b. Thanks.
19:22 < vsyrjala> anyone care to review https://patchwork.freedesktop.org/patch/139975/ ? would be one less bug to
worry about...
19:28 < danvet> vsyrjala, r-b
> ---
> 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 730aee755c80..0466db16f193 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -15028,12 +15028,11 @@ int intel_modeset_init(struct drm_device *dev)
> }
> }
>
> - intel_update_czclk(dev_priv);
> - intel_update_cdclk(dev_priv);
> - dev_priv->cdclk.logical = dev_priv->cdclk.actual = dev_priv->cdclk.hw;
> -
> 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);
>
> @@ -15591,8 +15590,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);
> }
>
> --
> 2.10.2
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks
@ 2017-03-02 20:22 ` Ville Syrjälä
0 siblings, 0 replies; 4+ messages in thread
From: Ville Syrjälä @ 2017-03-02 20:22 UTC (permalink / raw)
To: intel-gfx
Cc: stable, Gabriele Mazzotta, David Purton, Matt Roper,
Maarten Lankhorst
On Mon, Feb 20, 2017 at 04:04:43PM +0200, 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>
Pushed to dinq with Daniel's irc r-b. Thanks.
19:22 < vsyrjala> anyone care to review https://patchwork.freedesktop.org/patch/139975/ ? would be one less bug to
worry about...
19:28 < danvet> vsyrjala, r-b
> ---
> 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 730aee755c80..0466db16f193 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -15028,12 +15028,11 @@ int intel_modeset_init(struct drm_device *dev)
> }
> }
>
> - intel_update_czclk(dev_priv);
> - intel_update_cdclk(dev_priv);
> - dev_priv->cdclk.logical = dev_priv->cdclk.actual = dev_priv->cdclk.hw;
> -
> 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);
>
> @@ -15591,8 +15590,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);
> }
>
> --
> 2.10.2
--
Ville Syrj�l�
Intel OTC
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-02 20:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-20 14:04 [PATCH] drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks ville.syrjala
2017-02-20 16:22 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-03-02 20:22 ` [PATCH] " Ville Syrjälä
2017-03-02 20:22 ` Ville Syrjälä
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.