Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 541 → Rev 540

/shark/trunk/drivers/bttv/bttv-driver.c
58,8 → 58,8
static unsigned int gbuffers = 8;
static unsigned int gbufsize = 0x208000;
 
static int video_nr = -1;
static int radio_nr = -1;
//static int video_nr = -1;
//static int radio_nr = -1;
//static int vbi_nr = -1;
 
static unsigned int fdsr = 0;
1005,7 → 1005,7
btwrite(BT848_CONTROL_LDEC, BT848_E_CONTROL);
btwrite(BT848_CONTROL_LDEC, BT848_O_CONTROL);
}
 
/*
btwrite(0xfffffUL, BT848_INT_STAT);
btwrite((btv->triton1) |
BT848_INT_GPINT |
1014,8 → 1014,8
BT848_INT_RISCI|BT848_INT_OCERR|BT848_INT_VPRES|
BT848_INT_FMTCHG|BT848_INT_HLOCK,
BT848_INT_MASK);
*/
 
 
}
 
extern void bttv_reinit_bt848(struct bttv *btv)
1814,7 → 1814,6
return -EFAULT;
}
}
 
/* clip against screen */
if (NULL != btv->fbuf.base)
n = btcx_screen_clips(btv->fbuf.fmt.width, btv->fbuf.fmt.height,
1859,7 → 1858,6
bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new);
retval = bttv_switch_overlay(btv,fh,new);
}
 
//up(&fh->cap.lock);
return retval;
}
2350,10 → 2348,8
buf = (struct bttv_buffer *)fh->cap.bufs[vm->frame];
if (NULL == buf)
goto fh_unlock_and_return;
if (0 == buf->vb.baddr)
goto fh_unlock_and_return;
 
if (buf->vb.state == STATE_QUEUED ||
buf->vb.state == STATE_ACTIVE)
goto fh_unlock_and_return;
2765,8 → 2761,7
bttv_switch_type(fh,V4L2_BUF_TYPE_VBI_CAPTURE);
return fh->lines * 2 * 2048;
default:
return bttv_do_ioctl(inode, file, cmd, (void *)arg);
//video_usercopy(inode, file, cmd, arg, bttv_do_ioctl);
return 0;//video_usercopy(inode, file, cmd, arg, bttv_do_ioctl);
}
}
 
2958,7 → 2953,7
// vma->vm_start, vma->vm_end - vma->vm_start);
return videobuf_mmap_mapper(vma,bttv_queue(fh));
}
 
/*
static struct file_operations bttv_fops =
{
.owner = THIS_MODULE,
2969,8 → 2964,8
.read = bttv_read,
.mmap = bttv_mmap,
};
 
 
*/
/*
static struct video_device bttv_video_template =
{
.name = "UNSET",
2980,7 → 2975,7
.fops = &bttv_fops,
.minor = -1,
};
/*
 
struct video_device bttv_vbi_template =
{
.name = "bt848/878 vbi",
3091,7 → 3086,7
{
return 0;//video_usercopy(inode, file, cmd, arg, radio_do_ioctl);
}
 
/*
static struct file_operations radio_fops =
{
.owner = THIS_MODULE,
3100,8 → 3095,8
.ioctl = radio_ioctl,
.llseek = no_llseek,
};
 
 
*/
/*
static struct video_device radio_template =
{
.name = "bt848/878 radio",
3110,7 → 3105,7
.fops = &radio_fops,
.minor = -1,
};
 
*/
/* ----------------------------------------------------------------------- */
/* irq handler */
 
3449,7 → 3444,7
 
/* ----------------------------------------------------------------------- */
/* initialitation */
 
/*
static struct video_device *vdev_init(struct bttv *btv,
struct video_device *template,
char *type)
3469,7 → 3464,7
return vfd;
}
 
void bttv_unregister_video(struct bttv *btv)
static void bttv_unregister_video(struct bttv *btv)
{
if (btv->video_dev) {
if (-1 != btv->video_dev->minor)
3478,7 → 3473,6
video_device_release(btv->video_dev);
btv->video_dev = NULL;
}
/*
if (btv->vbi_dev) {
if (-1 != btv->vbi_dev->minor)
video_unregister_device(btv->vbi_dev);
3486,7 → 3480,6
video_device_release(btv->vbi_dev);
btv->vbi_dev = NULL;
}
*/
if (btv->radio_dev) {
if (-1 != btv->radio_dev->minor)
video_unregister_device(btv->radio_dev);
3495,10 → 3488,10
btv->radio_dev = NULL;
}
}
 
*/
/* register video4linux devices */
 
int __devinit bttv_register_video(struct bttv *btv)
/*
static int __devinit bttv_register_video(struct bttv *btv)
{
btv->video_dev = vdev_init(btv, &bttv_video_template, "video");
if (NULL == btv->video_dev)
3507,8 → 3500,8
goto err;
printk(KERN_INFO "bttv%d: registered device video%d\n",
btv->nr,btv->video_dev->minor & 0x1f);
/*
video_device_create_file(btv->video_dev, &class_device_attr_card);
 
btv->vbi_dev = vdev_init(btv, &bttv_vbi_template, "vbi");
if (NULL == btv->vbi_dev)
goto err;
3516,7 → 3509,7
goto err;
printk(KERN_INFO "bttv%d: registered device vbi%d\n",
btv->nr,btv->vbi_dev->minor & 0x1f);
*/
 
if (!btv->has_radio)
return 0;
btv->radio_dev = vdev_init(btv, &radio_template, "radio");
3533,6 → 3526,7
bttv_unregister_video(btv);
return -1;
}
*/
 
/* on OpenFirmware machines (PowerMac at least), PCI memory cycle */
/* response on cards with no firmware is not enabled by OF */
3681,9 → 3675,17
if (bttv_gpio)
bttv_gpio_tracking(btv,"init");
 
cprintf("Critical Point 1\n");
for (result=1;result<1000000000;result++);
cprintf("Critical Point End 1\n");
 
/* needs to be done before i2c is registered */
bttv_init_card1(btv);
 
cprintf("Critical Point 2\n");
mdelay(1000);
cprintf("Critical Point End 2\n");
 
/* register i2c */
init_bttv_i2c(btv);
 
3692,7 → 3694,7
 
/* register video4linux + input */
if (!bttv_tvcards[btv->type].no_video) {
bttv_register_video(btv);
//bttv_register_video(btv);
#ifdef CONFIG_VIDEO_IR
bttv_input_init(btv);
#endif