RETURN_VAL_IF_FAIL(bo_src != NULL, TDM_ERROR_OPERATION_FAILED);
handle_src = (__u32)tbm_bo_get_handle(bo_src, TBM_DEVICE_DEFAULT).u32;
ctx.src_fds[0] = _tdm_gem_to_dmafd(drm_fd, handle_src);
+ RETURN_VAL_IF_FAIL(ctx.src_fds[0] >= 0, TDM_ERROR_OPERATION_FAILED);
+
ctx.src_fds[1] = ctx.src_fds[0];
ctx.src_fds[2] = ctx.src_fds[0];
ctx.dst_width, ctx.dst_height, ctx.dst_stride[0], ctx.dst_stride[1], ctx.dst_stride[2], ctx.dst_fds[0], ctx.dst_fds[1], ctx.dst_fds[2],
ctx.crop.x, ctx.crop.y, ctx.crop.width, ctx.crop.height);
- ioctl(scaler_fd, IOCTL_SCALER_SET_AND_RUN, &ctx);
+ if (ioctl(scaler_fd, IOCTL_SCALER_SET_AND_RUN, &ctx) < 0) {
+ TDM_ERR("IOCTL_SCALER_SET_AND_RUN failed");
+ }
close(ctx.src_fds[0]);
close(ctx.dst_fds[0]);
return TDM_ERROR_BAD_MODULE;
}
- caps->capabilities = TDM_PP_CAPABILITY_SYNC | TDM_PP_CAPABILITY_SCANOUT | TDM_PP_CAPABILITY_NO_CSC;
+ caps->capabilities = TDM_PP_CAPABILITY_SYNC | TDM_PP_CAPABILITY_SCANOUT;
caps->format_count = NUM_PP_FORMAT;
tdm_nexell_pp_data *pp_data = pp;
tdm_nexell_pp_buffer *b = NULL, *bb = NULL;
tdm_nexell_data *nexell_data;
+ tdm_error ret;
RETURN_VAL_IF_FAIL(pp_data, TDM_ERROR_INVALID_PARAMETER);
LIST_FOR_EACH_ENTRY_SAFE(b, bb, &pp_data->pending_buffer_list, link) {
LIST_DEL(&b->link);
- _tdm_nexell_pp_convert(b, &pp_data->info, nexell_data->drm_fd, nexell_data->scaler_fd);
+ ret = _tdm_nexell_pp_convert(b, &pp_data->info, nexell_data->drm_fd, nexell_data->scaler_fd);
+ RETURN_VAL_IF_FAIL(ret == TDM_ERROR_NONE, ret);
if (pp_data->done_func)
pp_data->done_func(pp_data,