RE: [PATCH] media: staging/intel-ipu3: Implement lock for stream on/off operations

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

 



Hi Sakari,

[snip]

> > > > >  fail_stop_pipeline:
> > > > > @@ -543,6 +546,8 @@ static void ipu3_vb2_stop_streaming(struct
> > > > vb2_queue *vq)
> > > > >  		dev_err(&imgu->pci_dev->dev,
> > > > >  			"failed to stop subdev streaming\n");
> > > > >
> > > > > +	mutex_lock(&imgu->streaming_lock);
> > > > > +
> > > > >  	/* Was this the first node with streaming disabled? */
> > > > >  	if (imgu->streaming && ipu3_all_nodes_streaming(imgu, node)) {
> > > > >  		/* Yes, really stop streaming now */ @@ -552,6 +557,7 @@
> > > > static
> > > > > void ipu3_vb2_stop_streaming(struct vb2_queue *vq)
> > > > >  			imgu->streaming = false;
> > > > >  	}
> > > > >
> > > > > +	mutex_unlock(&imgu->streaming_lock);
> > > > >  	ipu3_return_all_buffers(imgu, node, VB2_BUF_STATE_ERROR);
> >
> > I'd also call ipu3_return_all_buffers() before releasing the lock: in
> > principle the user may have queued new buffers on the devices before
> > the driver marks the buffers as faulty.
> >

Ack
(Somehow I missed this comment.)

[snip]



[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