Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173964
b: refs/heads/master
c: 7cbefad
h: refs/heads/master
v: v3
  • Loading branch information
Tuukka Toivonen authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent d1e6fb3 commit 30b4e39
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 131db3a1acbd947a9c3257b95ee860a58ce0dffa
refs/heads/master: 7cbefad085c9112d0b1814db18423e5da072f5c8
7 changes: 3 additions & 4 deletions trunk/drivers/media/video/videobuf-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ int __videobuf_mmap_setup(struct videobuf_queue *q,
q->bufs[i]->bsize = bsize;
switch (memory) {
case V4L2_MEMORY_MMAP:
q->bufs[i]->boff = bsize * i;
q->bufs[i]->boff = PAGE_ALIGN(bsize) * i;
break;
case V4L2_MEMORY_USERPTR:
case V4L2_MEMORY_OVERLAY:
Expand Down Expand Up @@ -430,9 +430,8 @@ int videobuf_reqbufs(struct videobuf_queue *q,
count = VIDEO_MAX_FRAME;
size = 0;
q->ops->buf_setup(q, &count, &size);
size = PAGE_ALIGN(size);
dprintk(1, "reqbufs: bufs=%d, size=0x%x [%d pages total]\n",
count, size, (count*size)>>PAGE_SHIFT);
count, size, (count*PAGE_ALIGN(size))>>PAGE_SHIFT);

retval = __videobuf_mmap_setup(q, count, size, req->memory);
if (retval < 0) {
Expand Down Expand Up @@ -1099,7 +1098,7 @@ int videobuf_cgmbuf(struct videobuf_queue *q,
mbuf->size = 0;
for (i = 0; i < mbuf->frames; i++) {
mbuf->offsets[i] = q->bufs[i]->boff;
mbuf->size += q->bufs[i]->bsize;
mbuf->size += PAGE_ALIGN(q->bufs[i]->bsize);
}

return 0;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/media/video/videobuf-dma-sg.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ static int __videobuf_mmap_mapper(struct videobuf_queue *q,
retval = -EBUSY;
goto done;
}
size += q->bufs[last]->bsize;
size += PAGE_ALIGN(q->bufs[last]->bsize);
if (size == (vma->vm_end - vma->vm_start))
break;
}
Expand All @@ -610,7 +610,7 @@ static int __videobuf_mmap_mapper(struct videobuf_queue *q,
continue;
q->bufs[i]->map = map;
q->bufs[i]->baddr = vma->vm_start + size;
size += q->bufs[i]->bsize;
size += PAGE_ALIGN(q->bufs[i]->bsize);
}

map->count = 1;
Expand Down

0 comments on commit 30b4e39

Please sign in to comment.