From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: [PATCH v2 07/14] drm/i915: Flag even inactive crtcs as "inherited"
Date: Wed, 26 Mar 2025 18:25:37 +0200 [thread overview]
Message-ID: <20250326162544.3642-8-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20250326162544.3642-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
I want to use the crtc_state->inherited flag to clean up some
of the early SAGV handling. To make that work nicely I need to
flag even the inactive crtcs as "inherited".
Since we can't expect user space to perform any real commits
on inactive crtcs we'll clear the flag already during
initial_commit().
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 3 +++
.../drm/i915/display/intel_modeset_setup.c | 22 +++++++++----------
2 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index ee7812126129..a893add41849 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -8073,6 +8073,9 @@ int intel_initial_commit(struct intel_display *display)
goto out;
}
+ if (!crtc_state->hw.active)
+ crtc_state->inherited = false;
+
if (crtc_state->hw.active) {
struct intel_encoder *encoder;
diff --git a/drivers/gpu/drm/i915/display/intel_modeset_setup.c b/drivers/gpu/drm/i915/display/intel_modeset_setup.c
index 3cc915739677..2dc641da0c3b 100644
--- a/drivers/gpu/drm/i915/display/intel_modeset_setup.c
+++ b/drivers/gpu/drm/i915/display/intel_modeset_setup.c
@@ -821,18 +821,18 @@ static void intel_modeset_readout_hw_state(struct drm_i915_private *i915)
to_intel_crtc_state(crtc->base.state);
struct intel_plane *plane;
- if (crtc_state->hw.active) {
- /*
- * The initial mode needs to be set in order to keep
- * the atomic core happy. It wants a valid mode if the
- * crtc's enabled, so we do the above call.
- *
- * But we don't set all the derived state fully, hence
- * set a flag to indicate that a full recalculation is
- * needed on the next commit.
- */
- crtc_state->inherited = true;
+ /*
+ * The initial mode needs to be set in order to keep
+ * the atomic core happy. It wants a valid mode if the
+ * crtc's enabled, so we do the above call.
+ *
+ * But we don't set all the derived state fully, hence
+ * set a flag to indicate that a full recalculation is
+ * needed on the next commit.
+ */
+ crtc_state->inherited = true;
+ if (crtc_state->hw.active) {
intel_crtc_update_active_timings(crtc_state,
crtc_state->vrr.enable);
--
2.45.3
next prev parent reply other threads:[~2025-03-26 16:26 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-26 16:25 [PATCH v2 00/14] drm/i915: sagv/bw cleanup Ville Syrjala
2025-03-26 16:25 ` [PATCH v2 01/14] drm/i915: Drop the cached per-pipe min_cdclk[] from bw state Ville Syrjala
2025-03-27 7:56 ` Jani Nikula
2025-03-26 16:25 ` [PATCH v2 02/14] drm/i915: s/intel_crtc_bw/intel_dbuf_bw/ Ville Syrjala
2025-03-27 7:57 ` Jani Nikula
2025-03-26 16:25 ` [PATCH v2 03/14] drm/i915: Extract intel_dbuf_bw_changed() Ville Syrjala
2025-03-27 7:57 ` Jani Nikula
2025-03-26 16:25 ` [PATCH v2 04/14] drm/i915: Pass intel_dbuf_bw to skl_*_calc_dbuf_bw() explicitly Ville Syrjala
2025-03-27 7:57 ` Jani Nikula
2025-03-26 16:25 ` [PATCH v2 05/14] drm/i915: Avoid triggering unwanted cdclk changes due to dbuf bandwidth changes Ville Syrjala
2025-03-27 8:00 ` Jani Nikula
2025-03-27 12:06 ` Ville Syrjälä
2025-03-26 16:25 ` [PATCH v2 06/14] drm/i915: Do more bw readout Ville Syrjala
2025-03-26 16:25 ` Ville Syrjala [this message]
2025-03-26 16:25 ` [PATCH v2 08/14] drm/i915: Drop force_check_qgv Ville Syrjala
2025-03-26 16:25 ` [PATCH v2 09/14] drm/i915: Extract intel_bw_modeset_checks() Ville Syrjala
2025-03-26 16:25 ` [PATCH v2 10/14] drm/i915: Extract intel_bw_check_sagv_mask() Ville Syrjala
2025-03-26 16:25 ` [PATCH v2 11/14] drm/i915: Make intel_bw_check_sagv_mask() internal to intel_bw.c Ville Syrjala
2025-03-26 16:25 ` [PATCH v2 12/14] drm/i915: Make intel_bw_modeset_checks() internal to intel_bw_atomic_check() Ville Syrjala
2025-03-26 16:25 ` [PATCH v2 13/14] drm/i915: Skip bw stuff if per-crtc sagv state doesn't change Ville Syrjala
2025-03-26 16:25 ` [PATCH v2 14/14] drm/i915: Eliminate intel_compute_sagv_mask() Ville Syrjala
2025-03-26 17:45 ` ✓ CI.Patch_applied: success for drm/i915: sagv/bw cleanup (rev2) Patchwork
2025-03-26 17:45 ` ✗ CI.checkpatch: warning " Patchwork
2025-03-26 17:46 ` ✓ CI.KUnit: success " Patchwork
2025-03-26 18:03 ` ✓ CI.Build: " Patchwork
2025-03-26 18:05 ` ✓ CI.Hooks: " Patchwork
2025-03-26 18:07 ` ✗ CI.checksparse: warning " Patchwork
2025-03-26 18:29 ` ✓ Xe.CI.BAT: success " Patchwork
2025-03-27 8:02 ` ✗ Xe.CI.Full: failure " Patchwork
2025-03-27 11:46 ` Patchwork
2025-04-04 12:59 ` [PATCH v2 00/14] drm/i915: sagv/bw cleanup Jani Nikula
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=20250326162544.3642-8-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@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