summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-12-10 10:04:22 -0500
committerChris Michael <cp.michael@samsung.com>2014-12-10 12:01:58 -0500
commit080ef1d984ece1a760c6ed99f274133e5548aad7 (patch)
tree817389f57bc5145f64de9d0800003261612f09d5 /src/lib
parent7552bccc350e97ae52452bb13fd6abd20c35a520 (diff)
ecore-drm: Fix formatting
Summary: No functional changes, just formatting fixes Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore_drm/ecore_drm_output.c52
1 files changed, 17 insertions, 35 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c
index 0a707a2bd6..590a1d345a 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -165,8 +165,7 @@ _ecore_drm_output_brightness_get(Ecore_Drm_Backlight *backlight)
165 if (!brightness) return 0; 165 if (!brightness) return 0;
166 166
167 ret = strtod(brightness, NULL); 167 ret = strtod(brightness, NULL);
168 if (ret < 0) 168 if (ret < 0) ret = 0;
169 ret = 0;
170 169
171 return ret; 170 return ret;
172} 171}
@@ -184,8 +183,7 @@ _ecore_drm_output_actual_brightness_get(Ecore_Drm_Backlight *backlight)
184 if (!brightness) return 0; 183 if (!brightness) return 0;
185 184
186 ret = strtod(brightness, NULL); 185 ret = strtod(brightness, NULL);
187 if (ret < 0) 186 if (ret < 0) ret = 0;
188 ret = 0;
189 187
190 return ret; 188 return ret;
191} 189}
@@ -203,8 +201,7 @@ _ecore_drm_output_max_brightness_get(Ecore_Drm_Backlight *backlight)
203 if (!brightness) return 0; 201 if (!brightness) return 0;
204 202
205 ret = strtod(brightness, NULL); 203 ret = strtod(brightness, NULL);
206 if (ret < 0) 204 if (ret < 0) ret = 0;
207 ret = 0;
208 205
209 return ret; 206 return ret;
210} 207}
@@ -279,8 +276,7 @@ out:
279static void 276static void
280_ecore_drm_output_backlight_shutdown(Ecore_Drm_Backlight *backlight) 277_ecore_drm_output_backlight_shutdown(Ecore_Drm_Backlight *backlight)
281{ 278{
282 if (!backlight) 279 if (!backlight) return;
283 return;
284 280
285 if (backlight->device) 281 if (backlight->device)
286 eina_stringshare_del(backlight->device); 282 eina_stringshare_del(backlight->device);
@@ -371,15 +367,14 @@ _ecore_drm_output_create(Ecore_Drm_Device *dev, drmModeRes *res, drmModeConnecto
371 if (!output->current_mode) goto mode_err; 367 if (!output->current_mode) goto mode_err;
372 } 368 }
373 369
374 { 370 dev->use_hw_accel = EINA_FALSE;
375 dev->use_hw_accel = EINA_FALSE; 371 if (!_ecore_drm_output_software_setup(dev, output))
376 if (!_ecore_drm_output_software_setup(dev, output)) 372 goto mode_err;
377 goto mode_err; 373 else
378 else 374 DBG("Setup Output %d for Software Rendering", output->crtc_id);
379 DBG("Setup Output %d for Software Rendering", output->crtc_id);
380 }
381 375
382 output->backlight = _ecore_drm_output_backlight_init(output, conn->connector_type); 376 output->backlight =
377 _ecore_drm_output_backlight_init(output, conn->connector_type);
383 378
384 return output; 379 return output;
385 380
@@ -562,7 +557,8 @@ _ecore_drm_update_outputs(Ecore_Drm_Output *output)
562 drmModeFreeCrtc(crtc); 557 drmModeFreeCrtc(crtc);
563 drmModeFreeEncoder(enc); 558 drmModeFreeEncoder(enc);
564 559
565 output->dev->outputs = eina_list_append(output->dev->outputs, new_output); 560 output->dev->outputs =
561 eina_list_append(output->dev->outputs, new_output);
566 } 562 }
567 drmModeFreeConnector(connector); 563 drmModeFreeConnector(connector);
568 } 564 }
@@ -589,9 +585,7 @@ _ecore_drm_output_event(const char *device EINA_UNUSED, Eeze_Udev_Event event EI
589 if (!(output = data)) return; 585 if (!(output = data)) return;
590 586
591 if (_ecore_drm_output_device_is_hotplug(output)) 587 if (_ecore_drm_output_device_is_hotplug(output))
592 { 588 _ecore_drm_update_outputs(output);
593 _ecore_drm_update_outputs(output);
594 }
595} 589}
596 590
597/* public functions */ 591/* public functions */
@@ -798,17 +792,9 @@ ecore_drm_output_repaint(Ecore_Drm_Output *output)
798 /* TODO: assign planes ? */ 792 /* TODO: assign planes ? */
799 793
800 if (!output->next) 794 if (!output->next)
801 { 795 _ecore_drm_output_software_render(output);
802 {
803 _ecore_drm_output_software_render(output);
804 }
805 }
806 796
807 if (!output->next) 797 if (!output->next) return;
808 {
809 /* DBG("\tNo Next Fb"); */
810 return;
811 }
812 798
813 output->need_repaint = EINA_FALSE; 799 output->need_repaint = EINA_FALSE;
814 800
@@ -821,11 +807,7 @@ ecore_drm_output_repaint(Ecore_Drm_Output *output)
821 ret = drmModeSetCrtc(output->dev->drm.fd, output->crtc_id, 807 ret = drmModeSetCrtc(output->dev->drm.fd, output->crtc_id,
822 output->next->id, 0, 0, &output->conn_id, 1, 808 output->next->id, 0, 0, &output->conn_id, 1,
823 &mode->info); 809 &mode->info);
824 if (ret) 810 if (ret) goto err;
825 {
826 /* ERR("Setting output mode failed"); */
827 goto err;
828 }
829 } 811 }
830 812
831 if (drmModePageFlip(output->dev->drm.fd, output->crtc_id, output->next->id, 813 if (drmModePageFlip(output->dev->drm.fd, output->crtc_id, output->next->id,