public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* vb2 queue setup skipped when playing bigger video
@ 2011-06-08  8:53 Uwe Kleine-König
  2011-06-08  8:58 ` Corrected address for Pawel [Was: vb2 queue setup skipped when playing bigger video] Uwe Kleine-König
  2011-06-08  9:09 ` vb2 queue setup skipped when playing bigger video Marek Szyprowski
  0 siblings, 2 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2011-06-08  8:53 UTC (permalink / raw)
  To: linux-media
  Cc: kernel, Marek Szyprowski, Kyungmin Park, Pawel Osciak,
	Hans Verkuil

Hello,

I'm writing a driver for a video overlay device and have the problem
that if I first playback a video with a resolution of say 320x240 and
then another one with 640x400 the buffers allocated for the first
playback are too small, but my .queue_setup callback isn't called.

I think the culprit is the following line in vb2_reqbufs()
(drivers/media/video/videobuf2-core.c):

	/*
	 * If the same number of buffers and memory access method is requested
	 * then return immediately.
	 */
	if (q->memory == req->memory && req->count == q->num_buffers)
		return 0;

which exits vb2_reqbufs before

	ret = call_qop(q, queue_setup, q, &num_buffers, &num_planes,
		       plane_sizes, q->alloc_ctx);

Reading the vb1 code, this shortcut isn't implemented there.

As I'm quite new to all that v4l2 stuff, I'm not sure what to do.
Just removing the return 0 (i.e. reverting 31901a07) seems to do the
right thing for me.

Thoughts?

Thanks and best regards,
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-06-08 20:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-08  8:53 vb2 queue setup skipped when playing bigger video Uwe Kleine-König
2011-06-08  8:58 ` Corrected address for Pawel [Was: vb2 queue setup skipped when playing bigger video] Uwe Kleine-König
2011-06-08  9:09 ` vb2 queue setup skipped when playing bigger video Marek Szyprowski
2011-06-08  9:31   ` [PATCH] Don't shortcut vb2_reqbufs in case the format changed Uwe Kleine-König
2011-06-08 20:00     ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox