git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[sfrench/cifs-2.6.git]
/
drivers
/
media
/
video
/
bt8xx
/
bttv-risc.c
diff --git
a/drivers/media/video/bt8xx/bttv-risc.c
b/drivers/media/video/bt8xx/bttv-risc.c
index e7104d9cb4bd14d14da412c4ac644e09cd6ab167..e5979f77504c7329c2603905066735f636ae65ac 100644
(file)
--- a/
drivers/media/video/bt8xx/bttv-risc.c
+++ b/
drivers/media/video/bt8xx/bttv-risc.c
@@
-574,13
+574,15
@@
bttv_risc_hook(struct bttv *btv, int slot, struct btcx_riscmem *risc,
void
bttv_dma_free(struct videobuf_queue *q,struct bttv *btv, struct bttv_buffer *buf)
{
void
bttv_dma_free(struct videobuf_queue *q,struct bttv *btv, struct bttv_buffer *buf)
{
+ struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
+
BUG_ON(in_interrupt());
videobuf_waiton(&buf->vb,0,0);
BUG_ON(in_interrupt());
videobuf_waiton(&buf->vb,0,0);
- videobuf_dma_unmap(q,
&buf->vb.
dma);
- videobuf_dma_free(
&buf->vb.
dma);
+ videobuf_dma_unmap(q, dma);
+ videobuf_dma_free(dma);
btcx_riscmem_free(btv->c.pci,&buf->bottom);
btcx_riscmem_free(btv->c.pci,&buf->top);
btcx_riscmem_free(btv->c.pci,&buf->bottom);
btcx_riscmem_free(btv->c.pci,&buf->top);
- buf->vb.state =
STATE
_NEEDS_INIT;
+ buf->vb.state =
VIDEOBUF
_NEEDS_INIT;
}
int
}
int
@@
-600,7
+602,7
@@
bttv_buffer_activate_vbi(struct bttv *btv,
if (vbi) {
unsigned int crop, vdelay;
if (vbi) {
unsigned int crop, vdelay;
- vbi->vb.state =
STATE
_ACTIVE;
+ vbi->vb.state =
VIDEOBUF
_ACTIVE;
list_del(&vbi->vb.queue);
/* VDELAY is start of video, end of VBI capturing. */
list_del(&vbi->vb.queue);
/* VDELAY is start of video, end of VBI capturing. */
@@
-642,12
+644,12
@@
bttv_buffer_activate_video(struct bttv *btv,
/* video capture */
if (NULL != set->top && NULL != set->bottom) {
if (set->top == set->bottom) {
/* video capture */
if (NULL != set->top && NULL != set->bottom) {
if (set->top == set->bottom) {
- set->top->vb.state =
STATE
_ACTIVE;
+ set->top->vb.state =
VIDEOBUF
_ACTIVE;
if (set->top->vb.queue.next)
list_del(&set->top->vb.queue);
} else {
if (set->top->vb.queue.next)
list_del(&set->top->vb.queue);
} else {
- set->top->vb.state =
STATE
_ACTIVE;
- set->bottom->vb.state =
STATE
_ACTIVE;
+ set->top->vb.state =
VIDEOBUF
_ACTIVE;
+ set->bottom->vb.state =
VIDEOBUF
_ACTIVE;
if (set->top->vb.queue.next)
list_del(&set->top->vb.queue);
if (set->bottom->vb.queue.next)
if (set->top->vb.queue.next)
list_del(&set->top->vb.queue);
if (set->bottom->vb.queue.next)
@@
-664,7
+666,7
@@
bttv_buffer_activate_video(struct bttv *btv,
btaor((set->top->btswap & 0x0a) | (set->bottom->btswap & 0x05),
~0x0f, BT848_COLOR_CTL);
} else if (NULL != set->top) {
btaor((set->top->btswap & 0x0a) | (set->bottom->btswap & 0x05),
~0x0f, BT848_COLOR_CTL);
} else if (NULL != set->top) {
- set->top->vb.state =
STATE
_ACTIVE;
+ set->top->vb.state =
VIDEOBUF
_ACTIVE;
if (set->top->vb.queue.next)
list_del(&set->top->vb.queue);
bttv_apply_geo(btv, &set->top->geo,1);
if (set->top->vb.queue.next)
list_del(&set->top->vb.queue);
bttv_apply_geo(btv, &set->top->geo,1);
@@
-675,7
+677,7
@@
bttv_buffer_activate_video(struct bttv *btv,
btaor(set->top->btformat & 0xff, ~0xff, BT848_COLOR_FMT);
btaor(set->top->btswap & 0x0f, ~0x0f, BT848_COLOR_CTL);
} else if (NULL != set->bottom) {
btaor(set->top->btformat & 0xff, ~0xff, BT848_COLOR_FMT);
btaor(set->top->btswap & 0x0f, ~0x0f, BT848_COLOR_CTL);
} else if (NULL != set->bottom) {
- set->bottom->vb.state =
STATE
_ACTIVE;
+ set->bottom->vb.state =
VIDEOBUF
_ACTIVE;
if (set->bottom->vb.queue.next)
list_del(&set->bottom->vb.queue);
bttv_apply_geo(btv, &set->bottom->geo,1);
if (set->bottom->vb.queue.next)
list_del(&set->bottom->vb.queue);
bttv_apply_geo(btv, &set->bottom->geo,1);
@@
-699,6
+701,7
@@
int
bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
{
const struct bttv_tvnorm *tvnorm = bttv_tvnorms + buf->tvnorm;
bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
{
const struct bttv_tvnorm *tvnorm = bttv_tvnorms + buf->tvnorm;
+ struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
dprintk(KERN_DEBUG
"bttv%d: buffer field: %s format: %s size: %dx%d\n",
dprintk(KERN_DEBUG
"bttv%d: buffer field: %s format: %s size: %dx%d\n",
@@
-716,25
+719,25
@@
bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
switch (buf->vb.field) {
case V4L2_FIELD_TOP:
switch (buf->vb.field) {
case V4L2_FIELD_TOP:
- bttv_risc_packed(btv,&buf->top,
buf->vb.dma.
sglist,
+ bttv_risc_packed(btv,&buf->top,
dma->
sglist,
/* offset */ 0,bpl,
/* padding */ 0,/* skip_lines */ 0,
buf->vb.height);
break;
case V4L2_FIELD_BOTTOM:
/* offset */ 0,bpl,
/* padding */ 0,/* skip_lines */ 0,
buf->vb.height);
break;
case V4L2_FIELD_BOTTOM:
- bttv_risc_packed(btv,&buf->bottom,
buf->vb.dma.
sglist,
+ bttv_risc_packed(btv,&buf->bottom,
dma->
sglist,
0,bpl,0,0,buf->vb.height);
break;
case V4L2_FIELD_INTERLACED:
0,bpl,0,0,buf->vb.height);
break;
case V4L2_FIELD_INTERLACED:
- bttv_risc_packed(btv,&buf->top,
buf->vb.dma.
sglist,
+ bttv_risc_packed(btv,&buf->top,
dma->
sglist,
0,bpl,bpl,0,buf->vb.height >> 1);
0,bpl,bpl,0,buf->vb.height >> 1);
- bttv_risc_packed(btv,&buf->bottom,
buf->vb.dma.
sglist,
+ bttv_risc_packed(btv,&buf->bottom,
dma->
sglist,
bpl,bpl,bpl,0,buf->vb.height >> 1);
break;
case V4L2_FIELD_SEQ_TB:
bpl,bpl,bpl,0,buf->vb.height >> 1);
break;
case V4L2_FIELD_SEQ_TB:
- bttv_risc_packed(btv,&buf->top,
buf->vb.dma.
sglist,
+ bttv_risc_packed(btv,&buf->top,
dma->
sglist,
0,bpl,0,0,buf->vb.height >> 1);
0,bpl,0,0,buf->vb.height >> 1);
- bttv_risc_packed(btv,&buf->bottom,
buf->vb.dma.
sglist,
+ bttv_risc_packed(btv,&buf->bottom,
dma->
sglist,
bpf,bpl,0,0,buf->vb.height >> 1);
break;
default:
bpf,bpl,0,0,buf->vb.height >> 1);
break;
default:
@@
-767,7
+770,7
@@
bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
bttv_calc_geo(btv,&buf->geo,buf->vb.width,
buf->vb.height,/* both_fields */ 0,
tvnorm,&buf->crop);
bttv_calc_geo(btv,&buf->geo,buf->vb.width,
buf->vb.height,/* both_fields */ 0,
tvnorm,&buf->crop);
- bttv_risc_planar(btv, &buf->top,
buf->vb.dma.
sglist,
+ bttv_risc_planar(btv, &buf->top,
dma->
sglist,
0,buf->vb.width,0,buf->vb.height,
uoffset,voffset,buf->fmt->hshift,
buf->fmt->vshift,0);
0,buf->vb.width,0,buf->vb.height,
uoffset,voffset,buf->fmt->hshift,
buf->fmt->vshift,0);
@@
-776,7
+779,7
@@
bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
bttv_calc_geo(btv,&buf->geo,buf->vb.width,
buf->vb.height,0,
tvnorm,&buf->crop);
bttv_calc_geo(btv,&buf->geo,buf->vb.width,
buf->vb.height,0,
tvnorm,&buf->crop);
- bttv_risc_planar(btv, &buf->bottom,
buf->vb.dma.
sglist,
+ bttv_risc_planar(btv, &buf->bottom,
dma->
sglist,
0,buf->vb.width,0,buf->vb.height,
uoffset,voffset,buf->fmt->hshift,
buf->fmt->vshift,0);
0,buf->vb.width,0,buf->vb.height,
uoffset,voffset,buf->fmt->hshift,
buf->fmt->vshift,0);
@@
-789,14
+792,14
@@
bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
ypadding = buf->vb.width;
cpadding = buf->vb.width >> buf->fmt->hshift;
bttv_risc_planar(btv,&buf->top,
ypadding = buf->vb.width;
cpadding = buf->vb.width >> buf->fmt->hshift;
bttv_risc_planar(btv,&buf->top,
-
buf->vb.dma.
sglist,
+
dma->
sglist,
0,buf->vb.width,ypadding,lines,
uoffset,voffset,
buf->fmt->hshift,
buf->fmt->vshift,
cpadding);
bttv_risc_planar(btv,&buf->bottom,
0,buf->vb.width,ypadding,lines,
uoffset,voffset,
buf->fmt->hshift,
buf->fmt->vshift,
cpadding);
bttv_risc_planar(btv,&buf->bottom,
-
buf->vb.dma.
sglist,
+
dma->
sglist,
ypadding,buf->vb.width,ypadding,lines,
uoffset+cpadding,
voffset+cpadding,
ypadding,buf->vb.width,ypadding,lines,
uoffset+cpadding,
voffset+cpadding,
@@
-812,7
+815,7
@@
bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
ypadding = buf->vb.width;
cpadding = buf->vb.width >> buf->fmt->hshift;
bttv_risc_planar(btv,&buf->top,
ypadding = buf->vb.width;
cpadding = buf->vb.width >> buf->fmt->hshift;
bttv_risc_planar(btv,&buf->top,
-
buf->vb.dma.
sglist,
+
dma->
sglist,
0,buf->vb.width,0,lines,
uoffset >> 1,
voffset >> 1,
0,buf->vb.width,0,lines,
uoffset >> 1,
voffset >> 1,
@@
-820,7
+823,7
@@
bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
buf->fmt->vshift,
0);
bttv_risc_planar(btv,&buf->bottom,
buf->fmt->vshift,
0);
bttv_risc_planar(btv,&buf->bottom,
-
buf->vb.dma.
sglist,
+
dma->
sglist,
lines * ypadding,buf->vb.width,0,lines,
lines * ypadding + (uoffset >> 1),
lines * ypadding + (voffset >> 1),
lines * ypadding,buf->vb.width,0,lines,
lines * ypadding + (uoffset >> 1),
lines * ypadding + (voffset >> 1),
@@
-839,10
+842,10
@@
bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
buf->vb.field = V4L2_FIELD_SEQ_TB;
bttv_calc_geo(btv,&buf->geo,tvnorm->swidth,tvnorm->sheight,
1,tvnorm,&buf->crop);
buf->vb.field = V4L2_FIELD_SEQ_TB;
bttv_calc_geo(btv,&buf->geo,tvnorm->swidth,tvnorm->sheight,
1,tvnorm,&buf->crop);
- bttv_risc_packed(btv, &buf->top,
buf->vb.dma.
sglist,
+ bttv_risc_packed(btv, &buf->top,
dma->
sglist,
/* offset */ 0, RAW_BPL, /* padding */ 0,
/* skip_lines */ 0, RAW_LINES);
/* offset */ 0, RAW_BPL, /* padding */ 0,
/* skip_lines */ 0, RAW_LINES);
- bttv_risc_packed(btv, &buf->bottom,
buf->vb.dma.
sglist,
+ bttv_risc_packed(btv, &buf->bottom,
dma->
sglist,
buf->vb.size/2 , RAW_BPL, 0, 0, RAW_LINES);
}
buf->vb.size/2 , RAW_BPL, 0, 0, RAW_LINES);
}