Hi,
> From: Jaeryul Oh [mailto:[email protected]]
>
> Hi, Kamil
> I have a comment about s5p_mfc_stop_streaming()function.
>
> > -----Original Message-----
> > From: [email protected] [mailto:linux-media-
> > [email protected]] On Behalf Of Kamil Debski
> > Sent: Saturday, January 08, 2011 1:26 AM
> > To: [email protected]; [email protected]
> > Cc: [email protected]; [email protected];
> [email protected];
> > [email protected]; [email protected]; [email protected]
> > Subject: [RFC/PATCH v6 3/4] MFC: Add MFC 5.1 V4L2 driver
> >
> > Multi Format Codec 5.1 is capable of handling a range of video codecs
> > and this driver provides V4L2 interface for video decoding.
> >
> > Signed-off-by: Kamil Debski <[email protected]>
> > Signed-off-by: Kyungmin Park <[email protected]>
<snip>
> > +
> > +/* Thou shalt stream no more. */
> > +static int s5p_mfc_stop_streaming(struct vb2_queue *q)
> > +{
> > + unsigned long flags;
> > + struct s5p_mfc_ctx *ctx = q->drv_priv;
> > + struct s5p_mfc_dev *dev = ctx->dev;
> > +
> > + if ((ctx->state == MFCINST_DEC_FINISHING ||
> > + ctx->state == MFCINST_DEC_RUNNING) &&
> > + dev->curr_ctx == ctx->num && dev->hw_lock) {
> > + ctx->state = MFCINST_DEC_ABORT;
> > + s5p_mfc_wait_for_done_ctx(ctx,
> > S5P_FIMV_R2H_CMD_FRAME_DONE_RET,
> > + 0);
> > + }
> > + ctx->state = MFCINST_DEC_FINISHED;
> > + spin_lock_irqsave(&dev->irqlock, flags);
> > + s5p_mfc_error_cleanup_queue(&ctx->dst_queue,
> > + &ctx->vq_dst);
> > + s5p_mfc_error_cleanup_queue(&ctx->src_queue,
> > + &ctx->vq_src);
> > + if (q->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)
> > + INIT_LIST_HEAD(&ctx->dst_queue);
> > + if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
> > + INIT_LIST_HEAD(&ctx->src_queue);
> > + spin_unlock_irqrestore(&dev->irqlock, flags);
> > + return 0;
> > +}
> This function is called by __vb2_queue_cancel().and
> __vb2_queue_cancel()
> can be
> called by vb2_queue_release() or vb2_streamoff().
> But, in this s5p_mfc_stop_streaming(),s5p_mfc_error_cleanup_queue() for
> src/dst
> is runned regardless of q->type. Is that right ?
> and in case of streamoff, queued bufs should be removed, then qbuf is
> needed
> before streamon again, so ctx->dst_queue_cnt = 0; ctx->src_queue_cnt =
> 0;
> is required
> what do you think about this ?
>
It has to be changed to support pause and dynamic resolution change.
Best wishes,
--
Kamil Debski
Linux Platform Group
Samsung Poland R&D Center
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html