From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/6] drm/i915: Reject async flips if we need to change DDB/watermarks
Date: Wed, 20 Mar 2024 18:04:20 +0200 [thread overview]
Message-ID: <20240320160424.700-3-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20240320160424.700-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
DDB/watermarks are always double buffered on the vblank, so we
can't safely change them during async flips. Currently this never
happens, but we'll be making changing between sync and async
flips a bit more flexible, in which case we can actually end up
here.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/skl_watermark.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
index bc341abcab2f..1fa416a70d51 100644
--- a/drivers/gpu/drm/i915/display/skl_watermark.c
+++ b/drivers/gpu/drm/i915/display/skl_watermark.c
@@ -2540,6 +2540,12 @@ skl_ddb_add_affected_planes(const struct intel_crtc_state *old_crtc_state,
&new_crtc_state->wm.skl.plane_ddb_y[plane_id]))
continue;
+ if (new_crtc_state->do_async_flip) {
+ drm_dbg_kms(&i915->drm, "[PLANE:%d:%s] Can't change DDB during async flip\n",
+ plane->base.base.id, plane->base.name);
+ return -EINVAL;
+ }
+
plane_state = intel_atomic_get_plane_state(state, plane);
if (IS_ERR(plane_state))
return PTR_ERR(plane_state);
@@ -2906,6 +2912,12 @@ static int skl_wm_add_affected_planes(struct intel_atomic_state *state,
&new_crtc_state->wm.skl.optimal))
continue;
+ if (new_crtc_state->do_async_flip) {
+ drm_dbg_kms(&i915->drm, "[PLANE:%d:%s] Can't change watermarks during async flip\n",
+ plane->base.base.id, plane->base.name);
+ return -EINVAL;
+ }
+
plane_state = intel_atomic_get_plane_state(state, plane);
if (IS_ERR(plane_state))
return PTR_ERR(plane_state);
--
2.43.2
next prev parent reply other threads:[~2024-03-20 16:04 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 16:04 [PATCH 0/6] drm/i915: Allow the first async flip to change modifier Ville Syrjala
2024-03-20 16:04 ` [PATCH 1/6] drm/i915: Align PLANE_SURF to 16k on ADL for async flips Ville Syrjala
2024-04-19 4:20 ` Murthy, Arun R
2024-04-19 16:08 ` Ville Syrjälä
2024-04-23 3:36 ` Murthy, Arun R
2024-03-20 16:04 ` Ville Syrjala [this message]
2024-04-19 4:27 ` [PATCH 2/6] drm/i915: Reject async flips if we need to change DDB/watermarks Murthy, Arun R
2024-04-19 16:25 ` Ville Syrjälä
2024-04-23 3:45 ` Murthy, Arun R
2024-04-19 6:31 ` Kulkarni, Vandita
2024-03-20 16:04 ` [PATCH 3/6] drm/i915: Allow the initial async flip to change modifier Ville Syrjala
2024-04-18 16:11 ` Kulkarni, Vandita
2024-03-20 16:04 ` [PATCH 4/6] drm/i915: Eliminate extra frame from skl-glk sync->async flip change Ville Syrjala
2024-04-19 6:39 ` Murthy, Arun R
2024-04-19 16:41 ` Ville Syrjälä
2024-04-23 3:47 ` Murthy, Arun R
2024-03-20 16:04 ` [PATCH 5/6] drm/i915: s/need_async_flip_disable_wa/need_async_flip_toggle_wa/ Ville Syrjala
2024-04-19 6:41 ` Murthy, Arun R
2024-03-20 16:04 ` [PATCH 6/6] drm/i915: Extract ilk_must_disable_lp_wm() Ville Syrjala
2024-04-19 6:54 ` Murthy, Arun R
2024-03-21 1:05 ` ✗ Fi.CI.SPARSE: warning for drm/i915: Allow the first async flip to change modifier Patchwork
2024-03-21 1:18 ` ✓ Fi.CI.BAT: success " Patchwork
2024-03-21 11:43 ` ✗ Fi.CI.IGT: failure " 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=20240320160424.700-3-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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