From: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: ville.syrjala@intel.com, martin.peres@intel.com,
dri-devel@lists.freedesktop.org
Subject: [PATCH v2] Fix the possible watermark miswriting for skl+
Date: Tue, 13 Nov 2018 16:31:38 +0200 [thread overview]
Message-ID: <20181113143138.9536-1-stanislav.lisovskiy@intel.com> (raw)
Currently whenever we attempt to recalculate
watermarks, we assign dirty_pipes to zero,
then compare current wm results to the recalculated
one and if they changed we set correspondent dirty_pipes
bit again.
This can lead to situation, when we are clearing dirty_pipes,
same wm results twice in a row and not setting dirty_pipes
=> so that watermarks are not actually updated, which then might
lead to fifo underruns, crc mismatch and other issues.
Instead, whenever we detect that wm results are changed,
need to set correspondent dirty_pipes bit and clear it
only once the change is written, but not clear it everytime
we attempt to recalculate those in skl_compute_wm.
v2: Fixed commit message
Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
---
drivers/gpu/drm/i915/intel_pm.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index dc034617febb..f7fbc4bc0d43 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5441,9 +5441,6 @@ skl_compute_wm(struct drm_atomic_state *state)
bool changed = false;
int ret, i;
- /* Clear all dirty flags */
- results->dirty_pipes = 0;
-
ret = skl_ddb_add_affected_pipes(state, &changed);
if (ret || !changed)
return ret;
@@ -5496,6 +5493,7 @@ static void skl_atomic_update_crtc_wm(struct intel_atomic_state *state,
struct drm_i915_private *dev_priv = to_i915(state->base.dev);
struct skl_pipe_wm *pipe_wm = &cstate->wm.skl.optimal;
const struct skl_ddb_allocation *ddb = &state->wm_results.ddb;
+ struct skl_ddb_values *results = &state->wm_results;
enum pipe pipe = crtc->pipe;
enum plane_id plane_id;
@@ -5512,6 +5510,10 @@ static void skl_atomic_update_crtc_wm(struct intel_atomic_state *state,
skl_write_cursor_wm(crtc, &pipe_wm->planes[plane_id],
ddb);
}
+
+ /* Clear correspondent dirty bit */
+ results->dirty_pipes &= ~drm_crtc_mask(&crtc->base);
+
}
static void skl_initial_wm(struct intel_atomic_state *state,
--
2.17.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2018-11-13 14:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-13 14:31 Stanislav Lisovskiy [this message]
2018-11-13 16:40 ` [PATCH v2] Fix the possible watermark miswriting for skl+ Chris Wilson
2018-11-14 8:19 ` Lisovskiy, Stanislav
2018-11-14 11:09 ` Ville Syrjälä
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=20181113143138.9536-1-stanislav.lisovskiy@intel.com \
--to=stanislav.lisovskiy@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=martin.peres@intel.com \
--cc=ville.syrjala@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox