diff options
author | Maarten Maathuis <madman2003@gmail.com> | 2009-08-18 18:56:45 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-08-30 19:09:29 -0400 |
commit | ff846ab7f76ffecba4f0bef026163d2a2364d7d0 (patch) | |
tree | 5a38ce7d88bf6996598360cf348489aec8b6a2b4 /drivers/gpu | |
parent | f380ef86916904e4b79f7bec599deb51057b2d0c (diff) |
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: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index a3837b39bb8f..205349ea1075 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c | |||
@@ -823,6 +823,10 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) | |||
823 | if (new_encoder != connector->encoder) { | 823 | if (new_encoder != connector->encoder) { |
824 | DRM_DEBUG_KMS("encoder changed, full mode switch\n"); | 824 | DRM_DEBUG_KMS("encoder changed, full mode switch\n"); |
825 | mode_changed = true; | 825 | mode_changed = true; |
826 | /* If the encoder is reused for another connector, then | ||
827 | * the appropriate crtc will be set later. | ||
828 | */ | ||
829 | connector->encoder->crtc = NULL; | ||
826 | connector->encoder = new_encoder; | 830 | connector->encoder = new_encoder; |
827 | } | 831 | } |
828 | } | 832 | } |