Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124401
b: refs/heads/master
c: 0ef0289
h: refs/heads/master
i:
  124399: 6ee56ec
v: v3
  • Loading branch information
Andy Walls authored and Mauro Carvalho Chehab committed Dec 30, 2008
1 parent 72f6969 commit f4ed368
Show file tree
Hide file tree
Showing 4 changed files with 10 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: 83c3a3c8b6a0e7a54ca9fa18b02c90e2d9a889f9
refs/heads/master: 0ef0289264e8f278312909f1639a7764cc9cf580
5 changes: 3 additions & 2 deletions trunk/drivers/media/video/cx18/cx18-driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
#define CX18_DEFAULT_ENC_PCM_BUFFERS 1

/* Maximum firmware DMA buffers per stream */
#define CX18_MAX_MDLS_PER_STREAM 63
#define CX18_MAX_FW_MDLS_PER_STREAM 63

/* DMA buffer, default size in kB allocated */
#define CX18_DEFAULT_ENC_TS_BUFSIZE 32
Expand Down Expand Up @@ -255,7 +255,8 @@ struct cx18_scb; /* forward reference */


#define CX18_MAX_MDL_ACKS 2
#define CX18_MAX_EPU_WORK_ORDERS 70 /* CPU_DE_RELEASE_MDL bursts 63 commands */
#define CX18_MAX_EPU_WORK_ORDERS (CX18_MAX_FW_MDLS_PER_STREAM + 7)
/* CPU_DE_RELEASE_MDL can burst CX18_MAX_FW_MDLS_PER_STREAM orders in a group */

#define CX18_F_EWO_MB_STALE_UPON_RECEIPT 0x1
#define CX18_F_EWO_MB_STALE_WHILE_PROC 0x2
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/media/video/cx18/cx18-queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ struct cx18_queue *_cx18_enqueue(struct cx18_stream *s, struct cx18_buffer *buf,

mutex_lock(&s->qlock);

/* q_busy is restricted to 63 buffers to stay within firmware limits */
if (q == &s->q_busy && atomic_read(&q->buffers) >= 63)
/* q_busy is restricted to a max buffer count imposed by firmware */
if (q == &s->q_busy &&
atomic_read(&q->buffers) >= CX18_MAX_FW_MDLS_PER_STREAM)
q = &s->q_free;

if (to_front)
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/media/video/cx18/cx18-streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ void cx18_stream_load_fw_queue(struct cx18_stream *s)
struct cx18_buffer *buf;

if (atomic_read(&s->q_free.buffers) == 0 ||
atomic_read(&s->q_busy.buffers) >= 63)
atomic_read(&s->q_busy.buffers) >= CX18_MAX_FW_MDLS_PER_STREAM)
return;

/* Move from q_free to q_busy notifying the firmware, until the limit */
Expand All @@ -434,7 +434,8 @@ void cx18_stream_load_fw_queue(struct cx18_stream *s)
if (buf == NULL)
break;
q = cx18_stream_put_buf_fw(s, buf);
} while (atomic_read(&s->q_busy.buffers) < 63 && q == &s->q_busy);
} while (atomic_read(&s->q_busy.buffers) < CX18_MAX_FW_MDLS_PER_STREAM
&& q == &s->q_busy);
}

int cx18_start_v4l2_encode_stream(struct cx18_stream *s)
Expand Down

0 comments on commit f4ed368

Please sign in to comment.