Commit 591e6a0a authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: atomisp: add more comments about frame allocation

The frame allocation logic happens differently for userptr
or normal mmap. On a quick look, this sounded to be unbalanced,
but the logic should actually work for both cases.

Add an extra comment to reflect it.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 27b778c5
...@@ -1052,7 +1052,7 @@ int __atomisp_reqbufs(struct file *file, void *fh, ...@@ -1052,7 +1052,7 @@ int __atomisp_reqbufs(struct file *file, void *fh,
atomisp_alloc_css_stat_bufs(asd, stream_id); atomisp_alloc_css_stat_bufs(asd, stream_id);
/* /*
* for user pointer type, buffers are not really allcated here, * for user pointer type, buffers are not really allocated here,
* buffers are setup in QBUF operation through v4l2_buffer structure * buffers are setup in QBUF operation through v4l2_buffer structure
*/ */
if (req->memory == V4L2_MEMORY_USERPTR) if (req->memory == V4L2_MEMORY_USERPTR)
...@@ -1225,6 +1225,10 @@ static int atomisp_qbuf(struct file *file, void *fh, struct v4l2_buffer *buf) ...@@ -1225,6 +1225,10 @@ static int atomisp_qbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
buf->flags |= V4L2_BUF_FLAG_MAPPED; buf->flags |= V4L2_BUF_FLAG_MAPPED;
buf->flags |= V4L2_BUF_FLAG_QUEUED; buf->flags |= V4L2_BUF_FLAG_QUEUED;
buf->flags &= ~V4L2_BUF_FLAG_DONE; buf->flags &= ~V4L2_BUF_FLAG_DONE;
/*
* For mmap, frames were allocated at request buffers
*/
} }
done: done:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment