summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2012-11-07 16:06:03 +0200
committerTapani Pälli <tapani.palli@intel.com>2012-11-07 16:06:03 +0200
commit2a9d541f07691057df3cb0a8fa231fef58664af0 (patch)
treee11504fbb66f7a887fcc6120a1c9e567cb91cab3
parentb89d7caffeea06e568e9df7da6c6c39ec63b9a1d (diff)
downloadexternal_drm_gralloc-2a9d541f07691057df3cb0a8fa231fef58664af0.zip
external_drm_gralloc-2a9d541f07691057df3cb0a8fa231fef58664af0.tar.gz
external_drm_gralloc-2a9d541f07691057df3cb0a8fa231fef58664af0.tar.bz2
gralloc: no cloned mode on platforms with hdmi as primary
On some platforms we might have only HDMI connector, on those platforms do not attempt to use cloned/extended mode with HDMI. Change-Id: If0f21986030e4e97991202bd8168d7c9e25de493 Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
-rw-r--r--gralloc_drm_kms.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gralloc_drm_kms.c b/gralloc_drm_kms.c
index 8f45fd8..d9b1096 100644
--- a/gralloc_drm_kms.c
+++ b/gralloc_drm_kms.c
@@ -211,7 +211,8 @@ static int drm_kms_page_flip(struct gralloc_drm_t *drm,
ALOGE("failed to perform page flip for primary (%s) (crtc %d fb %d))",
strerror(errno), drm->primary.crtc_id, bo->fb_id);
/* try to set mode for next frame */
- drm->first_post = 1;
+ if (errno != EBUSY)
+ drm->first_post = 1;
}
else
drm->next_front = bo;
@@ -773,6 +774,12 @@ int gralloc_drm_init_kms(struct gralloc_drm_t *drm)
/* check if hdmi is connected already */
hdmi = fetch_connector(drm, DRM_MODE_CONNECTOR_HDMIA);
if (hdmi) {
+
+ if (hdmi->connector_id == drm->primary.connector_id) {
+ /* special case: our primary connector is hdmi */
+ goto skip_hdmi_modes;
+ }
+
drm_kms_init_with_connector(drm, &drm->hdmi, hdmi);
drmModeFreeConnector(hdmi);
@@ -788,6 +795,8 @@ int gralloc_drm_init_kms(struct gralloc_drm_t *drm)
pthread_mutex_init(&drm->hdmi_mutex, NULL);
pthread_create(&drm->hdmi_hotplug_thread, NULL, hdmi_observer, drm);
+skip_hdmi_modes:
+
drm_kms_init_features(drm);
drm->first_post = 1;