Skip to content

Commit 631420b

Browse files
vsyrjalajlahtine-intel
authored andcommitted
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: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Fixes: 3a47ae2 ("drm/i915/display: Make WARN* drm specific where encoder ptr is available") Reviewed-by: Jani Nikula <[email protected]> (cherry picked from commit 3b66923) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent d1691bb commit 631420b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/display/intel_display.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ intel_get_crtc_new_encoder(const struct intel_atomic_state *state,
959959
num_encoders++;
960960
}
961961

962-
drm_WARN(encoder->base.dev, num_encoders != 1,
962+
drm_WARN(state->base.dev, num_encoders != 1,
963963
"%d encoders for pipe %c\n",
964964
num_encoders, pipe_name(master_crtc->pipe));
965965

0 commit comments

Comments
 (0)