From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
Theodore Ts'o <tytso@mit.edu>,
DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Read WM before sanitize_encoder/crtc calls
Date: Thu, 10 Sep 2015 16:56:38 +0300 [thread overview]
Message-ID: <20150910135638.GI29811@intel.com> (raw)
In-Reply-To: <1438785998-19883-1-git-send-email-daniel.vetter@ffwll.ch>
On Wed, Aug 05, 2015 at 04:46:38PM +0200, Daniel Vetter wrote:
> If we shut down the crtc we might run into WM consistency checks which
> fail because we haven't yet read out the WM state. So do that before
> we sanitized the state.
>
> This fixes a WARNING in the ilk wm code which assumes that level 0 WM
> are always enabled in it's internal tracking. But since we start out
> with all 0 in our driver structures the relevant boolean is false when
> loading. This regression was introduced in
>
> commit 0b2ae6d72e445b58ae39cfa6ec0b8d3f53ff7a6f
> Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Date: Wed Oct 9 19:17:55 2013 +0300
>
> drm/i915: Add intel_pipe_wm and prepare for watermark pre-compute
>
> which added the WARN_ON(!r->enabel).
>
> Cc: Theodore Ts'o <tytso@mit.edu>
> Reported-by: Theodore Ts'o <tytso@mit.edu>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
> Re-ping for testing so that I can merge this patch and send a pull to
> Linus.
> -Daniel
> ---
> drivers/gpu/drm/i915/intel_display.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 30e0f54ba19d..ae07fd0c395c 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -15121,6 +15121,11 @@ void intel_modeset_setup_hw_state(struct drm_device *dev,
>
> intel_modeset_readout_hw_state(dev);
>
> + if (IS_GEN9(dev))
> + skl_wm_get_hw_state(dev);
> + else if (HAS_PCH_SPLIT(dev))
> + ilk_wm_get_hw_state(dev);
> +
So why not move it into intel_modeset_readout_hw_state()? Would seem
like the logical place for it.
> /*
> * Now that we have the config, copy it to each CRTC struct
> * Note that this could go away if we move to using crtc_config
> @@ -15162,11 +15167,6 @@ void intel_modeset_setup_hw_state(struct drm_device *dev,
> pll->on = false;
> }
>
> - if (IS_GEN9(dev))
> - skl_wm_get_hw_state(dev);
> - else if (HAS_PCH_SPLIT(dev))
> - ilk_wm_get_hw_state(dev);
> -
> if (force_restore) {
> i915_redisable_vga(dev);
>
> --
> 2.5.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2015-09-10 13:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-05 14:46 [PATCH] drm/i915: Read WM before sanitize_encoder/crtc calls Daniel Vetter
2015-09-10 13:56 ` Ville Syrjälä [this message]
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=20150910135638.GI29811@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tytso@mit.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox