Re: [PATCH 2/5] media: vb2: Fix a bug about unnecessary calls to queue cancel and free

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

 



On Thu, Dec 28, 2017 at 02:29:35PM -0200, Mauro Carvalho Chehab wrote:
> From: Satendra Singh Thakur <satendra.t@xxxxxxxxxxx>
> 
> Currently, there's a logic with checks if *count is non-zero,
> q->num_buffers is zero and q->memory is different than memory.
> 
> That's flawed when the device is initialized, or after the
> queues are freed, as it does, unnecessary calls to
> __vb2_queue_cancel() and  __vb2_queue_free().
> 
> That can be avoided by making sure that q->memory is set to
> VB2_MEMORY_UNKNOWN at vb2_core_queue_init(), and adding such
> check at the loop.
> 
> [mchehab@xxxxxxxxxxxxxxxx: fix checkpatch issues and improve the
>  patch, by setting q->memory to zero at vb2_core_queue_init]
> Signed-off-by: Satendra Singh Thakur <satendra.t@xxxxxxxxxxx>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx>

Acked-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>

-- 
Sakari Ailus
sakari.ailus@xxxxxxxxxxxxxxx



[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