diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2005-08-03 03:23:41 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2005-08-03 03:23:41 +0000 |
commit | e152bc2e0d215eeee2239eb9011b3b3abe243d1d (patch) | |
tree | d1d495a7c08b5502ad5350da7a8d9c528ee699fd | |
parent | 4de2cea7c9bf04f81356c796b05a4f5412085d10 (diff) | |
download | mediapointer-dvb-s2-e152bc2e0d215eeee2239eb9011b3b3abe243d1d.tar.gz mediapointer-dvb-s2-e152bc2e0d215eeee2239eb9011b3b3abe243d1d.tar.bz2 |
* scripts/buildpatch:
- treating MM_KERNEL as non-mm.
* bttv-cards.c,bttv-driver.c:
- no_overlay bttv insmod parameter now works.
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
-rw-r--r-- | linux/drivers/media/video/bttv-cards.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/bttv-driver.c | 23 | ||||
-rw-r--r-- | v4l/ChangeLog | 11 | ||||
-rw-r--r-- | v4l/scripts/buildpatch | 8 |
4 files changed, 41 insertions, 7 deletions
diff --git a/linux/drivers/media/video/bttv-cards.c b/linux/drivers/media/video/bttv-cards.c index 18bb3c831..85138fb8b 100644 --- a/linux/drivers/media/video/bttv-cards.c +++ b/linux/drivers/media/video/bttv-cards.c @@ -1,5 +1,5 @@ /* - $Id: bttv-cards.c,v 1.62 2005/08/01 18:22:43 mkrufky Exp $ + $Id: bttv-cards.c,v 1.63 2005/08/03 03:23:41 mchehab Exp $ bttv-cards.c @@ -98,7 +98,7 @@ static int __devinit pvr_boot(struct bttv *btv); static unsigned int triton1=0; static unsigned int vsfx=0; static unsigned int latency = UNSET; -static unsigned int no_overlay=-1; +unsigned int no_overlay=0; static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET }; static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET }; @@ -4589,7 +4589,7 @@ void __devinit bttv_check_chipset(void) printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n"); if (pcipci_fail) { printk(KERN_WARNING "bttv: BT848 and your chipset may not work together.\n"); - if (UNSET == no_overlay) { + if (!no_overlay) { printk(KERN_WARNING "bttv: going to disable overlay.\n"); no_overlay = 1; } diff --git a/linux/drivers/media/video/bttv-driver.c b/linux/drivers/media/video/bttv-driver.c index 571d7c4a4..2986b6f67 100644 --- a/linux/drivers/media/video/bttv-driver.c +++ b/linux/drivers/media/video/bttv-driver.c @@ -1,5 +1,5 @@ /* - $Id: bttv-driver.c,v 1.47 2005/07/30 19:47:02 mkrufky Exp $ + $Id: bttv-driver.c,v 1.48 2005/08/03 03:23:41 mchehab Exp $ bttv - Bt848 frame grabber driver @@ -80,6 +80,7 @@ static unsigned int irq_iswitch = 0; static unsigned int uv_ratio = 50; static unsigned int full_luma_range = 0; static unsigned int coring = 0; +extern unsigned int no_overlay; /* API features (turn on/off stuff for testing) */ static unsigned int v4l2 = 1; @@ -2170,6 +2171,9 @@ static int bttv_s_fmt(struct bttv_fh *fh, struct bttv *btv, return 0; } case V4L2_BUF_TYPE_VIDEO_OVERLAY: + printk ("V4L2_BUF_TYPE_VIDEO_OVERLAY called. no_overlay=%d\n",no_overlay); + if (no_overlay) + return -EINVAL; return setup_window(fh, btv, &f->fmt.win, 1); case V4L2_BUF_TYPE_VBI_CAPTURE: retval = bttv_switch_type(fh,f->type); @@ -2243,9 +2247,11 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, /* others */ cap->type = VID_TYPE_CAPTURE| VID_TYPE_TUNER| - VID_TYPE_OVERLAY| VID_TYPE_CLIPPING| VID_TYPE_SCALES; + if (!no_overlay) + cap->type |= VID_TYPE_OVERLAY; + cap->maxwidth = bttv_tvnorms[btv->tvnorm].swidth; cap->maxheight = bttv_tvnorms[btv->tvnorm].sheight; cap->minwidth = 48; @@ -2321,6 +2327,10 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, struct video_window *win = arg; struct v4l2_window w2; + printk ("VIDIOCSWIN called. no_overlay=%d\n",no_overlay); + if (no_overlay) + return -EINVAL; + w2.field = V4L2_FIELD_ANY; w2.w.left = win->x; w2.w.top = win->y; @@ -2596,10 +2606,12 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, cap->version = BTTV_VERSION_CODE; cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | - V4L2_CAP_VIDEO_OVERLAY | V4L2_CAP_VBI_CAPTURE | V4L2_CAP_READWRITE | V4L2_CAP_STREAMING; + if (!no_overlay) + cap->capabilities |= V4L2_CAP_VIDEO_OVERLAY; + if (bttv_tvcards[btv->c.type].tuner != UNSET && bttv_tvcards[btv->c.type].tuner != TUNER_ABSENT) cap->capabilities |= V4L2_CAP_TUNER; @@ -3095,7 +3107,7 @@ static struct file_operations bttv_fops = static struct video_device bttv_video_template = { .name = "UNSET", - .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_OVERLAY| + .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER| VID_TYPE_CLIPPING|VID_TYPE_SCALES, .hardware = VID_HARDWARE_BT848, .fops = &bttv_fops, @@ -3779,6 +3791,9 @@ static void bttv_unregister_video(struct bttv *btv) /* register video4linux devices */ static int __devinit bttv_register_video(struct bttv *btv) { + if (!no_overlay) + bttv_video_template.type |= VID_TYPE_OVERLAY; + /* video */ btv->video_dev = vdev_init(btv, &bttv_video_template, "video"); if (NULL == btv->video_dev) diff --git a/v4l/ChangeLog b/v4l/ChangeLog index a1b05e28b..fa609ec8f 100644 --- a/v4l/ChangeLog +++ b/v4l/ChangeLog @@ -1,3 +1,14 @@ +2005-08-03 03:19 mchehab + + * scripts/buildpatch: + - treating MM_KERNEL as non-mm. + + * bttv-cards.c,bttv-driver.c: + - no_overlay bttv insmod parameter now works. + + Signed-off-by: Michael Krufky <mkrufky@m1k.net> + Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> + 2005-08-01 16:36 mkrufky * bttv-cards.c: - Fixed audio GPIO on DViCO FusionHDTV5 Lite, bttv card # 0x87. diff --git a/v4l/scripts/buildpatch b/v4l/scripts/buildpatch index fa9322fdf..319c46cf0 100644 --- a/v4l/scripts/buildpatch +++ b/v4l/scripts/buildpatch @@ -62,6 +62,14 @@ sub filter_source ($$) { if ($line =~ m/^#include \"compat.h\"/) { next; } + if ($line =~ /^#ifdef MM_KERNEL/) { + chomp($line); + $line =~ s@^#if\s*@@; + $state = "if"; + $if = eval $line; + print OUT "/* BP #if $if ($line) */\n" if $DEBUG; + next; + } if ($line =~ /^#if 0/) { chomp($line); $state = "if"; |