Skip to content

Commit

Permalink
drm/crtc_helper: NULL encoder->crtc when switching encoders
Browse files Browse the repository at this point in the history
- Previously the old encoder would be called during modeset and without a connector bad things happened.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Maarten Maathuis authored and Dave Airlie committed Aug 30, 2009
1 parent f380ef8 commit ff846ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/drm_crtc_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,10 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
if (new_encoder != connector->encoder) {
DRM_DEBUG_KMS("encoder changed, full mode switch\n");
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;
}
}
Expand Down

0 comments on commit ff846ab

Please sign in to comment.