From: Ville Syrjälä <[email protected]>

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ä <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_plane_initial.c | 6 ++++--
 drivers/gpu/drm/xe/display/xe_plane_initial.c      | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c 
b/drivers/gpu/drm/i915/display/intel_plane_initial.c
index a1de1ec564d1..ff1afd3a8f20 100644
--- a/drivers/gpu/drm/i915/display/intel_plane_initial.c
+++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c
@@ -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;
 
                /*
diff --git a/drivers/gpu/drm/xe/display/xe_plane_initial.c 
b/drivers/gpu/drm/xe/display/xe_plane_initial.c
index 12d25c5290fd..01c105a93bb9 100644
--- a/drivers/gpu/drm/xe/display/xe_plane_initial.c
+++ b/drivers/gpu/drm/xe/display/xe_plane_initial.c
@@ -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;
 
                /*
-- 
2.49.1

Reply via email to