1
0
Fork 0

drm_hwcomposer: Don't try to get configs for a disconnected connector

Short circuit getting the configs for connectors which are disconnected.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: Ieabbf08f4d4a6c8b03f948399113e3ad04a2d93a
This commit is contained in:
Sean Paul 2015-02-04 10:08:00 -08:00 committed by Sean Paul
parent fa406a10d4
commit a4283c5cc8

View file

@ -721,8 +721,15 @@ static int hwc_get_display_configs(struct hwc_composer_device_1* dev,
return -ENODEV;
}
if (hd->configs)
if (hd->configs) {
free(hd->configs);
hd->configs = NULL;
}
if (c->connection == DRM_MODE_DISCONNECTED) {
ret = -ENODEV;
goto out;
}
hd->configs = (drmModeModeInfoPtr)calloc(c->count_modes,
sizeof(*hd->configs));