Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174137
b: refs/heads/master
c: fa655dd
h: refs/heads/master
i:
  174135: b9d68b8
v: v3
  • Loading branch information
Andy Walls authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent 09bfb1b commit 9a1964e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 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: c37b11bf17b66b960b217c35283aa9c55eacb292
refs/heads/master: fa655dda5ce6e5ac4a9b94fd451358edca2ddab8
4 changes: 2 additions & 2 deletions trunk/drivers/media/video/cx18/cx18-driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ struct cx18_stream {
const char *name; /* name of the stream */
int type; /* stream type */
u32 handle; /* task handle */
unsigned mdl_offset;
unsigned int mdl_base_idx;

u32 id;
unsigned long s_flags; /* status flags, see above */
Expand Down Expand Up @@ -514,7 +514,7 @@ struct cx18 {
u16 buffer_id; /* buffer ID counter */
u32 v4l2_cap; /* V4L2 capabilities of card */
u32 hw_flags; /* Hardware description of the board */
unsigned mdl_offset;
unsigned int free_mdl_idx;
struct cx18_scb __iomem *scb; /* pointer to SCB */
struct mutex epu2apu_mb_lock; /* protect driver to chip mailbox in SCB*/
struct mutex epu2cpu_mb_lock; /* protect driver to chip mailbox in SCB*/
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/media/video/cx18/cx18-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ static void epu_dma_done(struct cx18 *cx, struct cx18_in_work_order *order)
* and send them back to q_free for fw rotation eventually.
*/
if ((order->flags & CX18_F_EWO_MB_STALE_UPON_RECEIPT) &&
!(id >= s->mdl_offset &&
id < (s->mdl_offset + s->buffers))) {
!(id >= s->mdl_base_idx &&
id < (s->mdl_base_idx + s->buffers))) {
CX18_WARN("Fell behind! Ignoring stale mailbox with "
" inconsistent data. Lost buffer for mailbox "
"seq no %d\n", mb->request);
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/media/video/cx18/cx18-queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ int cx18_stream_alloc(struct cx18_stream *s)
s->name, s->buffers, s->buf_size,
s->buffers * s->buf_size / 1024);

if (((char __iomem *)&cx->scb->cpu_mdl[cx->mdl_offset + s->buffers] -
if (((char __iomem *)&cx->scb->cpu_mdl[cx->free_mdl_idx + s->buffers] -
(char __iomem *)cx->scb) > SCB_RESERVED_SIZE) {
unsigned bufsz = (((char __iomem *)cx->scb) + SCB_RESERVED_SIZE -
((char __iomem *)cx->scb->cpu_mdl));
Expand All @@ -205,7 +205,7 @@ int cx18_stream_alloc(struct cx18_stream *s)
return -ENOMEM;
}

s->mdl_offset = cx->mdl_offset;
s->mdl_base_idx = cx->free_mdl_idx;

/* allocate stream buffers. Initially all buffers are in q_free. */
for (i = 0; i < s->buffers; i++) {
Expand All @@ -227,7 +227,7 @@ int cx18_stream_alloc(struct cx18_stream *s)
cx18_enqueue(s, buf, &s->q_free);
}
if (i == s->buffers) {
cx->mdl_offset += s->buffers;
cx->free_mdl_idx += s->buffers;
return 0;
}
CX18_ERR("Couldn't allocate buffers for %s stream\n", s->name);
Expand Down

0 comments on commit 9a1964e

Please sign in to comment.