Re: [PATCH] usb: gadget/uvc: Implement videobuf2 .wait_prepare and .wait_finish operations

2013-06-04 Thread Michael Grzeschik
Hi Felipe,

On Mon, Apr 29, 2013 at 09:29:50AM +0300, Felipe Balbi wrote:
 On Tue, Apr 23, 2013 at 01:36:33PM +0200, Laurent Pinchart wrote:
  On Tuesday 23 April 2013 14:16:56 Felipe Balbi wrote:
   On Mon, Apr 15, 2013 at 02:45:39PM +0200, Laurent Pinchart wrote:
   Those optional operations are used to release and reacquire the
   queue lock when videobuf2 needs to perform operations that sleep 
   for
   a long time, such as waiting for a buffer to be complete. 
   Implement
   them to avoid blocking qbuf or streamoff calls when a dqbuf is in
   progress.
   
   Signed-off-by: Michael Grzeschik m.grzesc...@pengutronix.de
  
  Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
  
  I've taken the patch in my tree and will wait for v4 of [1] before
  pushing it upstream.
 
 i think that patch can be applied now! :)

Oops, my bad. I had applied the patch in a wrong branch and forgot about
it :-/ Sorry about that.

Felipe, can you pick this one up, or would you like a pull request ?
   
   too late for v3.10 for me, sorry
  
  Can you pick it up for v3.11 ?
 
 sure, as soon as v3.10-rc1 is tagged

I think the time has come! :)

Thanks,
Michael

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] usb: gadget/uvc: Implement videobuf2 .wait_prepare and .wait_finish operations

2013-04-29 Thread Felipe Balbi
On Tue, Apr 23, 2013 at 01:36:33PM +0200, Laurent Pinchart wrote:
 On Tuesday 23 April 2013 14:16:56 Felipe Balbi wrote:
  On Mon, Apr 15, 2013 at 02:45:39PM +0200, Laurent Pinchart wrote:
  Those optional operations are used to release and reacquire the
  queue lock when videobuf2 needs to perform operations that sleep for
  a long time, such as waiting for a buffer to be complete. Implement
  them to avoid blocking qbuf or streamoff calls when a dqbuf is in
  progress.
  
  Signed-off-by: Michael Grzeschik m.grzesc...@pengutronix.de
 
 Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
 
 I've taken the patch in my tree and will wait for v4 of [1] before
 pushing it upstream.

i think that patch can be applied now! :)
   
   Oops, my bad. I had applied the patch in a wrong branch and forgot about
   it :-/ Sorry about that.
   
   Felipe, can you pick this one up, or would you like a pull request ?
  
  too late for v3.10 for me, sorry
 
 Can you pick it up for v3.11 ?

sure, as soon as v3.10-rc1 is tagged

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH] usb: gadget/uvc: Implement videobuf2 .wait_prepare and .wait_finish operations

2013-04-23 Thread Felipe Balbi
Hi,

On Mon, Apr 15, 2013 at 02:45:39PM +0200, Laurent Pinchart wrote:
Those optional operations are used to release and reacquire the queue
lock when videobuf2 needs to perform operations that sleep for a long
time, such as waiting for a buffer to be complete. Implement them to
avoid blocking qbuf or streamoff calls when a dqbuf is in progress.

Signed-off-by: Michael Grzeschik m.grzesc...@pengutronix.de
   
   Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
   
   I've taken the patch in my tree and will wait for v4 of [1] before pushing
   it upstream.
  
  i think that patch can be applied now! :)
 
 Oops, my bad. I had applied the patch in a wrong branch and forgot about it 
 :-/ Sorry about that.
 
 Felipe, can you pick this one up, or would you like a pull request ?

too late for v3.10 for me, sorry

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH] usb: gadget/uvc: Implement videobuf2 .wait_prepare and .wait_finish operations

2013-04-23 Thread Laurent Pinchart
On Tuesday 23 April 2013 14:16:56 Felipe Balbi wrote:
 On Mon, Apr 15, 2013 at 02:45:39PM +0200, Laurent Pinchart wrote:
 Those optional operations are used to release and reacquire the
 queue lock when videobuf2 needs to perform operations that sleep for
 a long time, such as waiting for a buffer to be complete. Implement
 them to avoid blocking qbuf or streamoff calls when a dqbuf is in
 progress.
 
 Signed-off-by: Michael Grzeschik m.grzesc...@pengutronix.de

Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com

I've taken the patch in my tree and will wait for v4 of [1] before
pushing it upstream.
   
   i think that patch can be applied now! :)
  
  Oops, my bad. I had applied the patch in a wrong branch and forgot about
  it :-/ Sorry about that.
  
  Felipe, can you pick this one up, or would you like a pull request ?
 
 too late for v3.10 for me, sorry

