RE: [RFC/PATCH v6 3/4] MFC: Add MFC 5.1 V4L2 driver

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

 



Hi,

> From: Jaeryul Oh [mailto:jaeryul.oh@xxxxxxxxxxx]
> 
> Hi, Kamil
> I have a comment about s5p_mfc_stop_streaming()function.
> 
> > -----Original Message-----
> > From: linux-media-owner@xxxxxxxxxxxxxxx [mailto:linux-media-
> > owner@xxxxxxxxxxxxxxx] On Behalf Of Kamil Debski
> > Sent: Saturday, January 08, 2011 1:26 AM
> > To: linux-media@xxxxxxxxxxxxxxx; linux-samsung-soc@xxxxxxxxxxxxxxx
> > Cc: m.szyprowski@xxxxxxxxxxx; pawel@xxxxxxxxxx;
> kyungmin.park@xxxxxxxxxxx;
> > k.debski@xxxxxxxxxxx; jaeryul.oh@xxxxxxxxxxx; kgene.kim@xxxxxxxxxxx
> > 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 <k.debski@xxxxxxxxxxx>
> > Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>

<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-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