diff options
author | Adam Jackson <ajax@redhat.com> | 2009-09-07 21:51:46 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-09-07 21:51:46 -0400 |
commit | 620f37811dcc9e0f97ee79fbf8908fcc097deaee (patch) | |
tree | 3622ded2c5a7f95bf0113097eb7d1a736a616d7c /drivers/gpu/drm/drm_crtc_helper.c | |
parent | 1ecff1eb0b83efa85be5b54c958e831e37f993f3 (diff) |
drm: prune modes when output is disconnected.
When an output was disconnected, its mode list would remain. If you later
plugged into a sink with no EDID (projector, etc), you'd inherit the mode
list from the old sink, which is not what you want.
taken from Fedora kernel
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index c9a50c729330..ff447f175a56 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c | |||
@@ -95,8 +95,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector, | |||
95 | if (connector->status == connector_status_disconnected) { | 95 | if (connector->status == connector_status_disconnected) { |
96 | DRM_DEBUG_KMS("%s is disconnected\n", | 96 | DRM_DEBUG_KMS("%s is disconnected\n", |
97 | drm_get_connector_name(connector)); | 97 | drm_get_connector_name(connector)); |
98 | /* TODO set EDID to NULL */ | 98 | goto prune; |
99 | return 0; | ||
100 | } | 99 | } |
101 | 100 | ||
102 | count = (*connector_funcs->get_modes)(connector); | 101 | count = (*connector_funcs->get_modes)(connector); |
@@ -124,6 +123,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector, | |||
124 | mode); | 123 | mode); |
125 | } | 124 | } |
126 | 125 | ||
126 | prune: | ||
127 | drm_mode_prune_invalid(dev, &connector->modes, true); | 127 | drm_mode_prune_invalid(dev, &connector->modes, true); |
128 | 128 | ||
129 | if (list_empty(&connector->modes)) | 129 | if (list_empty(&connector->modes)) |