提交 b0510f8d 编写于 作者: A Al Viro 提交者: Mauro Carvalho Chehab

V4L/DVB (7963): ivtv: trivial annotations

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 d4f979a9
...@@ -259,6 +259,12 @@ struct ivtv_mailbox_data { ...@@ -259,6 +259,12 @@ struct ivtv_mailbox_data {
/* Scatter-Gather array element, used in DMA transfers */ /* Scatter-Gather array element, used in DMA transfers */
struct ivtv_sg_element { struct ivtv_sg_element {
__le32 src;
__le32 dst;
__le32 size;
};
struct ivtv_sg_host_element {
u32 src; u32 src;
u32 dst; u32 dst;
u32 size; u32 size;
...@@ -349,8 +355,8 @@ struct ivtv_stream { ...@@ -349,8 +355,8 @@ struct ivtv_stream {
u16 dma_xfer_cnt; u16 dma_xfer_cnt;
/* Base Dev SG Array for cx23415/6 */ /* Base Dev SG Array for cx23415/6 */
struct ivtv_sg_element *sg_pending; struct ivtv_sg_host_element *sg_pending;
struct ivtv_sg_element *sg_processing; struct ivtv_sg_host_element *sg_processing;
struct ivtv_sg_element *sg_dma; struct ivtv_sg_element *sg_dma;
dma_addr_t sg_handle; dma_addr_t sg_handle;
int sg_pending_size; int sg_pending_size;
......
...@@ -587,7 +587,7 @@ ssize_t ivtv_v4l2_write(struct file *filp, const char __user *user_buf, size_t c ...@@ -587,7 +587,7 @@ ssize_t ivtv_v4l2_write(struct file *filp, const char __user *user_buf, size_t c
since we may get here before the stream has been fully set-up */ since we may get here before the stream has been fully set-up */
if (mode == OUT_YUV && s->q_full.length == 0 && itv->dma_data_req_size) { if (mode == OUT_YUV && s->q_full.length == 0 && itv->dma_data_req_size) {
while (count >= itv->dma_data_req_size) { while (count >= itv->dma_data_req_size) {
if (!ivtv_yuv_udma_stream_frame (itv, (void *)user_buf)) { if (!ivtv_yuv_udma_stream_frame (itv, (void __user *)user_buf)) {
bytes_written += itv->dma_data_req_size; bytes_written += itv->dma_data_req_size;
user_buf += itv->dma_data_req_size; user_buf += itv->dma_data_req_size;
count -= itv->dma_data_req_size; count -= itv->dma_data_req_size;
......
...@@ -231,14 +231,14 @@ static void dma_post(struct ivtv_stream *s) ...@@ -231,14 +231,14 @@ static void dma_post(struct ivtv_stream *s)
struct ivtv_buffer *buf = NULL; struct ivtv_buffer *buf = NULL;
struct list_head *p; struct list_head *p;
u32 offset; u32 offset;
u32 *u32buf; __le32 *u32buf;
int x = 0; int x = 0;
IVTV_DEBUG_HI_DMA("%s %s completed (%x)\n", ivtv_use_pio(s) ? "PIO" : "DMA", IVTV_DEBUG_HI_DMA("%s %s completed (%x)\n", ivtv_use_pio(s) ? "PIO" : "DMA",
s->name, s->dma_offset); s->name, s->dma_offset);
list_for_each(p, &s->q_dma.list) { list_for_each(p, &s->q_dma.list) {
buf = list_entry(p, struct ivtv_buffer, list); buf = list_entry(p, struct ivtv_buffer, list);
u32buf = (u32 *)buf->buf; u32buf = (__le32 *)buf->buf;
/* Sync Buffer */ /* Sync Buffer */
ivtv_buf_sync_for_cpu(s, buf); ivtv_buf_sync_for_cpu(s, buf);
...@@ -444,7 +444,7 @@ static void ivtv_dma_enc_start(struct ivtv_stream *s) ...@@ -444,7 +444,7 @@ static void ivtv_dma_enc_start(struct ivtv_stream *s)
} }
s->dma_xfer_cnt++; s->dma_xfer_cnt++;
memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_element) * s->sg_pending_size); memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_host_element) * s->sg_pending_size);
s->sg_processing_size = s->sg_pending_size; s->sg_processing_size = s->sg_pending_size;
s->sg_pending_size = 0; s->sg_pending_size = 0;
s->sg_processed = 0; s->sg_processed = 0;
...@@ -473,7 +473,7 @@ static void ivtv_dma_dec_start(struct ivtv_stream *s) ...@@ -473,7 +473,7 @@ static void ivtv_dma_dec_start(struct ivtv_stream *s)
if (s->q_predma.bytesused) if (s->q_predma.bytesused)
ivtv_queue_move(s, &s->q_predma, NULL, &s->q_dma, s->q_predma.bytesused); ivtv_queue_move(s, &s->q_predma, NULL, &s->q_dma, s->q_predma.bytesused);
s->dma_xfer_cnt++; s->dma_xfer_cnt++;
memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_element) * s->sg_pending_size); memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_host_element) * s->sg_pending_size);
s->sg_processing_size = s->sg_pending_size; s->sg_processing_size = s->sg_pending_size;
s->sg_pending_size = 0; s->sg_pending_size = 0;
s->sg_processed = 0; s->sg_processed = 0;
......
...@@ -193,7 +193,7 @@ void ivtv_flush_queues(struct ivtv_stream *s) ...@@ -193,7 +193,7 @@ void ivtv_flush_queues(struct ivtv_stream *s)
int ivtv_stream_alloc(struct ivtv_stream *s) int ivtv_stream_alloc(struct ivtv_stream *s)
{ {
struct ivtv *itv = s->itv; struct ivtv *itv = s->itv;
int SGsize = sizeof(struct ivtv_sg_element) * s->buffers; int SGsize = sizeof(struct ivtv_sg_host_element) * s->buffers;
int i; int i;
if (s->buffers == 0) if (s->buffers == 0)
......
...@@ -1116,7 +1116,7 @@ void ivtv_yuv_setup_stream_frame(struct ivtv *itv) ...@@ -1116,7 +1116,7 @@ void ivtv_yuv_setup_stream_frame(struct ivtv *itv)
} }
/* Attempt to dma a frame from a user buffer */ /* Attempt to dma a frame from a user buffer */
int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void *src) int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void __user *src)
{ {
struct yuv_playback_info *yi = &itv->yuv_info; struct yuv_playback_info *yi = &itv->yuv_info;
struct ivtv_dma_frame dma_args; struct ivtv_dma_frame dma_args;
......
...@@ -35,7 +35,7 @@ extern const u32 yuv_offset[IVTV_YUV_BUFFERS]; ...@@ -35,7 +35,7 @@ extern const u32 yuv_offset[IVTV_YUV_BUFFERS];
int ivtv_yuv_filter_check(struct ivtv *itv); int ivtv_yuv_filter_check(struct ivtv *itv);
void ivtv_yuv_setup_stream_frame(struct ivtv *itv); void ivtv_yuv_setup_stream_frame(struct ivtv *itv);
int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void *src); int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void __user *src);
void ivtv_yuv_frame_complete(struct ivtv *itv); void ivtv_yuv_frame_complete(struct ivtv *itv);
int ivtv_yuv_prep_frame(struct ivtv *itv, struct ivtv_dma_frame *args); int ivtv_yuv_prep_frame(struct ivtv *itv, struct ivtv_dma_frame *args);
void ivtv_yuv_close(struct ivtv *itv); void ivtv_yuv_close(struct ivtv *itv);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册