]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915: Flag even inactive crtcs as "inherited"
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 26 Mar 2025 16:25:37 +0000 (18:25 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 4 Apr 2025 16:59:46 +0000 (19:59 +0300)
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>
Link: https://patchwork.freedesktop.org/patch/msgid/20250326162544.3642-8-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_modeset_setup.c

index c540e2cae1f04c9f8623a3d3e9a4530d94174c69..d448ee4f4a10bf409f4af93e9050b897e276c1c3 100644 (file)
@@ -8100,6 +8100,9 @@ retry:
                        goto out;
                }
 
+               if (!crtc_state->hw.active)
+                       crtc_state->inherited = false;
+
                if (crtc_state->hw.active) {
                        struct intel_encoder *encoder;
 
index 3cc915739677a29c40834efb01157a15becea373..2dc641da0c3baeb1b87aeeaed4f8858678186f24 100644 (file)
@@ -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);