]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915: Use hw.active instead of uapi.active in the initial plane readout
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 19 Nov 2025 18:16:04 +0000 (20:16 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 27 Nov 2025 22:04:13 +0000 (00:04 +0200)
We're interested in the actual hardware state rather than the uapi
state, so grab the crtc active flag from the correct spot.

In practice the two will be identical here becase
.get_initial_plane_config() will reject the initial FB when
joiner is active.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20251119181606.17129-5-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_plane_initial.c
drivers/gpu/drm/xe/display/xe_plane_initial.c

index a1de1ec564d1f37ce96ce83d7c298e8a42dd4000..ff1afd3a8f2051a24f378a2647bb64ff0abe4bef 100644 (file)
@@ -39,7 +39,7 @@ intel_reuse_initial_plane_obj(struct intel_crtc *this,
                const struct intel_crtc_state *crtc_state =
                        to_intel_crtc_state(crtc->base.state);
 
-               if (!crtc_state->uapi.active)
+               if (!crtc_state->hw.active)
                        continue;
 
                if (!plane_state->ggtt_vma)
@@ -411,10 +411,12 @@ void intel_initial_plane_config(struct intel_display *display)
        struct intel_crtc *crtc;
 
        for_each_intel_crtc(display->drm, crtc) {
+               const struct intel_crtc_state *crtc_state =
+                       to_intel_crtc_state(crtc->base.state);
                struct intel_initial_plane_config *plane_config =
                        &plane_configs[crtc->pipe];
 
-               if (!to_intel_crtc_state(crtc->base.state)->uapi.active)
+               if (!crtc_state->hw.active)
                        continue;
 
                /*
index 12d25c5290fd295b815860b81bb8b106861fa698..01c105a93bb9042c5d5612701e6a601e13b6f5bf 100644 (file)
@@ -58,7 +58,7 @@ intel_reuse_initial_plane_obj(struct intel_crtc *this,
                const struct intel_crtc_state *crtc_state =
                        to_intel_crtc_state(crtc->base.state);
 
-               if (!crtc_state->uapi.active)
+               if (!crtc_state->hw.active)
                        continue;
 
                if (!plane_state->ggtt_vma)
@@ -290,10 +290,12 @@ void intel_initial_plane_config(struct intel_display *display)
        struct intel_crtc *crtc;
 
        for_each_intel_crtc(display->drm, crtc) {
+               const struct intel_crtc_state *crtc_state =
+                       to_intel_crtc_state(crtc->base.state);
                struct intel_initial_plane_config *plane_config =
                        &plane_configs[crtc->pipe];
 
-               if (!to_intel_crtc_state(crtc->base.state)->uapi.active)
+               if (!crtc_state->hw.active)
                        continue;
 
                /*