Commit 3b669235 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Make intel_get_crtc_new_encoder() less oopsy

The point of the WARN was to print something, not oops
straight up. Currently that is precisely what happens
if we can't find the connector for the crtc in the atomic
state. Get the dev pointer from the atomic state instead
of the potentially NULL encoder to avoid that.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230413200602.6037-2-ville.syrjala@linux.intel.com
Fixes: 3a47ae20 ("drm/i915/display: Make WARN* drm specific where encoder ptr is available")
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 764739d8
...@@ -959,7 +959,7 @@ intel_get_crtc_new_encoder(const struct intel_atomic_state *state, ...@@ -959,7 +959,7 @@ intel_get_crtc_new_encoder(const struct intel_atomic_state *state,
num_encoders++; num_encoders++;
} }
drm_WARN(encoder->base.dev, num_encoders != 1, drm_WARN(state->base.dev, num_encoders != 1,
"%d encoders for pipe %c\n", "%d encoders for pipe %c\n",
num_encoders, pipe_name(master_crtc->pipe)); num_encoders, pipe_name(master_crtc->pipe));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment