Commit ff846ab7 authored by Maarten Maathuis's avatar Maarten Maathuis Committed by Dave Airlie

drm/crtc_helper: NULL encoder->crtc when switching encoders

- Previously the old encoder would be called during modeset and without a connector bad things happened.
Signed-off-by: default avatarMaarten Maathuis <madman2003@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent f380ef86
...@@ -823,6 +823,10 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) ...@@ -823,6 +823,10 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
if (new_encoder != connector->encoder) { if (new_encoder != connector->encoder) {
DRM_DEBUG_KMS("encoder changed, full mode switch\n"); DRM_DEBUG_KMS("encoder changed, full mode switch\n");
mode_changed = true; mode_changed = true;
/* If the encoder is reused for another connector, then
* the appropriate crtc will be set later.
*/
connector->encoder->crtc = NULL;
connector->encoder = new_encoder; connector->encoder = new_encoder;
} }
} }
......
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