From: Matt Roper <matthew.d.roper@intel.com>
To: Lyude <cpaul@redhat.com>
Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Daniel Vetter" <daniel.vetter@intel.com>,
"Radhakrishna Sripada" <radhakrishna.sripada@intel.com>,
"Jani Nikula" <jani.nikula@linux.intel.com>,
"David Airlie" <airlied@linux.ie>,
"open list:INTEL DRM DRIVERS (excluding Poulsbo, Moorestow...),
linux-kernel@vger.kernel.org (open list)"
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 3/6] drm/i915/skl: Actually reuse wm values when pipes don't change
Date: Wed, 20 Jul 2016 16:26:50 -0700 [thread overview]
Message-ID: <20160720232650.GD1579@intel.com> (raw)
In-Reply-To: <1469048403-32016-4-git-send-email-cpaul@redhat.com>
On Wed, Jul 20, 2016 at 04:59:59PM -0400, Lyude wrote:
> Up until now we've actually been making the mistake of leaving the
> watermark results for each pipe completely blank in skl_compute_wm()
> when they haven't changed, fix this.
Should this be moved before patch #1? With the existing code we don't
try to re-write watermark registers if they aren't changing, so leaving
them at zero should be safe. I think we want to make this change before
we start re-writing non-dirty watermarks. Alternatively, we could just
add the dirty bit test to the appropriate places in patch #1 and not
worry about copying over the unchanged values.
Matt
>
> Fixes: 734fa01f3a17 ("drm/i915/gen9: Calculate watermarks during atomic 'check' (v2)")
> Cc: stable@vger.kernel.org
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> Cc: Hans de Goede <hdegoede@redhat.com> <cpaul@redhat.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Signed-off-by: Lyude <cpaul@redhat.com>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index b7d4af1..788db86 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3987,10 +3987,13 @@ skl_copy_wm_for_pipe(struct skl_wm_values *dst,
> static int
> skl_compute_wm(struct drm_atomic_state *state)
> {
> + struct drm_device *dev = state->dev;
> + struct drm_i915_private *dev_priv = to_i915(dev);
> struct drm_crtc *crtc;
> struct drm_crtc_state *cstate;
> struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
> struct skl_wm_values *results = &intel_state->wm_results;
> + struct skl_wm_values *hw_wm = &dev_priv->wm.skl_hw;
> struct skl_pipe_wm *pipe_wm;
> bool changed = false;
> int ret, i;
> @@ -4039,12 +4042,14 @@ skl_compute_wm(struct drm_atomic_state *state)
> if (changed)
> results->dirty_pipes |= drm_crtc_mask(crtc);
>
> - if ((results->dirty_pipes & drm_crtc_mask(crtc)) == 0)
> + if ((results->dirty_pipes & drm_crtc_mask(crtc)) == 0) {
> /* This pipe's WM's did not change */
> + skl_copy_wm_for_pipe(results, hw_wm, intel_crtc->pipe);
> continue;
> + }
>
> intel_cstate->update_wm_pre = true;
> - skl_compute_wm_results(crtc->dev, pipe_wm, results, intel_crtc);
> + skl_compute_wm_results(dev, pipe_wm, results, intel_crtc);
> }
>
> return 0;
> --
> 2.7.4
>
--
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
WARNING: multiple messages have this Message-ID (diff)
From: Matt Roper <matthew.d.roper@intel.com>
To: Lyude <cpaul@redhat.com>
Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Daniel Vetter" <daniel.vetter@intel.com>,
"Radhakrishna Sripada" <radhakrishna.sripada@intel.com>,
"Jani Nikula" <jani.nikula@linux.intel.com>,
"David Airlie" <airlied@linux.ie>,
"open list:INTEL DRM DRIVERS (excluding Poulsbo, Moorestow...),
linux-kernel@vger.kernel.org (open list)"
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 3/6] drm/i915/skl: Actually reuse wm values when pipes don't change
Date: Wed, 20 Jul 2016 16:26:50 -0700 [thread overview]
Message-ID: <20160720232650.GD1579@intel.com> (raw)
In-Reply-To: <1469048403-32016-4-git-send-email-cpaul@redhat.com>
On Wed, Jul 20, 2016 at 04:59:59PM -0400, Lyude wrote:
> Up until now we've actually been making the mistake of leaving the
> watermark results for each pipe completely blank in skl_compute_wm()
> when they haven't changed, fix this.
Should this be moved before patch #1? With the existing code we don't
try to re-write watermark registers if they aren't changing, so leaving
them at zero should be safe. I think we want to make this change before
we start re-writing non-dirty watermarks. Alternatively, we could just
add the dirty bit test to the appropriate places in patch #1 and not
worry about copying over the unchanged values.
Matt
>
> Fixes: 734fa01f3a17 ("drm/i915/gen9: Calculate watermarks during atomic 'check' (v2)")
> Cc: stable@vger.kernel.org
> Cc: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> Cc: Hans de Goede <hdegoede@redhat.com> <cpaul@redhat.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Signed-off-by: Lyude <cpaul@redhat.com>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index b7d4af1..788db86 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3987,10 +3987,13 @@ skl_copy_wm_for_pipe(struct skl_wm_values *dst,
> static int
> skl_compute_wm(struct drm_atomic_state *state)
> {
> + struct drm_device *dev = state->dev;
> + struct drm_i915_private *dev_priv = to_i915(dev);
> struct drm_crtc *crtc;
> struct drm_crtc_state *cstate;
> struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
> struct skl_wm_values *results = &intel_state->wm_results;
> + struct skl_wm_values *hw_wm = &dev_priv->wm.skl_hw;
> struct skl_pipe_wm *pipe_wm;
> bool changed = false;
> int ret, i;
> @@ -4039,12 +4042,14 @@ skl_compute_wm(struct drm_atomic_state *state)
> if (changed)
> results->dirty_pipes |= drm_crtc_mask(crtc);
>
> - if ((results->dirty_pipes & drm_crtc_mask(crtc)) == 0)
> + if ((results->dirty_pipes & drm_crtc_mask(crtc)) == 0) {
> /* This pipe's WM's did not change */
> + skl_copy_wm_for_pipe(results, hw_wm, intel_crtc->pipe);
> continue;
> + }
>
> intel_cstate->update_wm_pre = true;
> - skl_compute_wm_results(crtc->dev, pipe_wm, results, intel_crtc);
> + skl_compute_wm_results(dev, pipe_wm, results, intel_crtc);
> }
>
> return 0;
> --
> 2.7.4
>
--
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
next prev parent reply other threads:[~2016-07-20 23:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-20 20:59 [PATCH 0/6] drm/i915/skl: Finally fix watermarks Lyude
2016-07-20 20:59 ` Lyude
2016-07-20 20:59 ` [PATCH 1/6] drm/i915/skl: Update plane watermarks atomically during plane updates Lyude
2016-07-20 20:59 ` Lyude
2016-07-20 23:12 ` Matt Roper
2016-07-20 23:12 ` Matt Roper
2016-07-20 20:59 ` [PATCH 2/6] drm/i915/gen9: Only copy WM results for changed pipes to skl_hw Lyude
2016-07-20 20:59 ` Lyude
2016-07-20 23:13 ` Matt Roper
2016-07-20 20:59 ` [PATCH 3/6] drm/i915/skl: Actually reuse wm values when pipes don't change Lyude
2016-07-20 20:59 ` Lyude
2016-07-20 23:26 ` Matt Roper [this message]
2016-07-20 23:26 ` Matt Roper
2016-07-20 21:00 ` [PATCH 4/6] drm/i915/skl: Always wait for pipes to update after a flush Lyude
2016-07-20 21:00 ` Lyude
2016-07-21 0:27 ` Matt Roper
2016-07-21 0:27 ` Matt Roper
2016-07-21 17:01 ` Lyude Paul
2016-07-20 21:00 ` [PATCH 5/6] drm/i915/skl: Only flush pipes when we change the ddb allocation Lyude
2016-07-20 21:00 ` Lyude
2016-07-20 21:00 ` [PATCH 6/6] drm/i915/skl: Fix extra whitespace in skl_flush_wm_values() Lyude
2016-07-20 21:00 ` Lyude
2016-07-21 7:32 ` ✗ Ro.CI.BAT: failure for drm/i915/skl: Finally fix watermarks Patchwork
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=20160720232650.GD1579@intel.com \
--to=matthew.d.roper@intel.com \
--cc=airlied@linux.ie \
--cc=cpaul@redhat.com \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=radhakrishna.sripada@intel.com \
--cc=stable@vger.kernel.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.