if (!drm_version) {
TDM_BACKEND_ERR("no drm version: %m");
ret = HAL_TDM_ERROR_OPERATION_FAILED;
- goto failed;
+ goto done;
} else {
TDM_BACKEND_INFO("drm version: %d.%d.%d",
drm_version->version_major,
if (!display_data->mode_res) {
TDM_BACKEND_ERR("no drm resource: %m");
ret = HAL_TDM_ERROR_OPERATION_FAILED;
- goto failed;
+ goto done;
}
display_data->plane_res = drmModeGetPlaneResources(display_data->drm_fd);
if (!display_data->plane_res) {
TDM_BACKEND_ERR("no drm plane resource: %m");
ret = HAL_TDM_ERROR_OPERATION_FAILED;
- goto failed;
+ goto done;
}
if (display_data->plane_res->count_planes <= 0) {
TDM_BACKEND_ERR("no drm plane resource");
ret = HAL_TDM_ERROR_OPERATION_FAILED;
- goto failed;
+ goto done;
}
ret = tdm_exynos_display_get_property(display_data,
if (display_data->use_ippv2) {
ret = tdm_exynos_pp_init(display_data);
if (ret != HAL_TDM_ERROR_NONE)
- goto failed;
+ goto done;
}
ret = tdm_exynos_display_create_output_list(display_data);
if (ret != HAL_TDM_ERROR_NONE)
- goto failed;
+ goto done;
ret = tdm_exynos_display_create_layer_list(display_data);
if (ret != HAL_TDM_ERROR_NONE)
- goto failed;
-
- return ret;
-
-failed:
- _tdm_exynos_display_deinitialize(display_data);
+ goto done;
+done:
return ret;
}
// check if drm_fd is master fd.
drm_fd = _tdm_exynos_open_drm();
- if (display_data->drm_fd < 0) {
+ if (drm_fd < 0) {
ret = HAL_TDM_ERROR_OPERATION_FAILED;
goto failed;
}