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>
This commit is contained in:
committed by
Dave Airlie
parent
1ecff1eb0b
commit
620f37811d
@@ -95,8 +95,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
|
|||||||
if (connector->status == connector_status_disconnected) {
|
if (connector->status == connector_status_disconnected) {
|
||||||
DRM_DEBUG_KMS("%s is disconnected\n",
|
DRM_DEBUG_KMS("%s is disconnected\n",
|
||||||
drm_get_connector_name(connector));
|
drm_get_connector_name(connector));
|
||||||
/* TODO set EDID to NULL */
|
goto prune;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
count = (*connector_funcs->get_modes)(connector);
|
count = (*connector_funcs->get_modes)(connector);
|
||||||
@@ -124,6 +123,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
|
|||||||
mode);
|
mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prune:
|
||||||
drm_mode_prune_invalid(dev, &connector->modes, true);
|
drm_mode_prune_invalid(dev, &connector->modes, true);
|
||||||
|
|
||||||
if (list_empty(&connector->modes))
|
if (list_empty(&connector->modes))
|
||||||
|
Reference in New Issue
Block a user