mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[media] media: vb2: fix handling MAPPED buffer flag
MAPPED flag was set for the buffer only if all it's planes were mapped and relied on a simple mapping counter. This assumption is really bogus, especially because the buffers may be mapped multiple times. Also the meaning of this flag for muliplane buffers was not really useful. This patch fixes this issue by setting the MAPPED flag for the buffer if any of it's planes is in use (what means that has been mapped at least once), so MAPPED flag can be used as 'in_use' indicator. Reported-by: Hans Verkuil <[email protected]> Signed-off-by: Marek Szyprowski <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> CC: Pawel Osciak <[email protected]> Tested-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
c1426bc727
commit
25a27d9100
2 changed files with 36 additions and 34 deletions
|
|
@ -75,7 +75,6 @@ struct vb2_mem_ops {
|
|||
|
||||
struct vb2_plane {
|
||||
void *mem_priv;
|
||||
int mapped:1;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -147,7 +146,6 @@ struct vb2_queue;
|
|||
* @done_entry: entry on the list that stores all buffers ready to
|
||||
* be dequeued to userspace
|
||||
* @planes: private per-plane information; do not change
|
||||
* @num_planes_mapped: number of mapped planes; do not change
|
||||
*/
|
||||
struct vb2_buffer {
|
||||
struct v4l2_buffer v4l2_buf;
|
||||
|
|
@ -164,7 +162,6 @@ struct vb2_buffer {
|
|||
struct list_head done_entry;
|
||||
|
||||
struct vb2_plane planes[VIDEO_MAX_PLANES];
|
||||
unsigned int num_planes_mapped;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue