static int fimc_is_ixc_video_reqbufs(struct file *file, void *priv, struct v4l2_requestbuffers *buf) { int ret = 0; struct fimc_is_video_ctx *vctx = file->private_data; struct fimc_is_device_ischain *device; struct fimc_is_subdev *leader, *subdev; BUG_ON(!vctx); BUG_ON(!GET_DEVICE(vctx)); BUG_ON(!GET_VIDEO(vctx)); mdbgv_ixc("%s(buffers : %d)\n", vctx, __func__, buf->count); device = GET_DEVICE(vctx); subdev = &device->ixc; leader = subdev->leader; if (leader && test_bit(FIMC_IS_SUBDEV_START, &leader->state)) { err("leader%d still running, subdev%d req is not applied", leader->id, subdev->id); ret = -EINVAL; goto p_err; } ret = fimc_is_video_reqbufs(file, vctx, buf); if (ret) { merr("fimc_is_video_reqbufs is fail(%d)", device, ret); goto p_err; } p_err: return ret; }
static int fimc_is_isp_video_reqbufs(struct file *file, void *priv, struct v4l2_requestbuffers *buf) { int ret = 0; struct fimc_is_video_ctx *vctx = file->private_data; struct fimc_is_device_ischain *device; BUG_ON(!vctx); mdbgv_isp("%s(buffers : %d)\n", vctx, __func__, buf->count); device = vctx->device; if (!device) { merr("device is NULL", vctx); ret = -EINVAL; goto p_err; } ret = fimc_is_ischain_isp_reqbufs(device, buf->count); if (ret) { merr("isp_reqbufs is fail(%d)", vctx, ret); goto p_err; } ret = fimc_is_video_reqbufs(file, vctx, buf); if (ret) merr("fimc_is_video_reqbufs is fail(error %d)", vctx, ret); p_err: return ret; }
static int fimc_is_vdo_video_reqbufs(struct file *file, void *priv, struct v4l2_requestbuffers *buf) { int ret; struct fimc_is_video_ctx *vctx = file->private_data; mdbgv_vdo("%s(buffers : %d)\n", vctx, __func__, buf->count); ret = fimc_is_video_reqbufs(file, vctx, buf); if (ret) merr("fimc_is_video_reqbufs is fail(error %d)", vctx, ret); return ret; }
static int fimc_is_bayer_video_reqbufs(struct file *file, void *priv, struct v4l2_requestbuffers *buf) { int ret = 0; struct fimc_is_video_sensor *video = file->private_data; struct fimc_is_video_common *common = &video->common; struct fimc_is_device_sensor *sensor = common->device; dbg_sensor("%s(buffers : %d)\n", __func__, buf->count); ret = fimc_is_video_reqbufs(common, sensor->framemgr, buf); if (ret) err("fimc_is_video_reqbufs is fail(error %d)", ret); return ret; }
static int fimc_is_scp_video_reqbufs(struct file *file, void *priv, struct v4l2_requestbuffers *buf) { int ret = 0; struct fimc_is_video_ctx *vctx = file->private_data; struct fimc_is_device_ischain *device; struct fimc_is_subdev *subdev; struct fimc_is_subdev *leader; BUG_ON(!vctx); mdbgv_scp("%s(buffers : %d)\n", vctx, __func__, buf->count); device = vctx->device; subdev = &device->scp; leader = subdev->leader; if (!leader) { merr("leader is NULL ptr", vctx); ret = -EINVAL; goto p_err; } if (test_bit(FIMC_IS_ISDEV_DSTART, &leader->state)) { merr("leader still running, not applied", vctx); ret = -EINVAL; goto p_err; } ret = fimc_is_video_reqbufs(file, vctx, buf); if (ret) merr("fimc_is_video_reqbufs is fail(%d)", vctx, ret); p_err: return ret; }
static int fimc_is_scc_video_reqbufs(struct file *file, void *priv, struct v4l2_requestbuffers *buf) { int ret = 0; struct fimc_is_video_ctx *video_ctx = file->private_data; struct fimc_is_device_ischain *ischain = video_ctx->device; struct fimc_is_subdev *scc = &ischain->scc; struct fimc_is_subdev *leader = scc->leader; dbg_scc("%s(buffers : %d)\n", __func__, buf->count); if (test_bit(FIMC_IS_ISDEV_DSTART, &leader->state)) { err("leader still running, not applied"); ret = -EINVAL; goto exit; } ret = fimc_is_video_reqbufs(video_ctx, &scc->framemgr, buf); if (ret) err("fimc_is_video_reqbufs is fail(error %d)", ret); exit: return ret; }