Skip to content

Commit

Permalink
drm: prune modes when output is disconnected.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adam Jackson authored and Dave Airlie committed Sep 8, 2009
1 parent 1ecff1e commit 620f378
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/drm_crtc_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
if (connector->status == connector_status_disconnected) {
DRM_DEBUG_KMS("%s is disconnected\n",
drm_get_connector_name(connector));
/* TODO set EDID to NULL */
return 0;
goto prune;
}

count = (*connector_funcs->get_modes)(connector);
Expand Down Expand Up @@ -124,6 +123,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
mode);
}

prune:
drm_mode_prune_invalid(dev, &connector->modes, true);

if (list_empty(&connector->modes))
Expand Down

0 comments on commit 620f378

Please sign in to comment.