static int gsc_m2m_streamon(struct file *file, void *fh, enum v4l2_buf_type type) { struct gsc_ctx *ctx = fh_to_ctx(fh); struct gsc_dev *gsc = ctx->gsc_dev; struct exynos_platform_gscaler *pdata = gsc->pdata; /* The source and target color format need to be set */ if (V4L2_TYPE_IS_OUTPUT(type)) { if (!gsc_ctx_state_is_set(GSC_SRC_FMT, ctx)) return -EINVAL; } else if (!gsc_ctx_state_is_set(GSC_DST_FMT, ctx)) { return -EINVAL; } gsc_pm_qos_ctrl(gsc, GSC_QOS_ON, pdata->mif_min, pdata->int_min); if (gsc->protected_content) { int id = gsc->id + 3; exynos_smc(SMC_PROTECTION_SET, 0, id, 1); gsc_dbg("DRM enable"); } return v4l2_m2m_streamon(file, ctx->m2m_ctx, type); }
int v4l2_m2m_ioctl_streamon(struct file *file, void *priv, enum v4l2_buf_type type) { struct v4l2_fh *fh = file->private_data; return v4l2_m2m_streamon(file, fh->m2m_ctx, type); }
static int gsc_m2m_streamon(struct file *file, void *fh, enum v4l2_buf_type type) { struct gsc_ctx *ctx = fh_to_ctx(fh); /* The source and target color format need to be set */ if (V4L2_TYPE_IS_OUTPUT(type)) { if (!gsc_ctx_state_is_set(GSC_SRC_FMT, ctx)) return -EINVAL; } else if (!gsc_ctx_state_is_set(GSC_DST_FMT, ctx)) { return -EINVAL; } return v4l2_m2m_streamon(file, ctx->m2m_ctx, type); }
static int bdisp_streamon(struct file *file, void *fh, enum v4l2_buf_type type) { struct bdisp_ctx *ctx = fh_to_ctx(fh); if ((type == V4L2_BUF_TYPE_VIDEO_OUTPUT) && !bdisp_ctx_state_is_set(BDISP_SRC_FMT, ctx)) { dev_err(ctx->bdisp_dev->dev, "src not defined\n"); return -EINVAL; } if ((type == V4L2_BUF_TYPE_VIDEO_CAPTURE) && !bdisp_ctx_state_is_set(BDISP_DST_FMT, ctx)) { dev_err(ctx->bdisp_dev->dev, "dst not defined\n"); return -EINVAL; } return v4l2_m2m_streamon(file, ctx->fh.m2m_ctx, type); }
static int gsc_m2m_streamon(struct file *file, void *fh, enum v4l2_buf_type type) { struct gsc_ctx *ctx = fh_to_ctx(fh); struct gsc_dev *gsc = ctx->gsc_dev; struct exynos_platform_gscaler *pdata = gsc->pdata; /* The source and target color format need to be set */ if (V4L2_TYPE_IS_OUTPUT(type)) { if (!gsc_ctx_state_is_set(GSC_SRC_FMT, ctx)) return -EINVAL; } else if (!gsc_ctx_state_is_set(GSC_DST_FMT, ctx)) { return -EINVAL; } gsc_pm_qos_ctrl(gsc, GSC_QOS_ON, pdata->mif_min, pdata->int_min); return v4l2_m2m_streamon(file, ctx->m2m_ctx, type); }
/* * msm_jpegdma_streamon - V4l2 ioctl stream on handler. * @file: Pointer to file struct. * @fh: V4l2 File handle. * @buf_type: V4l2 buffer type. */ static int msm_jpegdma_streamon(struct file *file, void *fh, enum v4l2_buf_type buf_type) { struct jpegdma_ctx *ctx = msm_jpegdma_ctx_from_fh(fh); int ret; if (!msm_jpegdma_config_ok(ctx)) return -EINVAL; mutex_lock(&ctx->lock); ret = v4l2_m2m_streamon(file, ctx->m2m_ctx, buf_type); if (ret < 0) dev_err(ctx->jdma_device->dev, "Stream on fail\n"); mutex_unlock(&ctx->lock); return ret; }
static int jpeg_dec_m2m_streamon(struct file *file, void *priv, enum v4l2_buf_type type) { struct jpeg_ctx *ctx = priv; return v4l2_m2m_streamon(file, ctx->m2m_ctx, type); }
static int fimc_m2m_streamon(struct file *file, void *fh, enum v4l2_buf_type type) { struct fimc_ctx *ctx = fh_to_ctx(fh); return v4l2_m2m_streamon(file, ctx->m2m_ctx, type); }
static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type type) { struct g2d_ctx *ctx = priv; return v4l2_m2m_streamon(file, ctx->m2m_ctx, type); }