Re: [RFC v2 07/10] exynos5-fimc-is: Adds scaler subdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31 May 2013 18:33, Arun Kumar K <arun.kk@xxxxxxxxxxx> wrote:
> FIMC-IS has two hardware scalers named as scaler-codec and
> scaler-preview. This patch adds the common code handling the
> video nodes and subdevs of both the scalers.
>
> Signed-off-by: Arun Kumar K <arun.kk@xxxxxxxxxxx>
> Signed-off-by: Kilyeon Im <kilyeon.im@xxxxxxxxxxx>
> ---

[snip]

> +static int scaler_video_capture_open(struct file *file)
> +{
> +       struct fimc_is_scaler *ctx = video_drvdata(file);
> +       int ret = 0;
> +
> +       /* Check if opened before */
> +       if (ctx->refcount >= FIMC_IS_MAX_INSTANCES) {
> +               pr_err("All instances are in use.\n");
> +               return -EBUSY;
> +       }
> +
> +       INIT_LIST_HEAD(&ctx->wait_queue);
> +       ctx->wait_queue_cnt = 0;
> +       INIT_LIST_HEAD(&ctx->run_queue);
> +       ctx->run_queue_cnt = 0;
> +
> +       ctx->fmt = NULL;
> +       ctx->refcount++;
> +
> +       return ret;

Directly return 0.

> +}
> +
> +static int scaler_video_capture_close(struct file *file)
> +{
> +       struct fimc_is_scaler *ctx = video_drvdata(file);
> +       int ret = 0;
> +
> +       ctx->refcount--;
> +       ctx->capture_state = 0;
> +       vb2_fop_release(file);
> +
> +       return ret;

ditto

-- 
With warm regards,
Sachin
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux