]> git.baikalelectronics.ru Git - kernel.git/commit
media: vb2: drop VB2_BUF_STATE_PREPARED, use bool prepared/synced instead
authorHans Verkuil <hans.verkuil@cisco.com>
Sun, 3 Jun 2018 09:02:27 +0000 (05:02 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 31 Aug 2018 15:16:10 +0000 (11:16 -0400)
commita04e8a250c6b0e1dbea06b1292996f564977423e
treef779079ae468634929eacee087349b3e425667a8
parent7b20328b520326d39e579987b9fbf6381ddb2827
media: vb2: drop VB2_BUF_STATE_PREPARED, use bool prepared/synced instead

The PREPARED state becomes a problem with the request API: a buffer
could be PREPARED but dequeued, or PREPARED and in state IN_REQUEST.

PREPARED is really not a state as such, but more a property of the
buffer. So make new 'prepared' and 'synced' bools instead to remember
whether the buffer is prepared and/or synced or not.

V4L2_BUF_FLAG_PREPARED is only set if the buffer is both synced and
prepared and in the DEQUEUED state.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/common/videobuf2/videobuf2-core.c
drivers/media/common/videobuf2/videobuf2-v4l2.c
include/media/videobuf2-core.h