summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-05-18 10:15:09 -0400
committerChris Michael <cp.michael@samsung.com>2015-05-18 10:15:09 -0400
commitdcc73c8f9a2e337dcdb18b26da13d98d03a4ec1f (patch)
treeff7444933682abc2ccdf355e7654c0135d4e7ae5 /src/lib/ecore_drm
parenta9e7dbf282b1aa7f51493337013f3f30243c012c (diff)
ecore-drm: Only try to set the crtc mode if an output is connected
Summary: If an output is disconnected, then we should not be trying to set the mode of it's CRTC as that is going to fail anyway. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/ecore_drm_output.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c
index e1b0b157e6..c66a9da479 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -498,14 +498,17 @@ _ecore_drm_output_create(Ecore_Drm_Device *dev, drmModeRes *res, drmModeConnecto
498 498
499 output->current_mode->flags |= DRM_MODE_TYPE_DEFAULT; 499 output->current_mode->flags |= DRM_MODE_TYPE_DEFAULT;
500 500
501 if (drmModeSetCrtc(output->dev->drm.fd, output->crtc_id, 501 if (output->connected)
502 output->crtc->buffer_id, 0, 0,
503 &output->conn_id, 1, &output->current_mode->info) < 0)
504 { 502 {
505 ERR("Failed to set Mode %dx%d for Output %s: %m", 503 if (drmModeSetCrtc(output->dev->drm.fd, output->crtc_id,
506 output->current_mode->width, output->current_mode->height, 504 output->crtc->buffer_id, 0, 0,
507 output->name); 505 &output->conn_id, 1, &output->current_mode->info) < 0)
508 goto err; 506 {
507 ERR("Failed to set Mode %dx%d for Output %s: %m",
508 output->current_mode->width, output->current_mode->height,
509 output->name);
510 goto err;
511 }
509 } 512 }
510 513
511 /* try to init backlight */ 514 /* try to init backlight */