linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Stanimir Varbanov <stanimir.varbanov@linaro.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Andy Gross <andy.gross@linaro.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v2 4/8] media: vidc: encoder: add video encoder files
Date: Mon, 19 Sep 2016 12:15:01 +0200	[thread overview]
Message-ID: <18374b1c-f3b3-4eda-6c05-cf364b1bef81@xs4all.nl> (raw)
In-Reply-To: <1473248229-5540-5-git-send-email-stanimir.varbanov@linaro.org>

Many of my review comments for the decoder apply to the encoder as well,
so I won't repeat those.

On 09/07/2016 01:37 PM, Stanimir Varbanov wrote:
> This adds encoder part of the driver plus encoder controls.
> 
> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> ---
>  drivers/media/platform/qcom/vidc/venc.c       | 1252 +++++++++++++++++++++++++
>  drivers/media/platform/qcom/vidc/venc.h       |   29 +
>  drivers/media/platform/qcom/vidc/venc_ctrls.c |  396 ++++++++
>  drivers/media/platform/qcom/vidc/venc_ctrls.h |   23 +
>  4 files changed, 1700 insertions(+)
>  create mode 100644 drivers/media/platform/qcom/vidc/venc.c
>  create mode 100644 drivers/media/platform/qcom/vidc/venc.h
>  create mode 100644 drivers/media/platform/qcom/vidc/venc_ctrls.c
>  create mode 100644 drivers/media/platform/qcom/vidc/venc_ctrls.h
> 
> diff --git a/drivers/media/platform/qcom/vidc/venc.c b/drivers/media/platform/qcom/vidc/venc.c
> new file mode 100644
> index 000000000000..3b65f851a807
> --- /dev/null
> +++ b/drivers/media/platform/qcom/vidc/venc.c
> @@ -0,0 +1,1252 @@

<snip>

> +static int venc_s_selection(struct file *file, void *fh,
> +			    struct v4l2_selection *s)
> +{
> +	return -EINVAL;
> +}

Huh? Either remove this, or implement this correctly.

<snip>

> +static int venc_subscribe_event(struct v4l2_fh *fh,
> +				const struct  v4l2_event_subscription *sub)
> +{
> +	switch (sub->type) {
> +	case V4L2_EVENT_EOS:
> +		return v4l2_event_subscribe(fh, sub, 2, NULL);
> +	case V4L2_EVENT_SOURCE_CHANGE:
> +		return v4l2_src_change_event_subscribe(fh, sub);

These two events aren't used in this driver AFAICT, so this can be dropped.

Since that leaves just V4L2_EVENT_CTRL this function can be replaced by
v4l2_ctrl_subscribe_event().

Regards,

	Hans


> +	case V4L2_EVENT_CTRL:
> +		return v4l2_ctrl_subscribe_event(fh, sub);
> +	default:
> +		return -EINVAL;
> +	}
> +}

  reply	other threads:[~2016-09-19 10:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07 11:37 [PATCH v2 0/8] Qualcomm video decoder/encoder driver Stanimir Varbanov
2016-09-07 11:37 ` [PATCH v2 1/8] doc: DT: vidc: binding document for Qualcomm video driver Stanimir Varbanov
2016-09-16 14:19   ` Rob Herring
2016-09-26 19:42     ` Stanimir Varbanov
2016-09-07 11:37 ` [PATCH v2 2/8] media: vidc: adding core part and helper functions Stanimir Varbanov
2016-09-07 11:37 ` [PATCH v2 3/8] media: vidc: decoder: add video decoder files Stanimir Varbanov
2016-09-19 10:04   ` Hans Verkuil
2016-09-29  0:48     ` Stanimir Varbanov
2016-11-03 10:45     ` Stanimir Varbanov
2016-11-03 10:55       ` Hans Verkuil
2016-11-03 12:49         ` Stanimir Varbanov
2016-09-19 10:12   ` Hans Verkuil
2016-09-29  0:49     ` Stanimir Varbanov
2016-09-07 11:37 ` [PATCH v2 4/8] media: vidc: encoder: add video encoder files Stanimir Varbanov
2016-09-19 10:15   ` Hans Verkuil [this message]
2016-09-29  0:53     ` Stanimir Varbanov
2016-09-07 11:37 ` [PATCH v2 5/8] media: vidc: add Host Firmware Interface (HFI) Stanimir Varbanov
2016-09-07 11:37 ` [PATCH v2 6/8] media: vidc: add Venus HFI files Stanimir Varbanov
2016-09-07 11:37 ` [PATCH v2 7/8] media: vidc: add Makefiles and Kconfig files Stanimir Varbanov
2016-09-19 10:35   ` Hans Verkuil
2016-09-29  0:55     ` Stanimir Varbanov
2016-09-07 11:37 ` [PATCH v2 8/8] media: vidc: enable building of the video codec driver Stanimir Varbanov
2016-09-07 11:45 ` [PATCH v2 0/8] Qualcomm video decoder/encoder driver Hans Verkuil
2016-09-19 10:43 ` Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18374b1c-f3b3-4eda-6c05-cf364b1bef81@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=stanimir.varbanov@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).