drm/i915: Fix intel_atomic_setup_scalers() plane_state handling
authorjsg <jsg@openbsd.org>
Mon, 1 Jan 2024 23:50:42 +0000 (23:50 +0000)
committerjsg <jsg@openbsd.org>
Mon, 1 Jan 2024 23:50:42 +0000 (23:50 +0000)
From Ville Syrjala
7afe8109456d94d6cc9374da869b2d64852b8535 in linux-6.1.y/6.1.70
c3070f080f9ba18dea92eaa21730f7ab85b5c8f4 in mainline linux

sys/dev/pci/drm/i915/display/skl_scaler.c

index 83a61ef..0b74f91 100644 (file)
@@ -493,7 +493,6 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
 {
        struct drm_plane *plane = NULL;
        struct intel_plane *intel_plane;
-       struct intel_plane_state *plane_state = NULL;
        struct intel_crtc_scaler_state *scaler_state =
                &crtc_state->scaler_state;
        struct drm_atomic_state *drm_state = crtc_state->uapi.state;
@@ -525,6 +524,7 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
 
        /* walkthrough scaler_users bits and start assigning scalers */
        for (i = 0; i < sizeof(scaler_state->scaler_users) * 8; i++) {
+               struct intel_plane_state *plane_state = NULL;
                int *scaler_id;
                const char *name;
                int idx, ret;