drm/i915: Make intel_get_crtc_new_encoder() less oopsy
authorjsg <jsg@openbsd.org>
Fri, 12 May 2023 11:22:54 +0000 (11:22 +0000)
committerjsg <jsg@openbsd.org>
Fri, 12 May 2023 11:22:54 +0000 (11:22 +0000)
From Ville Syrjala
0fe6ef82e4f4764e8f556632e4cd93d78d448e99 in linux-6.1.y/6.1.28
631420b06597a33c72b6dcef78d1c2dea17f452d in mainline linux

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

index 5bb5abf..83fe571 100644 (file)
@@ -1079,7 +1079,7 @@ intel_get_crtc_new_encoder(const struct intel_atomic_state *state,
                num_encoders++;
        }
 
-       drm_WARN(encoder->base.dev, num_encoders != 1,
+       drm_WARN(state->base.dev, num_encoders != 1,
                 "%d encoders for pipe %c\n",
                 num_encoders, pipe_name(master_crtc->pipe));