From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Arun Kumar K <arun.kk@samsung.com>
Cc: linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
k.debski@samsung.com, hverkuil@xs4all.nl,
laurent.pinchart@ideasonboard.com, posciak@chromium.org,
arunkk.samsung@gmail.com
Subject: Re: [PATCH v5 2/2] [media] s5p-mfc: Add support for resolution change event
Date: Wed, 14 May 2014 11:10:02 +0200 [thread overview]
Message-ID: <537332EA.9020702@samsung.com> (raw)
In-Reply-To: <1400050783-2158-3-git-send-email-arun.kk@samsung.com>
On 14/05/14 08:59, Arun Kumar K wrote:
> From: Pawel Osciak <posciak@chromium.org>
>
> When a resolution change point is reached, queue an event to signal the
> userspace that a new set of buffers is required before decoding can
> continue.
>
> Signed-off-by: Pawel Osciak <posciak@chromium.org>
> Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
> drivers/media/platform/s5p-mfc/s5p_mfc.c | 8 ++++++++
> drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 2 ++
> 2 files changed, 10 insertions(+)
>
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
> index 6b04f17..f3a4576 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
> @@ -349,8 +349,16 @@ static void s5p_mfc_handle_frame(struct s5p_mfc_ctx *ctx,
> /* All frames remaining in the buffer have been extracted */
> if (dst_frame_status == S5P_FIMV_DEC_STATUS_DECODING_EMPTY) {
> if (ctx->state == MFCINST_RES_CHANGE_FLUSH) {
> + static const struct v4l2_event ev_src_ch = {
> + .type = V4L2_EVENT_SOURCE_CHANGE,
> + .u.src_change.changes =
> + V4L2_EVENT_SRC_CH_RESOLUTION,
> + };
> +
> s5p_mfc_handle_frame_all_extracted(ctx);
> ctx->state = MFCINST_RES_CHANGE_END;
> + v4l2_event_queue_fh(&ctx->fh, &ev_src_ch);
> +
> goto leave_handle_frame;
> } else {
> s5p_mfc_handle_frame_all_extracted(ctx);
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> index 4586186..326d8db 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> @@ -851,6 +851,8 @@ static int vidioc_subscribe_event(struct v4l2_fh *fh,
> 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);
> default:
> return -EINVAL;
> }
next prev parent reply other threads:[~2014-05-14 9:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-14 6:59 [PATCH v5 0/2] Add resolution change event Arun Kumar K
2014-05-14 6:59 ` [PATCH v5 1/2] [media] v4l: Add source " Arun Kumar K
2014-05-14 9:05 ` Sylwester Nawrocki
2014-05-14 6:59 ` [PATCH v5 2/2] [media] s5p-mfc: Add support for resolution " Arun Kumar K
2014-05-14 9:10 ` Sylwester Nawrocki [this message]
2014-05-14 9:23 ` Kamil Debski
2014-05-14 7:11 ` [PATCH v5 0/2] Add " 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=537332EA.9020702@samsung.com \
--to=s.nawrocki@samsung.com \
--cc=arun.kk@samsung.com \
--cc=arunkk.samsung@gmail.com \
--cc=hverkuil@xs4all.nl \
--cc=k.debski@samsung.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=posciak@chromium.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).