Can you pick it up for v3.11 ?

-- 
Regards,

Laurent Pinchart


signature.asc
Description: This is a digitally signed message part.


Re: [PATCH] usb: gadget/uvc: Implement videobuf2 .wait_prepare and .wait_finish operations

2013-04-15 Thread Michael Grzeschik
Hi Laurent,

On Mon, Feb 11, 2013 at 08:43:44PM +0100, Laurent Pinchart wrote:
 Hi Michael,
 
 Thanks for the patch.
 
 On Saturday 09 February 2013 00:54:54 Michael Grzeschik wrote:
  Those optional operations are used to release and reacquire the queue
  lock when videobuf2 needs to perform operations that sleep for a long
  time, such as waiting for a buffer to be complete. Implement them to
  avoid blocking qbuf or streamoff calls when a dqbuf is in progress.
  
  Signed-off-by: Michael Grzeschik m.grzesc...@pengutronix.de
 
 Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
 
 I've taken the patch in my tree and will wait for v4 of [1] before pushing it 
 upstream.

i think that patch can be applied now! :)

Thanks,
Michael

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] usb: gadget/uvc: Implement videobuf2 .wait_prepare and .wait_finish operations

2013-04-15 Thread Laurent Pinchart
Hi Michael,

On Monday 15 April 2013 14:36:27 Michael Grzeschik wrote:
 On Mon, Feb 11, 2013 at 08:43:44PM +0100, Laurent Pinchart wrote:
  On Saturday 09 February 2013 00:54:54 Michael Grzeschik wrote:
   Those optional operations are used to release and reacquire the queue
   lock when videobuf2 needs to perform operations that sleep for a long
   time, such as waiting for a buffer to be complete. Implement them to
   avoid blocking qbuf or streamoff calls when a dqbuf is in progress.
   
   Signed-off-by: Michael Grzeschik m.grzesc...@pengutronix.de
  
  Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
  
  I've taken the patch in my tree and will wait for v4 of [1] before pushing
  it upstream.
 
 i think that patch can be applied now! :)

Oops, my bad. I had applied the patch in a wrong branch and forgot about it 
:-/ Sorry about that.

Felipe, can you pick this one up, or would you like a pull request ?

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] usb: gadget/uvc: Implement videobuf2 .wait_prepare and .wait_finish operations

2013-02-11 Thread Laurent Pinchart
Hi Michael,

Thanks for the patch.

On Saturday 09 February 2013 00:54:54 Michael Grzeschik wrote:
 Those optional operations are used to release and reacquire the queue
 lock when videobuf2 needs to perform operations that sleep for a long
 time, such as waiting for a buffer to be complete. Implement them to
 avoid blocking qbuf or streamoff calls when a dqbuf is in progress.
 
 Signed-off-by: Michael Grzeschik m.grzesc...@pengutronix.de

Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com

I've taken the patch in my tree and will wait for v4 of [1] before pushing it 
upstream.

 ---
 This patch is based on the host side patch [1] and makes
 sense on the device side of the uvc framework as well.
 
 [1] http://patchwork.linuxtv.org/patch/16379/
 
  drivers/usb/gadget/uvc_queue.c |   16 
  1 file changed, 16 insertions(+)
 
 diff --git a/drivers/usb/gadget/uvc_queue.c b/drivers/usb/gadget/uvc_queue.c
 index bd20fab..a9ddf24 100644
 --- a/drivers/usb/gadget/uvc_queue.c
 +++ b/drivers/usb/gadget/uvc_queue.c
 @@ -103,10 +103,26 @@ static void uvc_buffer_queue(struct vb2_buffer *vb)
   spin_unlock_irqrestore(queue-irqlock, flags);
  }
 
 +static void uvc_wait_prepare(struct vb2_queue *vq)
 +{
 + struct uvc_video_queue *queue = vb2_get_drv_priv(vq);
 +
 + mutex_unlock(queue-mutex);
 +}
 +
 +static void uvc_wait_finish(struct vb2_queue *vq)
 +{
 + struct uvc_video_queue *queue = vb2_get_drv_priv(vq);
 +
 + mutex_lock(queue-mutex);
 +}
 +
  static struct vb2_ops uvc_queue_qops = {
   .queue_setup = uvc_queue_setup,
   .buf_prepare = uvc_buffer_prepare,
   .buf_queue = uvc_buffer_queue,
 + .wait_prepare = uvc_wait_prepare,
 + .wait_finish = uvc_wait_finish,
  };
 
  static int uvc_queue_init(struct uvc_video_queue *queue,

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html